Need help starting the relay server

Hi, after many tries I have run out of ideas of how to set up the relay server. My target is to use my raspberry pi which is currently not doing much to help the community.

So my problem is, that every time I start I get this output (both raspberry and my laptop looks the same although versions differ considerably). Here is output from my laptop:

[kajman@kajman-pc ~]$ syncthing-relaysrv -debug 
2018/11/17 10:03:09 main.go:149: strelaysrv v0.14.52 (go1.11.2 linux-amd64) builduser@svetlemodry     2018-11-07 19:56:56 UTC
2018/11/17 10:03:09 main.go:155: Connection limit 838860
2018/11/17 10:03:09 main.go:194: ID: JTV3Z45-PMF5KW2-DRV4GXI-AFW3E55-YIVJWJR-ANSIXJG-7CT33TD-72NAMQT
2018/11/17 10:03:09 main.go:244: URI: relay://0.0.0.0:22067/?id=JTV3Z45-PMF5KW2-DRV4GXI-AFW3E55-YIVJWJR-ANSIXJG-7CT33TD-72NAMQT&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=
2018/11/17 10:03:09 main.go:247: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2018/11/17 10:03:09 main.go:248: !!  Joining default relay pools, this relay will be available for public use. !!
2018/11/17 10:03:09 main.go:249: !!      Use the -pools="" command line option to make the relay private.      !!
2018/11/17 10:03:09 main.go:250: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2018/11/17 10:03:09 pool.go:16: Joining https://relays.syncthing.net/endpoint
2018/11/17 10:03:10 pool.go:61: https://relays.syncthing.net/endpoint unknown response type from server 400

The problems I see are the adress being 0.0.0.0 and the response from server is always unknown error 400. I looked my ID up on https://relays.syncthing.net/endpoint but it’s not there.

I followed the setup instructions and added:

iptables -I INPUT -p tcp --dport 22067 -j ACCEPT
iptables -I INPUT -p tcp --dport 22070 -j ACCEPT

to my router firewall and also I’ve setup port forwarding from WAN to my local-pc to the same ports.

What am I missing here? How can I debug it further?

Is it behind a NAT? If yes, you need to setup port forwarding.

Thanks, I did it the following way:

I have a port forwarding done the same way for ssh and this works correctly.

I cannot believe it, I just noticed this on screenshot, the ports in forwarding are wrong! I used 20067 instead of 22067!

Ok, after fixing this issue I get:

pi@malina:~ $ sudo -u relaysrv strelaysrv -keys /etc/relaysrv -debug
2018/11/17 13:15:25 main.go:138: strelaysrv v0.14.18-dfsg1 (go1.7.4 linux-arm) debian@debian 2017-04-06 06:17:39 UTC
2018/11/17 13:15:25 main.go:144: Connection limit 3276
2018/11/17 13:15:25 main.go:183: ID: KGHYUNF-ZC2KNJI-NMRMSBR-WEBPIYD-A6HI6YP-46I2JSJ-JGMY7BQ-SCFOJQ4
2018/11/17 13:15:25 main.go:233: URI: relay://0.0.0.0:22067/?id=KGHYUNF-ZC2KNJI-NMRMSBR-WEBPIYD-A6HI6YP-46I2JSJ-JGMY7BQ-SCFOJQ4&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=0&globalLimitBps=0&statusAddr=:22070&providedBy=
2018/11/17 13:15:25 main.go:236: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2018/11/17 13:15:25 main.go:237: !!  Joining default relay pools, this relay will be available for public use. !!
2018/11/17 13:15:25 main.go:238: !!      Use the -pools="" command line option to make the relay private.      !!
2018/11/17 13:15:25 main.go:239: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2018/11/17 13:15:25 pool.go:17: Joining https://relays.syncthing.net/endpoint
2018/11/17 13:15:27 listener.go:48: Listener accepted connection from 82.196.13.137:48914 tls true
2018/11/17 13:15:28 listener.go:48: Listener accepted connection from 82.196.13.137:48916 tls true
2018/11/17 13:15:29 listener.go:107: Message protocol.ConnectRequest from 5Z5RKWI-3J5ZYBL-7OACX7H-ASCA66T-JDTLRQZ-QNVTCR4-4XL4KOI-WDFVXQV
2018/11/17 13:15:29 listener.go:148: 5Z5RKWI-3J5ZYBL-7OACX7H-ASCA66T-JDTLRQZ-QNVTCR4-4XL4KOI-WDFVXQV is looking for 5Z5RKWI-3J5ZYBL-7OACX7H-ASCA66T-JDTLRQZ-QNVTCR4-4XL4KOI-WDFVXQV which does not exist
2018/11/17 13:15:29 listener.go:205: Closing connection 5Z5RKWI-3J5ZYBL-7OACX7H-ASCA66T-JDTLRQZ-QNVTCR4-4XL4KOI-WDFVXQV: read tcp 192.168.1.231:22067->82.196.13.137:48914: use of closed network connection
2018/11/17 13:15:29 listener.go:205: Closing connection 5Z5RKWI-3J5ZYBL-7OACX7H-ASCA66T-JDTLRQZ-QNVTCR4-4XL4KOI-WDFVXQV: EOF
2018/11/17 13:15:29 pool.go:62: https://relays.syncthing.net/endpoint unknown response type from server 400

Still no luck. What does the 82.196.13.137:48914: use of closed network connection mean?

It looks ok to me. Perhaps the PI is a bit slow to respond, but I think it would probably retry in some time and might be ok.

I guess you can try to restart the process to force it to retry the test.

How long does it usually take to connect to the pool? I started it 15 minutes ago again and still it does not show up in the pool.

I can go to MY-EXTERNAL-IP:22070/status and see the status output without a problem, so why would it not connect?

Ok, I figured it out. I had some additional rules (open ports and some iptable custom rules) from my last try to make it work when the port forwarding was wrong.

I deleted all of them and now it connects right away and seems to work - I can see my relay on the https://relays.syncthing.net/ although no transfer yet.

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