We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Following instructions, yet: "Cannot contact daemon, are you sure it is running?


fatso83
05-04-2015, 11:27 AM
Quote Originally Posted by jdesgats
My guess is that the user who run the program don't have the right permissions.
You were right. It was the `sudo` command that did it. When using `sudo` it is like the DBUS environment variable was not picked up. After I removed the sudo part I also had to remove the `--password_path=/etc/hubic/password` part, as I no longer could access that file without root-rights. But after picking up my password it exited successfully, and I could read a lot more additional details from the `main-loop process`:

Code:
hubic main-loop --verbose
[INFO | 5/4/2015 12:22:17 PM | Ovh.Hubic.Backend.HubicAccountHandler..ctor] Initialize backend: Application=hubic-sync, Version=2.1.0.53, OS=unix 3.19.0.15
[INFO | 5/4/2015 12:22:18 PM | Ovh.Hubic.Sync.Linux.CLI.Server.MainLoop] Application starts (Version: 2.1.0.53-64; Platform: Unix 3.19.0.15)
[DEBUG | 5/4/2015 12:22:18 PM | Ovh.Hubic.Sync.Linux.CLI.Server.MainLoop] Use native FS watcher: True
[INFO | 5/4/2015 12:22:18 PM | Ovh.Hubic.Sync.Model.Login] Log in with existing setup on account myuser@gmail.com.
[DEBUG | 5/4/2015 12:22:18 PM | Ovh.Hubic.Sync.Model.WaitForInternetConnectivity] Checking for Internet connectivity...
[DEBUG | 5/4/2015 12:22:19 PM | Ovh.Hubic.Sync.Model.WaitForInternetConnectivity] Checking for Internet connectivity...
[INFO | 5/4/2015 12:22:24 PM | Ovh.Hubic.Backend.Swift.SwiftCredentialsHolder.RefreshCredentials] Renew Swift token...
[DEBUG | 5/4/2015 12:22:27 PM | Ovh.Hubic.Sync.RootPathController.AddRemoteContainer] Add synchronization dir default =>  (disabled)
[DEBUG | 5/4/2015 12:22:27 PM | Ovh.Hubic.Sync.Model.OnLogin] Connect...
[DEBUG | 5/4/2015 12:22:27 PM | Ovh.Hubic.Sync.AI.Publication.GetPublicationList] Check publications.
This is nice, but the main problem still persists: how do I start this at startup (on a fresh boot)? It is a bit hard to reason about where the configuration lies, and what user to start up the process as. Usually a start up script, such as /etc/rc.local would start the daemon, but will this only have access to the same stored password and/or config as the user owning the process? And is the password persisted between reboots? I think these questions should be answered by the linux thread, or some other documentation (linked from the thread).
--
EDIT I see that some of these answers are answered by the man page, which is great! But some are not, and some further elaboration in order to get init-scripts working would be great.

fatso83
05-04-2015, 11:14 AM
Code:
hubic main-loop --verbose
[INFO | 5/4/2015 12:11:51 PM | Ovh.Hubic.Backend.HubicAccountHandler..ctor] Initialize backend: Application=hubic-sync, Version=2.1.0.53, OS=unix 3.19.0.15
[INFO | 5/4/2015 12:11:52 PM | Ovh.Hubic.Sync.Linux.CLI.Server.MainLoop] Application starts (Version: 2.1.0.53-64; Platform: Unix 3.19.0.15)
[DEBUG | 5/4/2015 12:11:52 PM | Ovh.Hubic.Sync.Linux.CLI.Server.MainLoop] Use native FS watcher: True
Then nothing more happens. Waited five minutes. No more output. Of course, if I don't export the DBUS_SESSION_BUS_ADDRESS it fails with an exception.

jdesgats
05-04-2015, 10:01 AM
Hello,

Can you try to run
Code:
$ hubic main-loop --verbose
and give me the output ? It should display the exact error that occurs. My guess is that the user who run the program don't have the right permissions.

fatso83
04-30-2015, 03:23 PM
Some more debug output, if that is helpful. This is when starting the service via an init script. I am posting this as well, as this has some more info that cannot be seen above, that seems to directly reference the .NET-classes, so maybe this is helpful.

Code:
Apr 30 16:19:02 timbuktu systemd[1]: Starting LSB: starts the hubiC synchronization client...
-- Subject: Unit hubic.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit hubic.service has begun starting up.
Apr 30 16:19:02 timbuktu hubic[19184]: * Starting hubiC
Apr 30 16:19:03 timbuktu com.hubiC[19190]: Command failed: An exception was thrown by the type initializer for Ovh.Hubic.Sync.Library.Interface.Constant.Miscellaneous.
Apr 30 16:19:03 timbuktu hubic[19184]: Command failed: org.freedesktop.DBus.Error.Spawn.ChildExited: Process com.hubiC exited with status 2.
Apr 30 16:19:03 timbuktu hubic[19184]: ...fail!
Apr 30 16:19:03 timbuktu hubic[19184]: * login failed
Apr 30 16:19:03 timbuktu systemd[1]: hubic.service: control process exited, code=exited status=3
Apr 30 16:19:03 timbuktu systemd[1]: Failed to start LSB: starts the hubiC synchronization client.
-- Subject: Unit hubic.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit hubic.service has failed.
--
-- The result is failed.
Apr 30 16:19:03 timbuktu systemd[1]: Unit hubic.service entered failed state.
Apr 30 16:19:03 timbuktu systemd[1]: hubic.service failed.

fatso83
04-29-2015, 03:03 PM
Following the instructions for the linux client, but still I get Cannot contact daemon, are you sure it is running?

Terminal one:
Code:
$ dbus-daemon --session --nofork --print-address
unix:abstract=/tmp/dbus-Y3AybKjQDr,guid=f27c8a1eda2277ea31b965035540e33b
Terminal two:
Code:
export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Y3AybKjQDr,guid=f27c8a1eda2277ea31b965035540e33b
sudo hubic login --password_path=/etc/hubic/password myuser@email.com
[sudo] password for myuser:
Cannot contact daemon, are you sure it is running?
I am running the latest Ubuntu release:
Code:
$ lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid