Skip to content

Commit

Permalink
Add extra logging and fix healthcheck disable
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner committed Mar 23, 2022
1 parent e98d148 commit a3607b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/arb-rpc-node/cmd/arb-node/arb-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,14 @@ func startup() error {
healthChan <- nodehealth.Log{Config: true, Var: "openethereumHealthcheckRPC", ValStr: config.L1.URL}
nodehealth.Init(healthChan)

go func() {
err := nodehealth.StartNodeHealthCheck(ctx, healthChan, metricsConfig.Registry)
if err != nil {
log.Error().Err(err).Msg("healthcheck server failed")
}
}()
if config.Healthcheck.Enable {
go func() {
err := nodehealth.StartNodeHealthCheck(ctx, healthChan, metricsConfig.Registry)
if err != nil {
log.Error().Err(err).Msg("healthcheck server failed")
}
}()
}

var sequencerFeed chan broadcaster.BroadcastFeedMessage
if len(config.Feed.Input.URLs) == 0 {
Expand Down
2 changes: 2 additions & 0 deletions packages/arb-util/ethutils/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package ethutils
import (
"context"
"encoding/json"
"github.com/rs/zerolog/log"
"math/big"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -107,6 +108,7 @@ func (r *RPCEthClient) handleCallErr(err error) error {

// If we've had above a threshold number of errors, reinitialize the connection
if totalErrCount >= maxErrCount {
log.Warn().Err(err).Str("url", r.url).Msg("Reconnecting to client endpoint after repeated errors")
if err := r.reconnect(); err != nil {
return err
}
Expand Down

0 comments on commit a3607b1

Please sign in to comment.