Article View: news.software.readers
Article #266529Re: (Dialog) How do I debug a 40tude "socket error" (what's a socket error?)
From: Ronald
Date: Sun, 07 Jan 2024 08:53
Date: Sun, 07 Jan 2024 08:53
178 lines
10888 bytes
10888 bytes
On Sun, 7 Jan 2024 09:10:13 +0100, Bernd Rose <b.rose.tmpbox@arcor.de> wrote > A socket is a dedicated connection established by the OS between a program > and an IP-address:port combination. Several such sockets can exist in > parallel at any certain time, just not with the same parameters. > > "Socket error # 0" isn't a normal Socket error number. It will be returned > by the Indy network functions (a Delphi network library used by Dialog), > when no connection could be established, at all. Thanks for that information as Stunnel is working with other encrypted nntp news servers without the socket error that only Neodome is reporting. The strange thing is the Neodome stunnel entry was working for about a year and there are no conflicts in the port (55555) arbitrarily assigned as I've changed the port multiple times (in both Dialog & in stunnel.conf of course) and no other nntp server is using the same port either. > From above information it seems, you set up your connection to the Neodome > server inside Dialog to connect to localhost (127.0.0.1) on port 55555. > User name and password for the Neodome server have to be entered inside the > Dialog connection settings, as well. You must /not/ tick on the SSL box, > though, because with above parameters you most likely want to use a more > up-to-date program for managing the encryption. Yep. All that is set exactly as you said, and it used to work for Neodome. It still works for other encrypted news servers - but just not Neodome. > You are probably using sTunnel as an intermediate for encrypted connections. > With above parameters you need to set up sTunnel to accept local connections > from port 55555 and forward them encrypted to the Neodome NNTP server: > > [Neodome] > client = yes > accept = localhost:55555 > connect = news.neodome.net:563 > verifyChain = yes > CAfile = ca-certs.pem > checkHost = news.neodome.net > OCSPaia = yes My stunnel.conf is only very slightly different, as shown below. [neodome] client = yes accept = 127.0.0.1:55555 connect = news.neodome.net:563 verify = 0 verifyChain = yes CAfile = ca-certs.pem checkHost = news.neodome.net OCSPaia = yes The only difference is I have a "verify = 0" which I will comment out. And I use "127.0.0.1" instead of "localhost" which should not matter. > Please check, if sTunnel is running at all. Stunnel is definitely running as I post with other servers using it. Plus the icon in the hardware section of the taskbar will be green when it's OK, then blue when being used, and red if there's a failure. It's green. > And if the connection parameters > are set correctly. (Especially, that no 2 connection sections using the same > /internal/ port number [55555 in this case].) If this all seems okay, check > the sTunnel log file for further information. To get a clean log out of Stunnel, I killed and restarted it. This shows it's ready to take connections. 2024.01.07 02:18:11 LOG5[main]: stunnel 5.69 on x64-pc-mingw32-gnu platform 2024.01.07 02:18:11 LOG5[main]: Compiled/running with OpenSSL 3.0.8 7 Feb 2023 2024.01.07 02:18:11 LOG5[main]: Threading:WIN32 Sockets:SELECT,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI 2024.01.07 02:18:11 LOG5[main]: Reading configuration from file C:\Program Files\stunnel\config\stunnel.conf 2024.01.07 02:18:11 LOG5[main]: UTF-8 byte order mark detected 2024.01.07 02:18:11 LOG5[main]: FIPS mode disabled 2024.01.07 02:18:32 LOG5[main]: Configuration successful This is what happens when I post to another server (not neodome). 2024.01.07 02:34:17 LOG5[0]: Service [eternal] accepted connection from 127.0.0.1:55554 2024.01.07 02:34:20 LOG5[0]: s_connect: connected 135.181.20.170:563 2024.01.07 02:34:20 LOG5[0]: Service [eternal] connected remote server from 10.211.1.145:60382 2024.01.07 02:34:24 LOG5[0]: OCSP: Connecting the AIA responder "http://r3.o.lencr.org" 2024.01.07 02:34:27 LOG5[0]: s_connect: connected 23.2.16.105:80 2024.01.07 02:34:30 LOG5[0]: OCSP: Certificate accepted 2024.01.07 02:34:30 LOG5[0]: Certificate accepted at depth=0: CN=news.eternal-september.org 2024.01.07 02:34:44 LOG3[0]: SSL_read: ssl/record/rec_layer_s3.c:321: error:0A000126:SSL routines::unexpected eof while reading 2024.01.07 02:34:44 LOG5[0]: Connection reset: 358 byte(s) sent to TLS, 388 byte(s) sent to socket This is what happens when I post to the neodome server. 2024.01.07 02:18:55 LOG5[0]: Service [neodome] accepted connection from 127.0.0.1:55555 2024.01.07 02:19:00 LOG5[0]: s_connect: connected 95.216.243.224:563 2024.01.07 02:19:00 LOG5[0]: Service [neodome] connected remote server from 10.211.1.145:60371 2024.01.07 02:19:01 LOG4[0]: CERT: Pre-verification error: self-signed certificate 2024.01.07 02:19:01 LOG4[0]: Rejected by CERT at depth=0: O=Neodome, CN=neodome.net, emailAddress=admin@neodome.net 2024.01.07 02:19:01 LOG3[0]: SSL_connect: ssl/statem/statem_clnt.c:1889: error:0A000086:SSL routines::certificate verify failed 2024.01.07 02:19:01 LOG5[0]: Connection closed/reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket This is the Dialog log file when I post using eternal september with Stunnel. 0 43532453: Creating worker thread: Sending message to alt.test username 0 43532453: FDATA: Opening 1 0 43532468: FDATA: Reading itemcount 6 0 43532468: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2579 3 43532453: Sending message to alt.test (Started) [$00002754] 1 43532453: NNTP slot used by this thread: username [$00002754] 3 43532468: Connecting to NNTP 127.0.0.1:55556 [$00002754] 0 43548968: 200 news.eternal-september.org InterNetNews NNRP server INN 2.8.0 (20231205 snapshot) ready (posting ok) [$00002754] 0 43548968: !MODE READER [$00002754] 0 43550859: 200 news.eternal-september.org InterNetNews NNRP server INN 2.8.0 (20231205 snapshot) ready (posting ok) [$00002754] 3 43550859: Connected to NNTP 127.0.0.1:55556 [$00002754] 3 43550859: Logging in to NNTP 127.0.0.1:55556 [$00002754] 0 43550859: !AUTHINFO USER ****** [$00002754] 0 43552218: 381 Enter password [$00002754] 0 43552218: !AUTHINFO PASS ********* [$00002754] 0 43554687: 281 Authentication succeeded [$00002754] 3 43554687: Posting message to NNTP server [$00002754] 0 43554687: !POST [$00002754] This is the Dialog log file when I post using neodome with Stunnel. 0 25674390: Creating worker thread: Sending message to news.software.readers neodome Username ok1 0 25674390: FDATA: Opening 1 0 25674390: FDATA: Reading itemcount 3 0 25674390: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2572 3 25674390: Sending message to news.software.readers (Started) [$0000250C] 1 25674390: NNTP slot used by this thread: neodome Username ok1 [$0000250C] 3 25674390: Connecting to NNTP 127.0.0.1:55555 [$0000250C] 1 25675500: Reindexing (Order: 3, no filtering) of group 1 with 2574 articles took 16 ms 0 25675500: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2572 0 25675500: FDATA: Regular update PAK - ChangeCount: 0 0 25675500: FDATA: adding GroupKey: 1 ArticleKey: 2573 0 25675500: FDATA: Regular update PAK - ChangeCount: 1 0 25675515: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675515: FontFB: No non-ASCII characters found; Using default font 0 25675515: FontFB: Using font "Arial" which is missing 0 glyphs. 0 25675515: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675515: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675531: FontFB: No non-ASCII characters found; Using default font 0 25675531: FontFB: Using font "Arial" which is missing 0 glyphs. 0 25675531: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675531: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675531: FontFB: No non-ASCII characters found; Using default font 0 25675531: FontFB: Using font "Arial" which is missing 0 glyphs. 0 25675546: FDATA: Extracting body of GroupKey: 1 ArticleKey: 2571 0 25675484: !Quit (Finished) [$0000250C] 5 25675484: Socket Error # 0; (neodome Username ok) (Finished) [$0000250C] 0 25675484: KillNNTP entered for: neodome Username ok1 (Finished) [$0000250C] 0 25675484: KillNNTP left for: neodome Username ok1 (Finished) [$0000250C] 0 25675484: KillNNTP entered for: neodome Username ok1 (Finished) [$0000250C] 0 25675484: KillNNTP left for: neodome Username ok1 (Finished) [$0000250C] 5 25675484: Posting article failed: Socket Error # 0; (neodome Username ok) (Finished) [$0000250C] 1 25675500: Sending message to news.software.readers (Finished) (Finished) [$0000250C] 0 25676328: TFlushBodiesThread started with ThreadID: $16A0 1 25678328: Flushing body db 0 25678328: FDATA: Updating PAK, number of subfiles: 29 0 25678328: FDATA: Writing itemcount 3 0 25678328: FDATA: Closing 1 1 25679687: Main window close query 1 25679750: Main window destroy called - Goodbye 0 25679765: FDATA: destroying; Changecount: 0 1 25679765: Flushing group and server list The two errors (one in Dialog's log and the other in Stunnel's log) are: Dialog error: 5 25675484: Socket Error # 0; (neodome Username ok) (Finished) [$0000250C] 0 25675484: KillNNTP entered for: neodome Username ok1 (Finished) [$0000250C] Stunnel error: 2024.01.07 02:19:01 LOG4[0]: CERT: Pre-verification error: self-signed certificate 2024.01.07 02:19:01 LOG4[0]: Rejected by CERT at depth=0: O=Neodome, CN=neodome.net, emailAddress=admin@neodome.net 2024.01.07 02:19:01 LOG3[0]: SSL_connect: ssl/statem/statem_clnt.c:1889: error:0A000086:SSL routines::certificate verify failed In a minute I will try it again by removing that one line (verify = 0) in the stunnel.conf file for Neodome, but does that look like to you that the certificate for Neodome is having the problem? Or does it look like a problem on my side?
Technical Details
Message-ID:
<undopl$tmdk$1@paganini.bofh.team>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<und7gj$srbd$1@paganini.bofh.team> <und84c$ssl1$1@paganini.bofh.team> <302brvey53rn$.dlg@b.rose.tmpbox.news.arcor.de>Show Full Headers
Complete Article Headers
Message-ID: <undopl$tmdk$1@paganini.bofh.team> Subject: Re: (Dialog) How do I debug a 40tude "socket error" (what's a socket error?) Date: Sun, 7 Jan 2024 03:53:10 -0500 From: Ronald <ronald@nospam.me> References: <und7gj$srbd$1@paganini.bofh.team> <und84c$ssl1$1@paganini.bofh.team> <302brvey53rn$.dlg@b.rose.tmpbox.news.arcor.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.readers Organization: To protect and to server Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Injection-Date: Sun, 7 Jan 2024 08:53:10 -0000 (UTC) User-Agent: 40tude_Dialog/2.0.15.41 (Beta 38) Cancel-Lock: sha256:g6hXn2vjMcxaNlbuWsShu/MKtbOaROkAAReGklAw54I= X-Notice: Filtered by postfilter v. 0.9.3