Connection handshake timeout

This forum is for everyone having trouble with linking two UnrealIRCd servers

Moderator: Supporters

Locked
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Connection handshake timeout

Post by Suratka »

Hello everyone,
I went from unrealircd 4.2.6 to unrealircd 5.0.6
I want to link three servers on three different vps, THE A server that is linked with the services in localhost. I linked server B to server A and everything is ok. I installed a new server (C) on a new vps and I linked it to server A, but it gives me an error. NoN connects and this is the message it sends:

Code: Select all

serverC.irc.com : Connection handshake timeout while trying to link to server 'serverA.irc.com' (90.90.XX.XX)
then to do a test I tried to link the new server C with server B and everything went ok. Server C has connected to server B and consequently to the net.
Then with the same configurations I tried again to connect server C to server A, but still the same problem:

Code: Select all

serverC.irc.com : Connection handshake timeout while trying to link to server 'serverA.irc.com' (90.90.XX.XX)
I'm sure I didn't do anything wrong. Proof is the fact that I was able to link C with B without problems.
Can you tell me what the problem is?
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Connection handshake timeout

Post by Syzop »

I would suggest checking if the port is open with 'nc' (install the 'nc' tool if needed via apt-get or yum). Run the following commands all on server 'C':
nc -v [ipofserverB] [port]
eg: nc -v 1.2.3.4 6697
You said linking from C to B works, so I would expect you to see something like "Connection to xxxx succeeded!". This means the port is open (=good). If you see nothing then the port is closed (=bad). Use CTRL+C to get back to the shell prompt.

Now, try the same (again on server C) to server A:
nc -v [ipofserverA] [port]
eg: nc -v 5.5.5.5 6697
You should see something like "Connection to xxxx succeeded!". If you don't, then it means it cannot connect to this ip/port combination.
If it cannot connect, then check the firewall on server 'A' and make sure the listen blocks on server 'A' are correct, and of course.. that you are using the correct ip/port for server 'C'. Also note that firewalls nowadays usually exist both in Linux (the VM) and in many VPS admin interfaces (web interface), so for opening up an incoming port nowadays you often have to configure a firewall at two places.

You can do the same tests with 'nc' from server 'B' to server 'A', if you get different results that points to a firewall issue as well.
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: Connection handshake timeout

Post by Suratka »

hello and thanks for speaking.
As you well know, I am not an expert, and every problem that arises I ask for help from you of the forum, even when it does not depend on unreralircd, as in this case I suppose.
So I tried to do as you suggested. I gave the command:
On server A (the central one)
nc -v XX.XX.XX.C port
and I had the answer: succeded.
Then I went to server C (the new one) and gave the command: nc -v XX.XX.XX.A port. and as an answer I got "nothing" practically no answer.
From both servers A and C I tried the command to server B and the responses were always positive.
can you help me?
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: Connection handshake timeout

Post by Suratka »

hi syzop. Somehow I solved it, I'm not sure how and what I did, but I managed to link the new server with the central server.
At this point I have another question and this is pertinent to unrealircd.
The net I created is made by VPS1 on which I installed central unrealircd and services anope, both connected to localhost, then the other two unrealircd installed on VPS2 and VPS3 respectively.
which link to unrealircd of VPS1
so if unrealircd of the vps1 falls they all fall, I wonder if it is possible to make a type of link between servers where if the Central server falls, the others remain connected to each other. is it possible is what? ie link "B" and "C" to "A", but also "B" to "C", so if "A" falls, "B" and "C" remain connected.
is this possible?
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Connection handshake timeout

Post by Syzop »

Personally, with 3 servers, I would just add 2 link blocks (for A+C) on B, and 2 link blocks (for A+B) on C... with autoconnect... then each server will connect to one or the other, no matter what happens. Personally I wouldn't care much about how it ends up linked.

But if you do want to enforce a topology, then (in addition to the above, which you have to do anyway), then you can use https://www.unrealircd.org/docs/Deny_link_block. That way you can have, for example, server B reject a link from C when server A is already linked, so B will end up linking to A in most cases. That page is not documented well, though, so probably not of much help to you at the moment.
Suratka
Posts: 72
Joined: Thu Nov 14, 2019 12:32 am
Contact:

Re: Connection handshake timeout

Post by Suratka »

thanks syzop, you are always available and exhaustive in the answers.
Locked