diff --git a/cmd/cgr-rater/cgr-rater.go b/cmd/cgr-rater/cgr-rater.go index cd3542dbb..678637c62 100644 --- a/cmd/cgr-rater/cgr-rater.go +++ b/cmd/cgr-rater/cgr-rater.go @@ -128,6 +128,11 @@ func readConfig(configFn string) { func listenToRPCRequests(rpcResponder interface{}, rpcAddress string, rpc_encoding string) { l, err := net.Listen("tcp", rpcAddress) + if err != nil { + timespans.Logger.Err(fmt.Sprintf("could not connect to %v: %v", rpcAddress, err)) + exitChan <- true + return + } defer l.Close() if err != nil { diff --git a/cmd/cgr-rater/registration.go b/cmd/cgr-rater/registration.go index b380f634d..4b1a89f7e 100644 --- a/cmd/cgr-rater/registration.go +++ b/cmd/cgr-rater/registration.go @@ -82,7 +82,7 @@ Connects to the balancer and rehisters the rater to the server. func registerToBalancer() { client, err := rpc.Dial("tcp", rater_balancer) if err != nil { - log.Print("Cannot contact the balancer!") + log.Print("Cannot contact the balancer!", err) exitChan <- true return }