-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unable to load driver: [Errno 16] Resource busy #3
Comments
I'm seeing the same issue - Errno16 every couple of days. My error stack seems to begin with something about a checksum error.
|
I don’t know python so i am not able to fix it but i will try to implement some workaround. Watch logs automatically and when this error occuress it will call sudo systemctl restart weewx.service. I hope i will find time to do it during weekend. It will not fix this issue but it will at least automate restarts when this error occure. |
@tfilo I'd very much appreciate if you are able to share your workaround once it's setup. |
@mr-bryn It is not tested yet! Use on your own risk !!! It will work only if you have weewx managed by systemctl (if you installed using apt it should work). Idea is that you create file restartOnError.sh with following content. Set it to be owned by root (sudo chown roor:root restartOnError.sh), for security reason allow to read/write to file only to root (sudo chmod 700 restartOnError.sh). Than add this file to cron for root user. (sudo crontab -e) and add something like this: CRON record
restartOnError.sh
This is not fix for this error, it is just ugly workaround to deal with this errors automatically until fix for this issue is found. It will log to root's home directory into file /root/restart_log.txt so there is easy to check if it restarted weewx or not. I will test it myself in next few weeks. For now (almost week I am without error so I must wait to see if it works like expected). Modified error16 variable line!!! (11.3.2022) |
@mr-bryn This error just occured to me, so i tested my script and modified third line where error16 variable is assigned. Now it is able to find error in log correctly and restart weewx by itself. |
Thanks @tfilo , I haven't had time yet to set up your script, but luckily my station has continued operating anyway. I'll report back once it's in place. |
@tfilo I've made a few tweaks to the script because I'm not as familiar with systemctl, also I noticed the grep line was looking for a specific number (is this the pid maybe?), so it should match any series of digits there now.
|
@mr-bryn thanks for feedback, yes it is probably pid number, i will fix this part in my script too. |
@tfilo Since I've put the script in place it's successfully restarted weewx a dozen or so times and I haven't had to intervene at all. Thanks for helping solve this! |
@mr-bryn I'm glad it helped. I have same experience with this script. |
Hello, after a more than year I upgraded raspbian to newest version. Now I am not able to run weewx on python 2 anymore (which was solving this problem for me). With python 3 i still see this king of error. It occur every few days/weeks. After this error occur in logs, weewx will stop record data. I know that this is not supported hardware anymore but i still hope someone can help to fix it. It worked with python 2 for more than 8 years without problem. I use version 4.6.2 of weewx and latest wmr200py.
The text was updated successfully, but these errors were encountered: