ODrive Linux Agents doesn't sync - just exit

When I’ll just installed odrive linux agent - all worked just fine for first week

I have synced folder at ~/GoogleDrive_ODrive

But now, it seems odrive agent just crushes:

vital@vital-Ideapad-S100c:~$ ohup /home/vital/.odrive-agent/bin/odriveagent > /dev/null 2>&1 &
[1] 1127
vital@vital-Ideapad-S100c:~$ python “$HOME/.odrive-agent/bin/odrive.py” syncstate ~/GoogleDrive_ODrive
There was an error sending the command, please make sure odrive agent or desktop is running.
[1]+ Exit 127 ohup /home/vital/.odrive-agent/bin/odriveagent > /dev/null 2>&1

Please help :slight_smile:

I just noticed that in ~/.odrive-agent/log/agent.log lines

08 Mar 11:21:25PM INFO 1 days remaining Your premium features expire in 1 days. Please upgrade your account for uninterrupted service.
08 Mar 11:21:25PM INFO Request to render premium-required dialog
09 Mar 11:21:31PM INFO Request to render premium-required dialog
10 Mar 04:14:52PM INFO protocol server started on port: 43538

I think it’s somehow related to my issue… I thought I don’t use premium features - how can I check it?

Hi @vitaliy.shcherbina,
Free vs premium shouldn’t effect anything with startup and general features.

Can you try running odriveagent in the foreground? (just run /home/vital/.odrive-agent/bin/odriveagent) and see if it exits with any errors?

I tried - it runs, and there are no errors - see screenshots
image

Hi @vitaliy.shcherbina,
It looks like the agent is running, so it may be an issue with communicating with the agent port.

Try opening a new terminal session and run this command:
netstat -lp | grep odriveagent

This will list the ports that the odriveagent is listening on.

Then we can look at the port defined in the odrive registry file:
cat ~/.odrive-agent/.oreg

The .oreg port listed should match a listening port on odriveagent. If it does then we know odrive is at least listening and the CLI should be trying to hit the listening port.

Do you get the same error when running the python /home/vital/.odrive-agent/bin/odrive.py status command?

You can also check if the odriveagent port is accepting connections with a telent command, like this:
telnet 127.0.0.1 listening_port_number_from_.oreg_file_here
This command should connect and print “Connected to 127.0.0.1”

Is it possible that anything changed on the system that could now be blocking access to the odriveagent port? (firewall, network config changes, etc).

Hi @vitaliy.shcherbina,
In addition to the items in the above post, make sure that you are running the agent and the CLI with the same user. If they are not the same user you can have this issue, as well.

Hi, thank you for your help. That’s what I’ve seen when run /home/vital/.odrive-agent/bin/odriveagent in one terminal window, and those commands - in other one

vital@vital-Ideapad-S100c:~$ netstat -lp | grep odriveagent
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 localhost:36115 0.0.0.0:* LISTEN 2761/odriveagent
tcp 0 0 localhost:33973 0.0.0.0:* LISTEN 2761/odriveagent
vital@vital-Ideapad-S100c:~$ cat ~/.odrive-agent/.oreg
{“current”: {“protocol”: 36115}, “odrive-agent-prod”: {“protocol”: 36115}}vital@vital-Ideapad-S100c:~$ python /home/vital/.odrive-agent/bin/odrive.py status
odrive Make Cloud Storage THE WAY IT SHOULD BE.

odrive Make Cloud Storage THE WAY IT SHOULD BE.

isActivated: True hasSession: True
email: vitaliy.shcherbina@gmail.com accountType: Google
syncEnabled: True version: prod 946
placeholderThreshold: neverDownload autoUnsyncThreshold: never
downloadThrottlingThreshold: unlimited uploadThrottlingThreshold: normal
autoTrashThreshold: never Mounts: 1
xlThreshold: never Backups: 0

Sync Requests: 0
Background Requests: 0
Uploads: 0
Downloads: 0
Trash: 0
Waiting: 0
Not Allowed: 0

vital@vital-Ideapad-S100c:~$ telnet 127.0.0.1 36115
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.

I have only one user on that computer

Hi @vitaliy.shcherbina,
Since you are seeing the status message that means that the agent is running and the CLI is able to communicate with it. Is it only the syncstate command that is failing?

Try this command:
python /home/vital/.odrive-agent/bin/odrive.py status --mounts

And then try a refresh command on the root of the mount:
python /home/vital/.odrive-agent/bin/odrive.py refresh mount_folder_listed_in_mounts_command_here

Wel in case if i run it at background it still fails
vital@vital-Ideapad-S100c:~$ ohup /home/vital/.odrive-agent/bin/odriveagent > /dev/null 2>&1 &
[1] 5852
vital@vital-Ideapad-S100c:~$ python /home/vital/.odrive-agent/bin/odrive.py status --mounts
There was an error sending the command, please make sure odrive agent or desktop is running.
[1]+ Exit 127 ohup /home/vital/.odrive-agent/bin/odriveagent > /dev/null 2>&1

When I run agent in sparetee terminal session it seems ok

vital@vital-Ideapad-S100c:~$ python /home/vital/.odrive-agent/bin/odrive.py status --mounts
/home/vital/GoogleDrive_ODrive status:Active
status:None

vital@vital-Ideapad-S100c:~$ python /home/vital/.odrive-agent/bin/odrive.py refresh /home/vital/GoogleDrive_ODrive
Synced
.odrive
Google Drive
vital@vital-Ideapad-S100c:~$

Hi @vitaliy.shcherbina,
Ahhh… I was taking a closer look at your command and noticed you have ohup instead of nohup. Use nohup and it should work.

1 Like

Sorry, I’m a novice in Linux
Thank you so much!

No worries @vitaliy.shcherbina! I’m glad you are back up and running now.