onedrive icon indicating copy to clipboard operation
onedrive copied to clipboard

Unable to start OneDrive service in LM 21.1 Cinnamon

Open mikespolk opened this issue 3 years ago • 4 comments

Environment: Linux Mint 21.1, Cinnamon 5.6.8. Kernel 5.15.0.73-generic.

I have installed the skilion onedrive sync and no try to activate onedrive background sync. As in the Configuration section, I issue systemctl --user enable onedrive command. However, it fails with this response: failed to enable unit: Unit file /etc/xdg/systemd/user/onedrive.service is masked In addition, when I look the onedrive.service file, it is 0 bytes in length and its type seems to be as follows: link to character device

How to correct the error and make onedrive sync in background?

mikespolk avatar Jun 19 '23 07:06 mikespolk

@mikespolk You are best to uninstall by following https://github.com/skilion/onedrive#uninstall , then ensuring that there are no remaining systemd service files lurking around.

Once that is done and your system is cleaned up, install the client the correct way following: https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md

abraunegg avatar Jun 19 '23 08:06 abraunegg

Thank you, that helped a lot! In fact, the instructions to follow in my LM21.1 case were very accurate: first the https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md and from there, the Debian+Ubuntu-specific install section, as clearly stated in the version table.

However, one problem is still left: After creating the config file with its sync_dir and skip_file sections and installing OneDrive as service, I keep getting this error constantly repeating:

user1@LM4:~$ journalctl --user-unit onedrive -f Jun 19 21:06:32 LM4 systemd[951]: onedrive.service: Failed with result 'exit-code'. Jun 19 21:06:36 LM4 systemd[951]: onedrive.service: Scheduled restart job, restart counter is at 3. Jun 19 21:06:36 LM4 systemd[951]: Stopped OneDrive Free Client. Jun 19 21:06:36 LM4 systemd[951]: Started OneDrive Free Client. Jun 19 21:06:36 LM4 onedrive[1631]: onedrive.service: ProtectHostname=yes is configured, but UTS namespace setup is prohibited (container manager?), ignoring namespace setup. Jun 19 21:06:36 LM4 onedrive[1631]: Configuration file successfully loaded Jun 19 21:06:36 LM4 onedrive[1631]: config file has been updated, checking if --resync needed Jun 19 21:06:36 LM4 onedrive[1631]: An application configuration change has been detected where a --resync is required Jun 19 21:06:36 LM4 systemd[951]: onedrive.service: Main process exited, code=exited, status=126/n/a Jun 19 21:06:36 LM4 systemd[951]: onedrive.service: Failed with result 'exit-code'. Jun 19 21:06:39 LM4 systemd[951]: onedrive.service: Scheduled restart job, restart counter is at 4. Jun 19 21:06:39 LM4 systemd[951]: Stopped OneDrive Free Client. Jun 19 21:06:39 LM4 systemd[951]: Started OneDrive Free Client. ...etc.

That is, after initial manual sync (which I terminated with Ctrl+C), no more files have synced from cloud.

How to correct or troubleshoot?

mikespolk avatar Jun 19 '23 18:06 mikespolk

Edit: After writing the previous, I found the reason. In fact, it was visible in the journal text itself: I had to terminate the onedrive process and then run the onedrive --resync one more time. When I then restarted the onedrive service, it was working OK.

@abraunegg Thank you for support!

mikespolk avatar Jun 19 '23 18:06 mikespolk

Edit: After writing the previous, I found the reason. In fact, it was visible in the journal text itself: I had to terminate the onedrive process and then run the onedrive --resync one more time. When I then restarted the onedrive service, it was working OK.

@abraunegg Thank you for support!

No problem - also this GitHub repository is not managed or maintained. Please post questions or support queries here: https://github.com/abraunegg/onedrive

abraunegg avatar Jun 19 '23 19:06 abraunegg