in reply to Re^2: Run Perl Mojolicio Server from SSH
in thread Run Perl Mojolicio Server from SSH

What do you expect  'http://*:3030' to resolve to?

What does the logs say it actually resolves to?

How is that different from the address you're typing in your browser?

Replies are listed 'Best First'.
Re^4: Run Perl Mojolicio Server from SSH
by iseif (Novice) on Feb 06, 2014 at 11:14 UTC

    The server listens on the port 3030 and I use the browser to surf the web client - in the browser I call the server using:

    http://server_address:3030/index.html

    The logs says that the server is up and listening - here what I got after running the server:

     Listening at "http://*:3030"

    Now, if I run the script directly from the linux machine and I open the web page using the url above - the page is loaded.

    But if I run the ssh command to run the server from another machine - the server says it is running and listening - but the link won't open while the server is up in the machine.

    when I run the server from another machine I get the following data in the server machine:

    >ps -ef | grep server_file root 23261 1 0 09:57 ? 00:00:01 /usr/bin/perl server_fi +le >lsof -i perl 23151 root 3u IPv4 8412377 0t0 TCP *:3030 (LISTEN)

    but when I run the server from its own machine - I got the following data:

    >ps -ef | grep server_file root 24163 22640 9 11:12 pts/10 00:00:00 /usr/bin/perl server_fi +le >lsof -i perl 24163 root 3u IPv4 10196650 0t0 TCP *:3030 (LISTEN +)

      Listening at "http://*:3030"

      weeeek :/ I get

      [Thu Feb 6 03:27:58 2014] [info] Listening at "http://*:3000". Server available at http://127.0.0.1:3000.

      The 127.0.0.1 part tells me what the server is :)

      Try specifying explicitly to listen on server_address

      Also try netstat to see what you're listening on

        I found the problem..

        If I use the nohup with the ssh then the server somehow won't be reachable - but when I run the server without the nohup as for example - using the following code:

        ssh root@hostname 'cd /server_path/; (usr/bin/perl server_file );'

        it works.

        what may be the problem here?