Undefined address for Socket::pack_sockaddr_in

48 views
Skip to first unread message

Pavel Serikov

unread,
Dec 10, 2019, 5:08:03 PM12/10/19
to Mojolicious
I got a strange error when make GET request to Mojo server using curl:

Undefined address for Socket::pack_sockaddr_in at /usr/lib/perl5/core_perl/Socket.pm line 851.

Same error I got when running server under morbo and under daemon mode.

What's wrong?

Notice: mojo server is running in docker container.

Mojolicious version : 8.27

Veesh Goldman

unread,
Dec 10, 2019, 5:26:09 PM12/10/19
to mojol...@googlegroups.com
can you show the command you used to start the server?

--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mojolicious/822482f8-d186-41a8-948a-98925cc2b68c%40googlegroups.com.

Pavel Serikov

unread,
Dec 11, 2019, 5:01:38 PM12/11/19
to Mojolicious
I'm running server with command  morbo -w lib -w public -w api_conf.yaml api.pl  (same problem when running like perl api.pl daemon )

api.pl is Mojolicious::Lite app.

Make curl request like curl http://app:3000/api/health

And full server log on error is

[2019-12-11 21:55:37.48968] [10] [debug] [4a9def6b] GET "/api/health"
[2019-12-11 21:55:37.49033] [10] [debug] [4a9def6b] Routing to a callback
[2019-12-11 21:55:42.49534] [10] [error] [4a9def6b] Undefined address for Socket::pack_sockaddr_in at /usr/lib/perl5/core_perl/Socket.pm line 851.

[2019-12-11 21:55:42.49628] [10] [debug] [4a9def6b] Template "exception.development.html.ep" not found
[2019-12-11 21:55:42.49686] [10] [debug] [4a9def6b] Template "exception.html.ep" not found
[2019-12-11 21:55:42.49724] [10] [debug] [4a9def6b] Rendering cached template "mojo/debug.html.ep"
[2019-12-11 21:55:42.50432] [10] [debug] [4a9def6b] 500 Internal Server Error (5.01467s, 0.199/s)

route looks like:

get '/api/health' => sub {
   
my $c = shift;
   
my $result = {};
    $result
->{memcached} = ( defined $c->memcached->stats->{hosts} ) ? 1 : 0;
    $result
->{selenoid} = eval { if ( $c->selenium_driver ) { return $c->selenium_driver->status } };
    $result
->{telegram} =  eval { app->telegram->getMe->{result}{username} };
    $c
->res->headers->access_control_allow_origin('*');
    $c
->render( json => $result );
};



среда, 11 декабря 2019 г., 1:26:09 UTC+3 пользователь Veesh Goldman написал:
can you show the command you used to start the server?

On Wed, Dec 11, 2019 at 12:08 AM Pavel Serikov <pavel....@gmail.com> wrote:
I got a strange error when make GET request to Mojo server using curl:

Undefined address for Socket::pack_sockaddr_in at /usr/lib/perl5/core_perl/Socket.pm line 851.

Same error I got when running server under morbo and under daemon mode.

What's wrong?

Notice: mojo server is running in docker container.

Mojolicious version : 8.27

--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojol...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages