diff --git a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-analysis-server.yml.j2 b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-analysis-server.yml.j2 index 5eec897a98..21982d143c 100644 --- a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-analysis-server.yml.j2 +++ b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-analysis-server.yml.j2 @@ -31,3 +31,4 @@ services: --node.enablePlugins=analysisServer,analysisDashboard,prometheus --node.disablePlugins=activity,analysisClient,chat,consensus,dashboard,faucet,gossip,firewall,issuer,mana,manualpeering,blockLayer,metrics,networkdelay,portcheck,pow,syncBeaconFollower,webAPIBroadcastDataEndpoint,WebAPIDataEndpoint,WebAPIHealthzEndpoint,WebAPIFaucetRequestEndpoint,webAPIFindTransactionHashesEndpoint,webAPIGetNeighborsEndpoint,webAPIGetTransactionObjectsByHashEndpoint,webAPIGetTransactionTrytesByHashEndpoint,WebAPIInfoEndpoint,WebAPILedgerstateEndpoint,WebAPIBlockEndpoint,WebAPIToolsBlockEndpoint,WebAPIWeightProviderEndpoint,remotelog,remotelogmetrics,DAGsVisualizer,WebAPIRateSetterEndpoint,WebAPISchedulerEndpoint,ManaInitializer,Notarization,EpochStorage,WebAPIEpochEndpoint,BootstrapManager --logger.level={{ logLevel }} + --logger.outputPaths=stdout diff --git a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-entrynode.yml.j2 b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-entrynode.yml.j2 index 68fcbdea3a..c6bf57882e 100644 --- a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-entrynode.yml.j2 +++ b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-entrynode.yml.j2 @@ -28,3 +28,4 @@ services: --analysis.client.serverAddress= --node.disablePlugins=activity,analysisClient,chat,consensus,dashboard,faucet,gossip,firewall,issuer,mana,manualpeering,blockLayer,metrics,networkdelay,portcheck,pow,syncBeaconFollower,webAPIBroadcastDataEndpoint,WebAPIDataEndpoint,WebAPIHealthzEndpoint,WebAPIFaucetRequestEndpoint,webAPIFindTransactionHashesEndpoint,webAPIGetNeighborsEndpoint,webAPIGetTransactionObjectsByHashEndpoint,webAPIGetTransactionTrytesByHashEndpoint,WebAPIInfoEndpoint,WebAPILedgerstateEndpoint,WebAPIBlockEndpoint,WebAPIToolsBlockEndpoint,WebAPIWeightProviderEndpoint,remotelog,remotelogmetrics,DAGsVisualizer,WebAPIRateSetterEndpoint,WebAPISchedulerEndpoint,ManaInitializer,Notarization,EpochStorage,WebAPIEpochEndpoint,BootstrapManager --logger.level={{ logLevel }} + --logger.outputPaths=stdout diff --git a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-goshimmer.yml.j2 b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-goshimmer.yml.j2 index a0ed54f6fa..c77bb8fb54 100644 --- a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-goshimmer.yml.j2 +++ b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-goshimmer.yml.j2 @@ -64,6 +64,7 @@ services: --pow.difficulty={{ powDifficulty }} {% endif %} --logger.level={{ logLevel }} + --logger.outputPaths=stdout --logger.disableEvents=false --logger.remotelog.serverAddress={{ remoteLoggerHost }}:5213 --remotemetrics.metricsLevel=0 diff --git a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-public-node.yml.j2 b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-public-node.yml.j2 index 715ba4e0f5..8581dbbf1d 100644 --- a/deploy/ansible/roles/goshimmer-node/templates/docker-compose-public-node.yml.j2 +++ b/deploy/ansible/roles/goshimmer-node/templates/docker-compose-public-node.yml.j2 @@ -52,6 +52,7 @@ services: --pow.difficulty={{ powDifficulty }} {% endif %} --logger.level={{ logLevel }} + --logger.outputPaths=stdout --logger.disableEvents=false --logger.remotelog.serverAddress={{ remoteLoggerHost }}:5213 --remotemetrics.metricsLevel=0 diff --git a/packages/node/p2p/neighbor.go b/packages/node/p2p/neighbor.go index c0b44d4da3..23320e3fe1 100644 --- a/packages/node/p2p/neighbor.go +++ b/packages/node/p2p/neighbor.go @@ -1,17 +1,13 @@ package p2p import ( - "io" - "strings" "sync" "time" "github.com/cockroachdb/errors" "github.com/iotaledger/hive.go/core/autopeering/peer" "github.com/iotaledger/hive.go/core/logger" - "github.com/libp2p/go-libp2p-core/mux" "github.com/libp2p/go-libp2p-core/protocol" - "github.com/libp2p/go-yamux/v2" ) // NeighborsGroup is an enum type for various neighbors groups like auto/manual. @@ -110,16 +106,14 @@ func (n *Neighbor) readLoop() { packet := stream.packetFactory() err := stream.ReadPacket(packet) if err != nil { - if isPermanentError(err) { - if disconnectErr := n.disconnect(); disconnectErr != nil { - n.Log.Warnw("Failed to disconnect", "err", disconnectErr) - } - return + if isTimeoutError(err) { + continue } - if !isTimeoutError(err) { - n.Log.Debugw("Read error", "err", err) + n.Log.Infow("Stream read packet error", "err", err) + if disconnectErr := n.disconnect(); disconnectErr != nil { + n.Log.Warnw("Failed to disconnect", "err", disconnectErr) } - continue + return } n.Events.PacketReceived.Trigger(&NeighborPacketReceivedEvent{ Neighbor: n, @@ -151,9 +145,3 @@ func (n *Neighbor) disconnect() (err error) { }) return err } - -func isPermanentError(err error) bool { - return strings.Contains(err.Error(), "use of closed network connection") || - errors.Is(err, io.ErrClosedPipe) || errors.Is(err, mux.ErrReset) || errors.Is(err, yamux.ErrStreamClosed) || - errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) -}