Open JoshuaPettus opened 9 months ago
On Thu, Feb 08, 2024 at 12:07:58PM -0800, Joshua Pettus wrote:
One issue I have been having since the very beginning is I keep getting "sprintaddr:getnameinfo: Temporary failure in name resolution" errors in the log.
Can you run sslh
under strace and see if something fails
upon resolution?
I tried running it under strace. It launches though strace quits once it does. Don't know if this is the output you are looking for
I forgot to mention the issue always seemed benign, which is why I took forever reporting it. It just seems odd.
ah yes, strace is losing sslh when it forks to detach and create a new session. Can you retry with strace -f
?
That makes sense! Good to know. I got it to go through the error a few times. Here is the output
Not sure what it means by
newfstatat(AT_FDCWD, "/etc/resolv.conf", 0x7fffd3a01c60, 0) = -1 ENOENT (No such file or directory
That file most certianly exists though it is a simlink to /run/systemd/resolve/resolv.conf as part of systemd's resolver. Could it be taking issue with that?
It's also failing to find /etc/hosts
. This could be a problem coming from the recent addition of Landlock, but I don't think 2.0.1 included that... Could you still check the startup traces (with verbose config dump at startup) if it says something about Landlock?
Not being able to read these files could definitely confuse the name resolution...
I have the same problem, and willing to help the issue results in very slow tls connections to my websites. im also runnung 1.20
As a follow up i think it is possible this new behavior was introduced by a system update ( i recently upgraded my ubuntu 20.04 VPS zu 24.04, however prior to upgrading the release i had to upgrade all packages. i think the sslh package is also been upgraded (still on 20.04) and results in this behavior.
I currently runn apache2 and added another port not multiplexed by sslh to the configuration. directly connecting to that ports results in fast tls handshake /connection. going over default 443 (and thus multiplexed by sslh) results in um to 20 seconds wait for sucessfull handshake.
Observing the sslh logs all slow connections result in a sslh-select[642]: sprintaddr:getnameinfo: Temporary failure in name resolution
Any way i could provide more useful feedback?
Thank you in advance!
curl --trace-time -v -s https://b4ckbone.de
14:49:10.929015 * Trying 2a02:c207:3004:689::1:443...
14:49:10.953694 * Connected to b4ckbone.de (2a02:c207:3004:689::1) port 443 (#0)
14:49:10.955613 * ALPN, offering h2
14:49:10.955644 * ALPN, offering http/1.1
14:49:10.993319 * CAfile: /etc/ssl/certs/ca-certificates.crt
14:49:10.993350 * CApath: /etc/ssl/certs
14:49:10.993530 * TLSv1.0 (OUT), TLS header, Certificate Status (22):
14:49:10.993552 * TLSv1.3 (OUT), TLS handshake, Client hello (1):
14:49:21.058276 * TLSv1.2 (IN), TLS header, Certificate Status (22):
14:49:21.058394 * TLSv1.3 (IN), TLS handshake, Server hello (2):
14:49:21.059109 * TLSv1.2 (IN), TLS header, Finished (20):
14:49:21.059246 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.059353 * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
14:49:21.059474 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.059621 * TLSv1.3 (IN), TLS handshake, Certificate (11):
14:49:21.062761 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.062870 * TLSv1.3 (IN), TLS handshake, CERT verify (15):
14:49:21.063274 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.063442 * TLSv1.3 (IN), TLS handshake, Finished (20):
14:49:21.063664 * TLSv1.2 (OUT), TLS header, Finished (20):
14:49:21.063737 * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
14:49:21.063914 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
14:49:21.064045 * TLSv1.3 (OUT), TLS handshake, Finished (20):
14:49:21.064265 * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
14:49:21.064373 * ALPN, server accepted to use http/1.1
14:49:21.064491 * Server certificate:
14:49:21.064606 * subject: CN=b4ckbone.de
14:49:21.064697 * start date: Aug 23 05:38:34 2024 GMT
14:49:21.064819 * expire date: Nov 21 05:38:33 2024 GMT
14:49:21.064958 * subjectAltName: host "b4ckbone.de" matched cert's "b4ckbone.de"
14:49:21.065105 * issuer: C=US; O=Let's Encrypt; CN=R11
14:49:21.065221 * SSL certificate verify ok.
14:49:21.065415 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
14:49:21.065583 > GET / HTTP/1.1
14:49:21.065583 > Host: b4ckbone.de
14:49:21.065583 > User-Agent: curl/7.81.0
14:49:21.065583 > Accept: */*
14:49:21.065583 >
14:49:21.089323 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.089539 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
14:49:21.155317 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.155376 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
14:49:21.155426 * old SSL session ID is stale, removing
14:49:21.155454 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:49:21.155493 * Mark bundle as not supporting multiuse
14:49:21.155514 < HTTP/1.1 200 OK
14:49:21.155534 < Date: Tue, 15 Oct 2024 12:49:20 GMT
14:49:21.155558 < Server: Apache
14:49:21.155585 < X-Frame-Options: sameorigin
14:49:21.155617 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
14:49:21.155642 < Upgrade: h2
14:49:21.155669 < Connection: Upgrade
14:49:21.155698 < Last-Modified: Fri, 30 Mar 2018 12:19:17 GMT
14:49:21.155726 < ETag: "102-568a03fc89278"
14:49:21.155754 < Accept-Ranges: bytes
14:49:21.155781 < Content-Length: 258
14:49:21.155809 < Vary: Accept-Encoding
14:49:21.155838 < MyHeader: D=284 t=1728996560505463
14:49:21.155869 < Content-Type: text/html
14:49:21.155897 <
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>You can access the internet :)</title>
<style type="text/css">
html {
width:100%;
height:100%;
background:url(online.gif) center center no-repeat;
}
</style>
</head>
<body>
</body>
</html>
14:49:21.155960 * Connection #0 to host b4ckbone.de left intact
vs
curl --trace-time -v -s https://b4ckbone.de:5553
14:45:00.883683 * Trying 2a02:c207:3004:689::1:5553...
14:45:00.908371 * Connected to b4ckbone.de (2a02:c207:3004:689::1) port 5553 (#0)
14:45:00.913451 * ALPN, offering h2
14:45:00.913541 * ALPN, offering http/1.1
14:45:00.970977 * CAfile: /etc/ssl/certs/ca-certificates.crt
14:45:00.971039 * CApath: /etc/ssl/certs
14:45:00.971216 * TLSv1.0 (OUT), TLS header, Certificate Status (22):
14:45:00.971241 * TLSv1.3 (OUT), TLS handshake, Client hello (1):
14:45:01.006651 * TLSv1.2 (IN), TLS header, Certificate Status (22):
14:45:01.006689 * TLSv1.3 (IN), TLS handshake, Server hello (2):
14:45:01.006920 * TLSv1.2 (IN), TLS header, Finished (20):
14:45:01.006945 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.006972 * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
14:45:01.007006 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.007767 * TLSv1.3 (IN), TLS handshake, Certificate (11):
14:45:01.008639 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.008674 * TLSv1.3 (IN), TLS handshake, CERT verify (15):
14:45:01.008798 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.008834 * TLSv1.3 (IN), TLS handshake, Finished (20):
14:45:01.008893 * TLSv1.2 (OUT), TLS header, Finished (20):
14:45:01.008924 * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
14:45:01.008974 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
14:45:01.009012 * TLSv1.3 (OUT), TLS handshake, Finished (20):
14:45:01.009076 * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
14:45:01.009103 * ALPN, server accepted to use http/1.1
14:45:01.009132 * Server certificate:
14:45:01.009159 * subject: CN=b4ckbone.de
14:45:01.009186 * start date: Aug 23 05:38:34 2024 GMT
14:45:01.009214 * expire date: Nov 21 05:38:33 2024 GMT
14:45:01.009253 * subjectAltName: host "b4ckbone.de" matched cert's "b4ckbone.de"
14:45:01.009287 * issuer: C=US; O=Let's Encrypt; CN=R11
14:45:01.009322 * SSL certificate verify ok.
14:45:01.009388 * TLSv1.2 (OUT), TLS header, Supplemental data (23):
14:45:01.009440 > GET / HTTP/1.1
14:45:01.009440 > Host: b4ckbone.de:5553
14:45:01.009440 > User-Agent: curl/7.81.0
14:45:01.009440 > Accept: */*
14:45:01.009440 >
14:45:01.033670 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.033792 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
14:45:01.033878 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.033933 * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
14:45:01.033991 * old SSL session ID is stale, removing
14:45:01.034051 * TLSv1.2 (IN), TLS header, Supplemental data (23):
14:45:01.034137 * Mark bundle as not supporting multiuse
14:45:01.034170 < HTTP/1.1 200 OK
14:45:01.034211 < Date: Tue, 15 Oct 2024 12:45:00 GMT
14:45:01.034249 < Server: Apache
14:45:01.034288 < X-Frame-Options: sameorigin
14:45:01.034329 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
14:45:01.034368 < Upgrade: h2
14:45:01.034409 < Connection: Upgrade
14:45:01.034448 < Last-Modified: Fri, 30 Mar 2018 12:19:17 GMT
14:45:01.034486 < ETag: "102-568a03fc89278"
14:45:01.034527 < Accept-Ranges: bytes
14:45:01.034566 < Content-Length: 258
14:45:01.034609 < Vary: Accept-Encoding
14:45:01.034650 < MyHeader: D=263 t=1728996300449242
14:45:01.034691 < Content-Type: text/html
14:45:01.034732 <
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>You can access the internet :)</title>
<style type="text/css">
html {
width:100%;
height:100%;
background:url(online.gif) center center no-repeat;
}
</style>
</head>
<body>
</body>
</html>
14:45:01.034832 * Connection #0 to host b4ckbone.de left intact
Hi I'm using sslh-ev 2.0.1. ( I don't think the flavor of sslh is the problem but do let me know and I can give another a try)
One issue I have been having since the very beginning is I keep getting "sprintaddr:getnameinfo: Temporary failure in name resolution" errors in the log. Which is weird as DNS works just fine for the rest of the machine. It's only sslh complaining.
{edit} the other stuff I was noticing was unrelated