http://qs321.pair.com?node_id=1196846

Sascha2018 has asked for the wisdom of the Perl Monks concerning the following question:

Hello. I have a IO::Socket::SSL programmed Perl Script. If i connect with a client:
my $client = IO::Socket::INET->new(PeerAddr=>'host',PeerPort=>'port',P +roto=>'tcp'); IO::Socket::SSL->start_SSL(options..);
.. the Server accepts the handshake and handles the messages. But.. if i want to open my website https://host:port/?action=show over HTTPS the server does not get a GET /? Request. Nothing is shown and i get a This site can’t be reached and ERR_ADDRESS_UNREACHABLE in the Browser. Why ? Perhaps you can help me in german language. If not, we can try to communicate in English language. Regards

Replies are listed 'Best First'.
Re: IO::Socket::SSL Connection Error
by Corion (Patriarch) on Aug 06, 2017 at 11:55 UTC

    Maybe your browser has a proxy set or has other connectivity problems.

    Maybe your browser tries to connect over IPv6 while Perl successfully connects via IPv4 or the other way around.

    Maybe find out what IP addresses get returned for the hostname. Maybe giving your browser an explicit IP address helps debug this better.

      It had to do with a firewall xD Thanks
      Hello. thanks for the replies :-) Now, one year later, i tried to get working my Perl Script. ( Chatserver ) I have installed it on localhost and i created a certificate with mkcert. Now, everytime, i want to login into my page i get an error in the browser:
      Secure Connection Failed An error occurred during a connection to 127.0.0.1:22222. SSL_ERROR_RX +_UNEXPECTED_RECORD_TYPE
      In my console i got this error:
      DEBUG: .../IO/Socket/SSL.pm:1042: local error: SSL accept attempt fail +ed error:140940F4:SSL routines:ssl3_read_bytes:unexpected message [07.04.2020 - 20:17:06] SSL Error: SSL accept attempt failed error:140 +940F4:SSL routines:ssl3_read_bytes:unexpected message DEBUG: .../IO/Socket/SSL.pm:2875: free ctx 94723586472400 open=9472358 +6472400 94723590508016 DEBUG: .../IO/Socket/SSL.pm:2886: OK free ctx 94723586472400 DEBUG: .../IO/Socket/SSL.pm:962: no socket yet DEBUG: .../IO/Socket/SSL.pm:964: accept created normal socket IO::Sock +et::SSL=GLOB(0x56268dfe9eb0) DEBUG: .../IO/Socket/SSL.pm:992: starting sslifying DEBUG: .../IO/Socket/SSL.pm:1039: Net::SSLeay::accept -> 1 DEBUG: .../IO/Socket/SSL.pm:1087: handshake done, socket ready DEBUG: .../IO/Socket/SSL.pm:980: accept_SSL ok DEBUG: .../IO/Socket/SSL.pm:2853: new ctx 94723586472400 DEBUG: .../IO/Socket/SSL.pm:1540: start handshake DEBUG: .../IO/Socket/SSL.pm:992: starting sslifying DEBUG: .../IO/Socket/SSL.pm:1039: Net::SSLeay::accept -> -1 DEBUG: .../IO/Socket/SSL.pm:1042: SSL accept attempt failed DEBUG: .../IO/Socket/SSL.pm:1042: local error: SSL accept attempt fail +ed error:140940F4:SSL routines:ssl3_read_bytes:unexpected message [07.04.2020 - 20:17:06] SSL Error: SSL accept attempt failed error:140 +940F4:SSL routines:ssl3_read_bytes:unexpected message DEBUG: .../IO/Socket/SSL.pm:2875: free ctx 94723586472400 open=9472359 +0508016 94723586472400 DEBUG: .../IO/Socket/SSL.pm:2886: OK free ctx 94723586472400
      How can i resolve the problem? Thank you very much
      Hello. Has nobody an idea ? Thank you

        You're replying to me. I have very little SSL experience.

        My immediate idea would be that you don't have the https:// at the front of your URL in your browser. Does fetching data using curl work or does it fail in the same way?