-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Error messages being uninformative #582
Comments
Exactly the same issue here.
My configuration is basically the same:
|
Hello,
Solution - try telnet or curl methods to reach out to your server and see whether you can talk to your server in the IP level or not. Try looking for the port opening and the firewall rules for the more debugging purpose. Regards, |
I think I have not been quite clear enough in my report, so I will try to clarify now: Nevertheless, I’m grateful for the input and appreciate the intention to help me fix the cause that is producing these errors! |
It's, basically, what the operating system tells us, and "connection refused" is clear enough to someone who has a bit of networking background. Not sure how OpenVPN could report this better except by adding lots of help texts + translations for every possible operating system error that could be returned. |
Well, I have a bit of networking background, I’d say, but seemingly not enough to understand it in this context. So given the config I pasted above: which host/IP is the "connection refused" coming from? Where is OpenVPN connecting to and why that might refuse the connection? |
The problem here is "we don't know". OpenVPN sends out an UDP packet, which succeeds (this can only fail with things like "this is not a valid socket file descriptor" or "out of kernel memory"). The system ends out the UDP packet to the remote host, and it gets refused by a firewall, a service that is no longer listening to that port, ..., and the system gets back an ICMP error packet. The kernel maps that to the socket where the UDP packet was sent, and on the next socket action the error messages is "piggybacked" on another send/receive operation - and it can be more than one error at the same time - but these errors are always related to "something we've done some time before". If there is only one peer (like, on the client) it's pretty clear which host is "not reachable anymore", but on the server it could be any one of the clients currently considered "active" (= keepalives and other packets are sent). We do not get back anything more useful from the kernel, like "which packet does this error relate to?" or "which intermediate host sent an ICMP error?". (Linux is actually much more verbose than most other OSes, who do not give us anything) |
I’m not sure whether I’m missing something or you are. My main question for the particular config I pasted is: where to would openvpn send a UDP packet that could cause this error? and why?
Thank you very much for elaborating, I was not aware of how this works. For the reasons given for the question above, I’m not sure it’s of much relevance, though. |
If you have no "remote" in your config, OpenVPN would send packets back to "the other end that contacted it", so, reply packets only (and it should never send anything "just so", because there is nothing to send to). To be sure what is going on, run the server with (As a side note, you explain that you generate a static key, and then show a server config with TLS and no static key, so "the particular config" is not exactly clear to me) |
@cron2 may I add a remark based on my first comment #2 on this topic? I still think there is something wrong with the version 2.6.3-1+deb12u2 on a debian 12 server.
So for me it looks like there is some timing/sequence issue. Something is closed/removed too early on the server side or something is sent out even if it should respect the exit notification of the client. Here is a full server log after I ended the connection on the client.
|
Describe the bug
I get messages in my log on the openvpn server that are very uninformative regarding both what they are trying to tell me and what condition they really refer to.
The first I encountered was:
After changing some things in my server config, it seems to have changed to
sometimes there are multiple ECONNREFUSED:
I have not the slightest idea what these messages mean or what might cause them. Among others my questions are:
Which IP attempted to connect to which IP and port? In particular: is that an incoming or an outgoing connection?
What do the multiple ECONNREFUSED mean?
What does it mean?
What could be wrong?
To Reproduce
Generate a key:
run a server with following config:
Expected behavior
I would expect this log message to either contain or be accompanied by some more context to understand what is really happening and why this is worth logging.
Version information (please complete the following information):
The text was updated successfully, but these errors were encountered: