Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After rebuilding the index we start getting unprocessable mails #1860

Closed
CyberPunk2042 opened this issue Mar 6, 2018 · 6 comments
Closed
Labels

Comments

@CyberPunk2042
Copy link

Infos:

  • Used Zammad version: 2.0
  • Installation method (Rancher, ..):
  • Operating system:(CentOS-Docker-Rancher zammad-compose)
  • Database + version: PostgreSql
  • Elasticsearch version:
  • Browser + version: Chrome

Expected behavior:

*Search to show clients and tickets correctly

Actual behavior:

  • Search doesn't work properly and not showing all client and tickets.
    After rebuilding the index it works but we start getting an error StatusCode: 500 and unprocessable mails on some tickets which have been created recently

We can't update or join tickets them

Errors
Unprocessable mails
And
StatusCode: 500
{"error":"Permission denied @ unlink_internal - /home/zammad/tmp/cache_file_store_production/3D6/C90/User%3A%3A14870"}

Thank You

Steps to reproduce the behavior:

*zammad run rake searchindex:rebuild

Yes I'm sure this is a bug and no feature request or a general question.

@thorsteneckel
Copy link
Contributor

Hi @CyberPunk2042 ,

I can't imagine how the rebuild caused this issue to happen. Can you please do the two things:

Check your tmp/unprocessable_mail/ folder and run cat unprocessable_mail/*name*.eml | zammad run rails r 'Channel::Driver::MailStdin.new' on the affected file. There should be a backtrace what happens. Please post the complete message here.

Check the file permissions of /home/zammad/tmp/cache_file_store_production/3D6/C90/User%3A%3A14870. I think that there were some actions performed as root and now we have broken file permissions in the temp directory. Post the permissions of the file here.

@thorsteneckel
Copy link
Contributor

Please reopen/provide feedback if required.

@CyberPunk2042
Copy link
Author

CyberPunk2042 commented Mar 7, 2018

Thanks for reply

Here is a screenshot
photo_2018-03-07_15-40-04

From log file
"hhhttp://zammad-elasticsearch:9200/zammad_production/Ticket/2090011"
I, [2018-03-07T06:50:57.383307 #62] INFO -- : # 201
I, [2018-03-07T06:50:57.410807 #62] INFO -- : # curl -X POST "hhhttp://zammad-elasticsearch:9200/zammad_production/Ticket/2090010"
E, [2018-03-07T06:50:57.421422 #1] ERROR -- : Can't write cache Ticket::28970: #<Errno::EACCES: Permission denied @ rb_sysopen - /home/zammad/tmp/cache_file_store_production/4A1/810/.permissions_check.70077697804700.1.14223>

It is fetching new emails without any problem but after rebuild replies to old tickets start getting error 550

@martini
Copy link
Collaborator

martini commented Mar 7, 2018

Hi @CyberPunk2042 it seems that you are using docker and I guess it's a docker related permission problem.

Zammad tries to create a cache file but the OS says: Sorry, you have no permissions to do so.

@thorsteneckel
Copy link
Contributor

Can you provide the permissions of the files exactly but not only the top tmp/ folder? Likels -ah /home/zammad/tmp/cache_file_store_production/3D6/C90/User%3A%3A14870 and /home/zammad/tmp/cache_file_store_production/4A1/810/.

@CyberPunk2042
Copy link
Author

Yes, we are using Docker/Rancher/Zammad-compose 2.0.
Ok, I will try to play with permissions then I post the result.
Thanks for replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants