5

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?

jjmerelo
  • 22,578
  • 8
  • 40
  • 86
Abeer
  • 153
  • 6
  • You can try [cro trace](https://cro.services/docs/cro-tool#Tracing_Services) or set `CRO_TRACE=1`. It's not clear from you code, what's wrong. Maybe the problem is in the Routes-Module. – LuVa Dec 08 '19 at 13:46

0 Answers0