SOLVED: I've broken redux, now what?
Added by Patrick Goetz over 6 years ago
As mentioned in another post, we had a perfectly working system which I'm having to re-organize to accommodate multiple research groups. (I have a working solution, which I can post about at some point.)
The microscope usually used with leginon has been broken for a couple of days, so no one has been collecting images. This morning I ran some system updates and rebooted the linux machine which runs leginon/myamiweb. While testing the new configuration this afternoon, we noticed that redux appears to be broken. Click on Image Viewer after starting a new session and it just displays "redux failed to return anything".
In checking /var/log/redux.log, I noticed that I had left /etc/myami/redux.cfg in a misconfigured state, with an incorrect cache path:
[cache] enable: yes path: /home/cnsit/test
The cnsit account was moved recently, so the redux log file showed:
ResourceNotFoundError : Root directory does not exist: /home/cnsit/test
So I changed this to the same image temp directory configured in myamiweb/config.php:
[cache] enable: yes path: /EM/imagetemp
with what should be acceptable permissions:
root@kraken:~# ls -ld /EM/imagetemp/ drwxr-xr-x 2 www-data www-data 10 Jul 19 12:46 /EM/imagetemp/
But here's the problem: the /var/log/redux.log file isn't getting updated any more. The last change occurred at 6:38am when I rebooted the server, and since then nothing is getting logged.
How can I debug this, given that nothing is being written to the log file; and further, why is nothing being written to the log file? The updates I ran this morning did update apache, but these shouldn't be application breaking updates.
Replies (3)
RE: I've broken redux, now what? - Added by Anchi Cheng over 6 years ago
You did not mention what did you set in redux.cfg in term of the log file.
I recommend doing a basic redux test in Using_Redux_to_serve_images_on_myamiweb
1. Turn off caching. and then do basic redux test, not reduxd. That will print directly to the terminal of any library that got messed up.
2. Then try reduxd test
3. Then turn on caching.
Newest fs used by caching may not be compatible with python 2.7, so if you update, it might be a problem.
RE: I've broken redux, now what? - Added by Patrick Goetz over 6 years ago
Hi Anchi -
I didn't mention the log file location, because this wasn't changed and was working until this morning:
[log] file: /var/log/redux.log
Ack, this is another case of brain damage. I completely forgot that redux runs as a service, and the service failed to restart this morning, presumably because I moved /home/cnsit (the location of the incorrect caching folder) to /local/home/cnsit in anticipation of activating AD logins.
Thanks for your prompt help with this and sorry for posting a question before digging in a little deeper. To avoid this being a total loss, here is the systemd service file I wrote to make starting reduxd compatible with modern systems:
[Unit] Description=Redux Image Server After=apache2.service [Service] Type=simple User=root Group=root PrivateTmp=true WorkingDirectory=/usr/local/bin ExecStart=/usr/local/bin/reduxd [Install] WantedBy=multi-user.target
Place this file in /etc/systemd/system, and type
# systemctl enable reduxd # systemctl start reduxd
RE: I've broken redux, now what? - Added by Anchi Cheng over 6 years ago
Thanks for reporting the solution and posting the systemd service file.