Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: SSL Soap Server daemon stopping

by Anonymous Monk
on Aug 23, 2008 at 07:33 UTC ( [id://706387]=note: print w/replies, xml ) Need Help??


in reply to Re^2: SSL Soap Server daemon stopping
in thread SSL Soap Server daemon stopping

Here's a fix :) If something dies, add some eval {};warn $@ if $@;
#!/usr/bin/perl -w use HTTP::Daemon::SSL; use HTTP::Status; use SOAP::Lite; use SOAP::Transport::HTTP; use XML::Simple; use TTPSubmit; while(1){ # infinite loop, if Daemon stop for some reason # Make sure you have a certs/ directory with "server-cert.pem" # and "server-key.pem" in it before running this! my $daemon = new HTTP::Daemon::SSL SSL_key_file => '(takenout)server-key.pem', SSL_cert_file => '(takenout)server-cert.pem', LocalPort => 8080; my $soap = SOAP::Transport::HTTP::Server -> new ( ) -> dispatch_to('TTPSubmit'); print "Please contact me at: <URL:", $daemon->url, ">\n"; while (my $conn = $daemon->accept()) { while (my $request = $conn->get_request()) { $soap->request($request); $soap->handle(); my $response = $soap->response(); $conn->send_response($response); } $conn->close; undef($conn); } }

Replies are listed 'Best First'.
Re^4: SSL Soap Server daemon stopping
by perlchild (Acolyte) on Aug 24, 2008 at 22:14 UTC

    Tried your loop fix, it is still stopping. I will try to move it to another port instead of 8080.

      Then it must do more than stop, like die or exit. Use eval to trap die.

        Ok, this has been running for 4 years now, then today it started just stopping again when a valid request is sent to the server. Here is my debug output for it this time around and it looks like IO Socket SSL is having a problem finding my cert files. I don't know why it just started this. Is there an update to that perl module that I don't know about and should be using?

        Here is debug output:

        [root@host1 TTPSubmit]# DEBUG: .../IO/Socket/SSL.pm:423: accept create +d normal socket HTTP::Daemon::ClientConn::SSL=GLOB(0x7f26fe0) DEBUG: .../IO/Socket/SSL.pm:439: starting sslifying DEBUG: .../IO/Socket/SSL.pm:479: Net::SSLeay::accept -> -1 DEBUG: .../IO/Socket/SSL.pm:1131: SSL accept attempt failed with unkno +wn errorerror:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared c +ipher DEBUG: .../IO/Socket/SSL.pm:1417: free ctx 132729584 open=132729584 DEBUG: .../IO/Socket/SSL.pm:1420: OK free ctx 132729584 DEBUG: .../IO/Socket/SSL.pm:202: CA file certs/my-ca.pem not found, us +ing CA path instead. DEBUG: .../IO/Socket/SSL.pm:1382: new ctx 133366496 DEBUG: .../IO/Socket/SSL.pm:1131: IO::Socket::INET configuration faile +derror:00000000:lib(0):func(0):reason(0) DEBUG: .../IO/Socket/SSL.pm:1417: free ctx 133366496 open=133366496 DEBUG: .../IO/Socket/SSL.pm:1420: OK free ctx 133366496 Can't call method "url" on an undefined value at ./TTPSubmit.pl line 4 +2. [root@host1 TTPSubmit]#

        Thanks for your input

Re^4: SSL Soap Server daemon stopping
by perlchild (Acolyte) on Aug 23, 2008 at 12:49 UTC
    Thanks Anonymous Monk and Eyck for all of the help you have provided, it really helped me to look at this problem differently. I should have thought of the infinite loop solution, but that is life. Sometimes you just have to have another brain in the mix! Thanks again! If I could vote yet I would give you two some votes but I'm still just an Initiate. I only have to get two more XP to be a Novice and I can vote then.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://706387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found