kozec / syncthing-gtk

GTK3 & python based GUI for Syncthing
GNU General Public License v2.0
1.3k stars 138 forks source link

Errors when other applications are on port 8080 #199

Open ghost opened 9 years ago

ghost commented 9 years ago

If SyncThing-GTK expects SyncThing to be on port 8080, and another application is running a HTTP server on the same port, SyncThing doesn't fail gracefully, or help me restart SyncThing on another port - I can't even open the Settings screen until the other application has been shut down.

syncthing

kozec commented 9 years ago

Problem is, ST-GTK can't post configuration with changed port, if Syncting is not listening on port when configuration is posted normally.

But I can imagine modifying Daemon Settings dialog to write config.xml instead and placing button to that error message. I'll check what can be done.

ghost commented 9 years ago

Also checking for the error message when syncthing exits might help On 12 Sep 2015 07:41, "kozec" notifications@github.com wrote:

Problem is, ST-GTK can't post configuration with changed port, if Syncting is not listening on port when configuration is posted normally.

But I can imagine modifying Daemon Settings dialog to write config.xml instead and placing button to that error message. I'll check what can be done.

— Reply to this email directly or view it on GitHub https://github.com/syncthing/syncthing-gtk/issues/199#issuecomment-139777202 .

canton7 commented 8 years ago

Syncthing has a command-line flag to specify the host and port to listen on.

My approach is to scan for a free port, then start Syncthing specifying this port.

ghost commented 6 years ago

Quick and dirty fix, for anyone wondering: Change the port by modyfing /configuration/gui/address in ~/.config/syncthing/config.xml

calmh commented 6 years ago

If you don't mind parsing the console output you can let Syncthing do the allocation.

$ syncthing --gui-address=127.0.0.1:0 | grep 'API listening'
[I6KAH] 23:03:29 INFO: GUI and API listening on 127.0.0.1:50933
ifireball commented 2 years ago

Quick and dirty fix, for anyone wondering: Change the port by modyfing /configuration/gui/address in ~/.config/syncthing/config.xml

If you are using the syncthing-gtk FlatPak the configuration file would be in:

~/.var/app/me.kozec.syncthingtk/config/syncthing/config.xml