Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to handshake with the server #27

Open
ghost opened this issue Nov 25, 2018 · 2 comments
Open

Unable to handshake with the server #27

ghost opened this issue Nov 25, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 25, 2018

I wanted to connect from my minnowboard running Ubuntu18.04 to my VPS deployed in HK with gohop. But the handshaking could not be done after both server and client have been correctly configured according to the manual. After diagnosing with several potential causes, i finally found that the ports in the range specified in the server.ini are listened by the server only for udp6 addresses as my ISP does not really support ipv6 addressing. Even if I disabled the ipv6 on the server side, the ports are still listened only for udp6. This may be the cause of the problem. Here is the netstat output:
udp6 0 0 [::]:40100 [::]:* udp6 0 0 [::]:40101 [::]:* udp6 0 0 [::]:40102 [::]:* udp6 0 0 [::]:40103 [::]:* udp6 0 0 [::]:40104 [::]:* udp6 0 0 [::]:40105 [::]:* udp6 0 0 [::]:40106 [::]:* udp6 0 0 [::]:40107 [::]:* udp6 0 0 [::]:40108 [::]:* udp6 0 0 [::]:40109 [::]:* udp6 0 0 [::]:40110 [::]:* udp6 0 0 [::]:40111 [::]:* udp6 0 0 [::]:40112 [::]:* udp6 0 0 [::]:40113 [::]:* udp6 0 0 [::]:40114 [::]:* udp6 0 0 [::]:40115 [::]:* udp6 0 0 [::]:40116 [::]:* udp6 0 0 [::]:40117 [::]:* udp6 0 0 [::]:40118 [::]:* udp6 0 0 [::]:40119 [::]:* udp6 0 0 [::]:40120 [::]:* udp6 0 0 [::]:40121 [::]:* udp6 0 0 [::]:40122 [::]:* udp6 0 0 [::]:40123 [::]:* udp6 0 0 [::]:40124 [::]:* udp6 0 0 [::]:40125 [::]:* udp6 0 0 [::]:40126 [::]:* udp6 0 0 [::]:40127 [::]:* udp6 0 0 [::]:40128 [::]:* udp6 0 0 [::]:40129 [::]:* udp6 0 0 [::]:40130 [::]:* udp6 0 0 [::]:40131 [::]:* udp6 0 0 [::]:40132 [::]:* udp6 0 0 [::]:40133 [::]:* udp6 0 0 [::]:40134 [::]:* udp6 0 0 [::]:40135 [::]:* udp6 0 0 [::]:40136 [::]:* udp6 0 0 [::]:40137 [::]:* udp6 0 0 [::]:40138 [::]:* udp6 0 0 [::]:40139 [::]:* udp6 0 0 [::]:40140 [::]:* udp6 0 0 [::]:40141 [::]:* udp6 0 0 [::]:40142 [::]:* udp6 0 0 [::]:40143 [::]:* udp6 0 0 [::]:40144 [::]:* udp6 0 0 [::]:40145 [::]:* udp6 0 0 [::]:40146 [::]:* udp6 0 0 [::]:40147 [::]:* udp6 0 0 [::]:40148 [::]:* udp6 0 0 [::]:40149 [::]:* udp6 0 0 [::]:40150 [::]:* udp6 0 0 [::]:40151 [::]:* udp6 0 0 [::]:40152 [::]:* udp6 0 0 [::]:40153 [::]:* udp6 0 0 [::]:40154 [::]:* udp6 0 0 [::]:40155 [::]:* udp6 0 0 [::]:40156 [::]:* udp6 0 0 [::]:40157 [::]:* udp6 0 0 [::]:40158 [::]:* udp6 0 0 [::]:40159 [::]:* udp6 0 0 [::]:40160 [::]:* udp6 0 0 [::]:40161 [::]:* udp6 0 0 [::]:40162 [::]:* udp6 0 0 [::]:40163 [::]:* udp6 0 0 [::]:40164 [::]:* udp6 0 0 [::]:40165 [::]:* udp6 0 0 [::]:40166 [::]:* udp6 0 0 [::]:40167 [::]:* udp6 0 0 [::]:40168 [::]:* udp6 0 0 [::]:40169 [::]:* udp6 0 0 [::]:40170 [::]:* udp6 0 0 [::]:40171 [::]:* udp6 0 0 [::]:40172 [::]:* udp6 0 0 [::]:40173 [::]:* udp6 0 0 [::]:40174 [::]:* udp6 0 0 [::]:40175 [::]:* udp6 0 0 [::]:40176 [::]:* udp6 0 0 [::]:40177 [::]:* udp6 0 0 [::]:40178 [::]:* udp6 0 0 [::]:40179 [::]:* udp6 0 0 [::]:40180 [::]:* udp6 0 0 [::]:40181 [::]:* udp6 0 0 [::]:40182 [::]:* udp6 0 0 [::]:40183 [::]:* udp6 0 0 [::]:40184 [::]:* udp6 0 0 [::]:40185 [::]:* udp6 0 0 [::]:40186 [::]:* udp6 0 0 [::]:40187 [::]:* udp6 0 0 [::]:40188 [::]:* udp6 0 0 [::]:40189 [::]:* udp6 0 0 [::]:40190 [::]:* udp6 0 0 [::]:40191 [::]:* udp6 0 0 [::]:40192 [::]:* udp6 0 0 [::]:40193 [::]:* udp6 0 0 [::]:40194 [::]:* udp6 0 0 [::]:40195 [::]:* udp6 0 0 [::]:40196 [::]:* udp6 0 0 [::]:40197 [::]:* udp6 0 0 [::]:40198 [::]:* udp6 0 0 [::]:40199 [::]:* udp6 0 0 [::]:40200 [::]:*

@ghost
Copy link
Author

ghost commented Nov 25, 2018

It may be a potential bug that errors occur when the range of ports to listen on the server side is too large. You may fix this by adding a limitation on the port range.

when my config looks like this:

port range to listen hopstart = 40000 hopend = 50000

error output

server side:

2018/11/25 00:39:52 server.go:175: ERROR: Failed to listen udp port :45503: listen udp :45503: too many open files 2018/11/25 00:39:52 server.go:175: ERROR: Failed to listen udp port :45503: listen udp :45503: too many open files 2018/11/25 00:39:52 server.go:175: ERROR: Failed to listen udp port :45504: listen udp :45504: too many open files 2018/11/25 00:39:52 server.go:175: ERROR: Failed to listen udp port :45504: listen udp :45504: too many open files 2018/11/25 00:39:52 server.go:175: ERROR: Failed to listen udp port :45505: listen udp :45505: too many open files x N

client side:

`goroutine 11954 [runnable]:
github.com/bigeagle/gohop/hop.func·007()
/home/bigeagle/workspace/golang/src/github.com/bigeagle/gohop/hop/client.go:241
created by github.com/bigeagle/gohop/hop.(*HopClient).handleUDP
/home/bigeagle/workspace/golang/src/github.com/bigeagle/gohop/hop/client.go:251 +0x5ad

goroutine 11955 [runnable]:
github.com/bigeagle/gohop/hop.func·006()
/home/bigeagle/workspace/golang/src/github.com/bigeagle/gohop/hop/client.go:220` x N

@ghost
Copy link
Author

ghost commented Nov 25, 2018

@bigeagle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants