listenAddress: too many colons in address

Hi folks,

I’m just getting started with syncthing and am pretty much excited by all its features, its awesome documentation and … yeah, the project in general. That being said, I’m in a bit of a deadlock just now.

What I’m trying to do:

  • Make my syncthing client instance listen to tcp4://0.0.0.0:22000
  • At the same time listen to relay://my.relay.server:22067/?id=MY-RELAY-HASH

My use case is, that on the one hand I want to listen on all IPv4 addresse for local discovery and on my relay for global discovery.

The documentation states:

multiple can be specified by comma separation

This leads me to believe, that something like that should be a valid listenAddress:

tcp4://0.0.0.0:22000,relay://my.relay.server:22067/?id=MY-RELAY-HASH

That’s not the case. I’m getting an error saying:

[Z755E] 23:05:10 INFO: Listen (BEP/tcp): address 0.0.0.0:22000,relay:: too many colons in address
[Z755E] 23:05:10 INFO: c.S.listenerSupervisor: Failed service 'tcp4://0.0.0.0:22000,relay://my.relay.server:22067/?id=MY-RELAY-HASH' (1.000000 failures of 2.000000), restarting: true, error: "{tcp4://0.0.0.0:22000,relay://my.relay.server:22067/?id=MY-RELAY-HASH tcp4://0.0.0.0:22000,relay://my.relay.server:22067/?id=MY-RELAY-HASH} returned unexpectedly", stacktrace: [unknown stack trace]

My syncthing version is: v1.2.2, Linux (64 bit)

If anybody has an idea, I’d be interested to hear your opinion.

Might be misleading. In the GUI you use comma separation. In the config they should be separate tags. Which are you doing?

Hi @calmh,

I was working in the config file.

You are right. Adding two listenAddresses in the GUI, seperated by a comma, leads to the same config that would manually be achieved by this in config.xml:

<listenAddress>tcp4://0.0.0.0:22000</listenAddress>
<listenAddress>relay://my.relay.server:22067/?id=MY-RELAY-HASH</listenAddress>

Would you care for a pull request for the documentation pages to clarify this? :slight_smile:

Cheers Thomas

That would be great. That article is primarily about the config format and should explain how that works. I guess it’s also linked from the GUI, so a note of some sort would be a appropriate.

PR created: https://github.com/syncthing/docs/pull/468/files

Cheers Thomas

1 Like