-
Notifications
You must be signed in to change notification settings - Fork 87
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
Loris not creating tmp file #446
Comments
This looks like a straight-up bug – we assign a temporary directory from the You should be able to fix this by running |
It is always a good ideas to do the checking, but in this case the tmp directory in /tmp/loris2 did exist. |
Okay, that’s weird. There might be a problem if Loris didn’t have permissions, say, but then I’d expect to see a different error coming out. |
Wel I put the permissions on 777 just to make sure... but I still get the same error. |
You closed this with a solution to a problem I did not have. |
It got closed automatically by GitHub. I take it you’re still seeing this error? |
Yes. I was about to rewrite the function in webapp.py to create a temp file bypassing the python module. To see if the problem is python NamedTemporaryFile. |
Does Loris keep versions of webapp.py somewhere in a cache? I have tried to change some line of code to see what would happen. And now it seems like I get a different response every time I reload. To be honest... I think I'm going to give up... Maybe there is some problem with Ubuntu 18.04... I deleted temp_file = NamedTemporaryFile( ... Now I get the same error as befor... but also: This is likely a permissions problem, though it's Server Side Error: [Errno 2] No such file or directory: '/tmp/loris2/tmp/tmp/file2.jpg' This is likely a permissions problem, though it's |
@ericvanderlinden could you try using a different tmp directory? Maybe try setting the tmp directory to be in your home directory, and see if anything changes. Is /tmp a normal directory on /, or is it mounted somehow? |
I changed the temp directory to
What happened was that as I kept reloading the image Loris seemed to hope from one version of the loris.config and webapp.py to the other, but did not use the latest version. This morning I restarted the server and now it works. Maybe /home/loris is a better initial setting. For your information:
|
@ericvanderlinden does "mount | grep /tmp" return anything on the machine? |
Sorry I have been away. |
@ericvanderlinden can you confirm that you can create a file in /tmp as the loris user? If it works using "touch /tmp/test", maybe you could try with a tiny python script like this:
Does it create the file there? |
I logged in as loris. I hope this answers your question |
ok, that shows that the Loris user can create files/directories in /tmp. You could try the little python script if you want. I'm not sure why the Loris code can't create files, when the loris user can. |
I have installed Loris according to the documentation. Everything seems to be fine exept I get a
Internal Server Error (500) because a temp should be created and it is not created.
I'm on Ubuntu 18.
I have searched via google for reports of similar errors but nothing.
Any ideas?
The text was updated successfully, but these errors were encountered: