Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

IO::Socket::SSL Connection Error

by Sascha2018 (Acolyte)
on Aug 06, 2017 at 11:38 UTC ( #1196846=perlquestion: print w/replies, xml ) Need Help??

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 (Pope) 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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1196846]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-05-27 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (162 votes). Check out past polls.

    Notices?