Discovery server error: first path segment in URL cannot contain colon

I set up two discovery servers to be used along with default discovery servers. I have updated discovery server addresses as: default, https://url-1:8443/v2/?id=id1, https://url-2:8443/v2/?id=id2

However on some of the machines I am getting following error, while on other machines it works fine(which was odd). Global discovery: parse default, https://url1:8443/v2/?id=id1, https://url2:8443/v2/?id=id2 : first path segment in URL cannot contain colon.

I added port along with URL because if i just give url, i believe DNS sends the request to port 443. I could see some similar errors in google on other projects in go.

Is there a solution for this without changing the listen address to port 443 and any idea why do I get parse error only sporadically?

Thanks.

What are your actual URLs and settings? We can’t debug this on hypotheticals.

Sorry about that. attached config.xml

config.xml (4.5 KB)

Looks to me like it ought to work. Assuming of course that you’ve hijacked the domains in question in your local resolver or such.

Yeah it works, in fact this problem occurs only sporadically. Will use port 443 so that colons in url can be avoided. Thanks

I removed the colon due to port in url (i.e. :8443 ) by using port 443.

But even after that the issue occurred. So right now it is objecting to colon present for specifying the protocol https:// in the url. But if I remove the protocol https:// from url, it gives error invalid scheme

Any suggestions/pointers to either debug/resolve this issue ?

Are you sure it’s not complaining about the results returned from the discovery server, or something?

I tried a few times and can now reproduce the issue with decent frequency. I think its not complaining about results from discovery server because when the issue occurs, i query the discovery server database and the device was not registered with it.

I tried to restart syncthing few times but that did not help. But when I try to restart syncthing by toggling “enable Local discovery”, it was able to register with the same discovery server. No other change was made except toggling “enable local discovery” . And as a user I have tried my best to ensure that there is no mistake in me configuring syncthing.

I think the issue occurs when it tries to parse the urls and therefore does not make request to discovery server. Since I can reproduce the issue, do suggest any steps I can take to debug.

Thanks

Well, post the URLs you get back, given they come up as invalid?

If you can reproduce it, post the steps to do so and I’ll check it out.

I think I have isolated the issue on my end. But I am traveling now, will verify and provide update here. Thanks

Sorry for the delay. So there was a bug in my code which would in some case, incorrectly update the discovery server from default to list of comma separated servers instead of creating a new XML-element in options tag as mentioned in the docs.

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