Skip to content

Commit

Permalink
[2982] Handle operation not permitted exception (firewall) (#3058)
Browse files Browse the repository at this point in the history
* catch exception

Signed-off-by: Frank Li <[email protected]>

* use full error message

Signed-off-by: Frank Li <[email protected]>

Co-authored-by: Stefan Pingel <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2021
1 parent b682f8c commit e6e3d45
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ protected void handleOutgoingPacket(final DiscoveryPeer peer, final Packet packe
if (err instanceof SocketException && err.getMessage().contains("unreachable")) {
LOG.debug(
"Peer {} is unreachable, packet: {}", peer, wrapBuffer(packet.encode()), err);
} else if (err instanceof SocketException
&& err.getMessage().contentEquals("Operation not permitted")) {
LOG.debug(
"Operation not permitted sending to peer {}, this might be caused by firewall rules blocking traffic to a specific route.",
peer,
err);
} else if (err instanceof UnsupportedAddressTypeException) {
LOG.warn(
"Unsupported address type exception when connecting to peer {}, this is likely due to ipv6 not being enabled at runtime. "
Expand Down

0 comments on commit e6e3d45

Please sign in to comment.