Open BAChapin opened 2 years ago
I'm not sure what's going on with this... I've tried:
All instances were tested by copying the code that should be executed when the backup function is called to run_debug and giving it a go. All instances were successful.
Perhaps the issue lies in CronTab itself?
Actually, I think there may be something even deeper than that. Nothing has been added to log.txt since 2/19...
NOTE: When I manually execute these commands (-k, -bu), the logs are updated accordingly.
This leads me to believe that there may be something wrong with our CronTab configuration (either in the project or on the actual server).
Well, I will certainly look into the crontab list to see if there is anything weird in there. But I do have to point out, backups stopped working with our previous server as well. If you remember you noticed that there weren't any recent backups. Nothing with the CronTab system would have changed on that server. Well, nothing except the oddball restart that caused the Raspberry Pi job to be added. I have only 1 theory as to what could be causing the issue, I'll check into it and get back with you.
Okay, so my theory didn't pan out, at least I don't think it does. So, my theory was, maybe the change started taking place when we updated the system with the username fetching capabilities. It was added to the codebase 11 days ago, but we didn't update to the version with those changes until like, right before the server got switched.
Yeah, it's gotta be something surrounding the scheduler. As above, when I execute these commands manually, they run absolutely fine.
Fyi, I did not try executing the exact commands listed in your cron (as it would on the schedule). I simply used python main.py ...
.
bachapin@MIEServer:~$ python3 /home/bachapin/MIE-MCServer/main.py --backup
Traceback (most recent call last):
File "/home/bachapin/MIE-MCServer/main.py", line 20, in <module>
from util.backup import Backup
File "/home/bachapin/MIE-MCServer/util/backup.py", line 4, in <module>
from .configuration import Maintenance
File "/home/bachapin/MIE-MCServer/util/configuration.py", line 1, in <module>
from .mielib import custominput as ci
File "/home/bachapin/MIE-MCServer/util/mielib/custominput.py", line 5, in <module>
from util.cron import CronDate, CronFrequency
File "/home/bachapin/MIE-MCServer/util/cron.py", line 3, in <module>
from util.date import Date
File "/home/bachapin/MIE-MCServer/util/date.py", line 2, in <module>
from .extension import string_contains, stringContainsAnyCase
File "/home/bachapin/MIE-MCServer/util/extension.py", line 3, in <module>
def cleanString(haystack: str, needles: list[str]) -> str:
TypeError: 'type' object is not subscriptable
bachapin@MIEServer:~$ python3 /home/bachapin/MIE-MCServer/main.py --clean
Traceback (most recent call last):
File "/home/bachapin/MIE-MCServer/main.py", line 20, in <module>
from util.backup import Backup
File "/home/bachapin/MIE-MCServer/util/backup.py", line 4, in <module>
from .configuration import Maintenance
File "/home/bachapin/MIE-MCServer/util/configuration.py", line 1, in <module>
from .mielib import custominput as ci
File "/home/bachapin/MIE-MCServer/util/mielib/custominput.py", line 5, in <module>
from util.cron import CronDate, CronFrequency
File "/home/bachapin/MIE-MCServer/util/cron.py", line 3, in <module>
from util.date import Date
File "/home/bachapin/MIE-MCServer/util/date.py", line 2, in <module>
from .extension import string_contains, stringContainsAnyCase
File "/home/bachapin/MIE-MCServer/util/extension.py", line 3, in <module>
def cleanString(haystack: str, needles: list[str]) -> str:
TypeError: 'type' object is not subscriptable
Investigation is required!
I just checked the server, out of curiosity, to see if there were any backups. The directory has not been made (which that functionality should have been added), and the according to CronTab there is a task to run the backup script.