GUI doesn't start on system start (daemon starts fine)

Hi.

I installed syncthing a while ago on my Ubuntu 18.04 machine, and the web UI started up fine.

After some upgrades (can’t say exactly when) the web UI didn’t start up anymore. The Daemon starts find, as all my devices sync without issues. The Web UI just doesn’t start.

When I restart the service manually (using sudo systemctl stop syncthing@diederik.service and sudo systemctl start syncthing@diederik.service) Then it comes up fine.

config file snippet:

    <gui enabled="true" tls="false" debugging="false">
        <address>127.0.0.1:8384</address>
        <theme>dark</theme>
    </gui>

I can’t see any obvious errors in the logs.

According to the logs, I’m running 1.3.0 of Syncthing.

The service is run as my user, not as root.

When I stop the service it is killed with a timeout. From logs:

Oct 27 13:52:38 pappa-beer systemd[1]: syncthing@diederik.service: State 'stop-sigterm' timed out. Killing.
Oct 27 13:52:38 pappa-beer systemd[1]: syncthing@diederik.service: Killing process 1002 (syncthing) with signal SIGKILL.
Oct 27 13:52:38 pappa-beer systemd[1]: syncthing@diederik.service: Main process exited, code=killed, status=9/KILL
Oct 27 13:52:38 pappa-beer systemd[1]: syncthing@diederik.service: Failed with result 'timeout'.
Oct 27 13:52:38 pappa-beer systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for diederik.

Successful startup of the web UI reports:

Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: Completed initial scan of sendreceive folder "XYZ-sync " (XXYYZZ-XXDDGG)
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: GUI and API listening on 192.168.0.2:8384
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: Access the GUI via the following URL: http://192.168.0.2:8384/
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: My name is "machine-name"
Oct 27 13:54:00 machine-name syncthing[3700]: [3FKCR] INFO: Device XXYYZZZ is "Phone-name" at [dynamic]
Oct 27 13:54:01 machine-name syncthing[3700]: [3FKCR] INFO: Completed initial scan of receiveonly folder "Phone-name" (XXYYZZ)

This is just a slight pain, as I have to restart the service every time I have to do something on the Web UI.

The configs and the logs do not line up, seems the ips are different.

You can try sending a sigquit once it’s stuck, and get the stacktraces from the logs.

After calling kill -s SIGQUIT <PID of syncthing>, logs contained the following:

Link to logs

Before I sent the Quit signal I see this in the logs as well:

[3FKCR] WARNING: Failed starting API: listen tcp 192.168.0.2:8384: bind: cannot assign requested address

haven’t seen this before, and wonder if it is related.

You’ve set GUI address to an address the machine does not have. That’s why I said the config and the logs does not line up. I suspect you might have multiple configs

The file I’m editing is at ~/.config/syncthing/config.xml. Seems that changing the address field to 192.168.0.2:8384 doesn’t fix it either.

You should not set it to that address, as that address seems to be the address causing issues.

I suspect ~/.config/syncthing/config.xml is not the config file actually being used by systemd. It might be running as a system service with the config elsewhere or as a different user.

When I changed the GUI settings (user name for instance) the values of that config file changes. I suspect it is the config file used.

Perhaps the address is then overridden by an env var, if that is what consistently comes up in the logs.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.