Cro run throwing connection reset by peer

211 Views Asked by At

I am trying to implement the Cro Service from the Cro getting started documentation. It compiled fine but when I tried to access the link using browser, it shows cannot reach the site and throws "Connection reset by peer" error with no other details. The code is below:

use Cro::HTTP::Log::File;
use Cro::HTTP::Server;
use Routes;
my Cro::Service $http = Cro::HTTP::Server.new(
    http => <1.1>,
    host => '0.0.0.0',
    port => 3001,
    application => routes(),
    after => [
        Cro::HTTP::Log::File.new( logs => $*OUT, errors => $*ERR)
    ]
);
$http.start;
say "Listening at http://server:3001";
react {
    whenever signal(SIGINT) {
        say "Shutting down...";
        $http.stop;
        done;
    }
}

Is there a way to troubleshot this so that I can identify what the actual error is?

0

There are 0 best solutions below