diff --git a/DOCKER/docker-entrypoint.sh b/DOCKER/docker-entrypoint.sh index acec50388..285351342 100755 --- a/DOCKER/docker-entrypoint.sh +++ b/DOCKER/docker-entrypoint.sh @@ -1,6 +1,5 @@ #!/bin/bash - # TODO: Workaround for busy port problem happening with docker restart policy # we are trying to start a new container but previous process still not release # the port. @@ -15,9 +14,9 @@ got_signal=false # Function to handle signals and forward them to the tenderdash process # shellcheck disable=SC2317 _forward_signal() { - echo "Caught signal! Forwarding to tenderdash process." - got_signal=true - kill -s "$1" "$child" + echo "Caught signal! Forwarding to tenderdash process." + got_signal=true + kill -s "$1" "$child" } # Trap signals and forward them to the tenderdash process @@ -52,14 +51,14 @@ if [ ! -d "$TMHOME/config" ]; then fi # Start tenderdash in the background -tenderdash "$@" & +tenderdash "$@" 2>&1 & child=$! wait "$child" exit_code=$? if [ $got_signal == false ] && [ $exit_code -ne 0 ] && [ "$1" == "start" ]; then - echo "Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details." - sleep 10 + echo "Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details." + sleep 10 fi exit $exit_code diff --git a/internal/consensus/state.go b/internal/consensus/state.go index ab7d6b086..02180c330 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -446,7 +446,7 @@ func (cs *State) OnStart(ctx context.Context) error { break LOOP case !IsDataCorruptionError(err): - cs.logger.Error("error on catchup replay; proceeding to start state anyway", "err", err) + cs.logger.Warn("error on catchup replay; proceeding to start state anyway", "err", err) break LOOP case repairAttempted: