I am using odriveagent to backup my server over to Amazon Cloud Drive automatically (against their TOS but it’s way cheaper than other solutions). It’s been working great for a week and today i wanted to check if it deleted the old backup (have a 1 week rotation) from the Cloud.
It did not but that was my fault as i didn’t implement the empty trash command in my scripts. First i tried running the command manually but i never got a response (waited like 30 mins) so i exited with ctrl+c and tried to get a status report from the agent, didn’t do anything so i exited that too. Tried killing the process and starting it over but got same results. On each ctrl-c i get a banch of exceptions (a couple times i got no exceptions at all) on my console which seem random.
My setup is Centos 7.4 with cPanel and CSF Firewall. The only thing that has changed after the last time i got output from the agent is the CSF Firewall so i suspected something is keeping the agent from functioning properly. I disabled CSF and tried to get a status, same result. The agent continues to sync but i am unable to perform any other task with it, even status. Moreover; i get same results if i kill the agent process and try to get a status without it running (which should return a warning about the agent not running but i get nothing).
Some of the exceptions:
^CException in thread RemoteScanController (most likely raised during interpreter shutdown)
^CException in thread EncryptionJobsRun (most likely raised during interpreter shutdown):Exception in thread BackupJobController (most likely raised during interpreter shutdown)
^CException in thread HeartbeatControllerStop (most likely raised during interpreter shutdown
^CException in thread HeartbeatControllerStop (most likely raised during interpreter shutdown):Exception in thread RemoteEventController (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File “/home/ubuntu/hudson/workspace/Odrive_Lnx_Agent_64/deploy/output/artifacts/build/odriveagent/LinuxOdriveAgent/out00-PYZ.pyz/threading”, line 801, in __bootstrap_inner
Exception in thread AutoUnsyncController (most likely raised during interpreter shutdown): File “/home/ubuntu/hudson/workspace/Odrive_Lnx_Agent_64/deploy/output/artifacts/build/odriveagent/LinuxOdriveAgent/out00-PYZ.pyz/threading”, line 754, in runException in thread RemoteScanController (most likely raised during interpreter shutdown)
Overall my server is stable and with minimal load. Anyone has got a clue why this happened or how to restore the agent’s functionality?
Hi @rallisf1,
The errors you see are just due to the abrupt termination of the app when you do the ctrl+c.
The empty trash command can take a long time to complete, if there are lots and lots of items in there. It doesn’t provide any intermediate feedback, so seeing no output while it does that is expected.
When you issue the status command, do you get anything back, or does it appear to just hang?
What if you issue the status --trash command?
How many items do you think are currently in the trash?
All commands just hang, including the status --trash .
Atm there should be ~200 files in trash, total of 5.9GB
The thing is that in a couple hours when my backups run those numbers will double and so on.
Hi @rallisf1,
That is definitely odd. If the client can’t communicate it will usually error. Since agent is still syncing, it does seem as though something is interfering with the communication between the CLI and the agent.
Assuming you installed using the default method, you should have some log files in ~/.odrive-agent/log. In there is the agent.log which will list the port that the agent is listening on for the CLI. see if you are able to hit that port with nc (netcat) like this: nc -z -v 127.0.0.1 <port number here>
For example: nc -z -v 127.0.0.1 55584
You should see a message like this: Connection to 127.0.0.1 55584 port [tcp/*] succeeded!
If you issue a command like netstat -nlp you should also see that port listed for odriveagent.
netcat connects (-z option doesn’t exist though).
Error log is empty.
Backup log seems normal (just started and finished messages)
Agent log does 1 strange thing. Whenever i try to run a command on the agent (status/empty trash/etc) it changes the port! Apart from that it just counts the deleted items and adds them to trash (internal db i guess).
Since sync works, and i don’t want to break it, maybe i should empty trash through the python script? Will it have access to the trash though? Haven’t tested it yet.
Hi @rallisf1,
That is really strange. The port should only change when the agent (re)starts. Can you see if the odriveagent process id changes also when this happens?
When you connected with netcat, did it do the same thing?
God i am a total moron hahahah
I was running the commands like "$HOME/.odrive-agent/bin/odriveagent" status
instead of "$HOME/.odrive-agent/bin/odrive" status
everything works as expected. sorry for wasting your time.