Skip to content

Cryptic 'Channel is !good()' error when ipv6 is disabled #26

Closed

Description

@jeroen-dhollander

Please use this template for reporting suspected bugs or requests for help.

Issue Description

When ipv6 is disabled, running openr fails with a cryptic error message

Environment

  • tag or commit hash on which this occured
    465c0a3
  • OS version: <e.g. ubuntu-16.04>
    CentOs 7

Minimal test code / Steps to reproduce the issue

Disable ipv6 and run openr:

[:docker-]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0
[:docker-]$ sudo bash -c ' echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6'
[:docker-]$ 
[:docker-]$ 
[:docker-]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
[:docker-]$ openr
openr[156]: Starting OpenR daemon.
E0426 20:49:58.210268   156 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing
E0426 20:49:58.319881   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.319939   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 63 ms
E0426 20:49:58.384980   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.385143   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 127 ms
E0426 20:49:58.514339   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.514488   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 255 ms
E0426 20:49:58.771777   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:58.771900   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 511 ms
E0426 20:49:59.284234   171 LinkMonitor.cpp:1077] Failed to sync LinkDb from NetlinkSystemHandler. Error: N6apache6thrift9transport19TTransportExceptionE: Channel is !good()
E0426 20:49:59.284271   171 LinkMonitor.cpp:476] InterfaceDb Sync failed, apply exponential backoff and retry in 1023 ms
^Copenr[156]: Stopping OpenR daemon.
[:docker-]$ 

Then if you enable ipv6 it works:

[:docker-]$  sudo bash -c ' echo "0" > /proc/sys/net/ipv6/conf/all/disable_ipv6'  
[:docker-]$ 
[:docker-]$ 
[:docker-]$ openr
openr[185]: Starting OpenR daemon.
E0426 20:50:18.453419   185 KnownKeysStore.cpp:24] Failed reading known keys, file might be missing

What's the actual result?

With ipv6 disabled, the NetlinkSystem listens on port 60099 in ipv4.

└─⊳ netstat -anp | grep 60099
tcp        0      0 0.0.0.0:60099           0.0.0.0:*               LISTEN      7079/openr          

However the LinkMonitor is trying to connect to this port in ipv6,
resulting in the Channel is !good() error.

What's the expected result?

A better error message indicating OpenR requires ipv6 (as I lost a lot of time debugging this).

Activity

  1. saifhhasan commented on Apr 26, 2018

    @saifhhasan
    Contributor

    Hello @jeroen-dhollander , Open/R is ipv6 first and can only be run on systems with ipv6 support and connectivity as it is designed around it. ipv4 support has been added later on and can be turned on/off optionally.

  2. jeroen-dhollander commented on Apr 26, 2018

    @jeroen-dhollander
    Author

    Hey @saifhhasan,

    I understand that, and I don't have an issue with OpenR requiring IPv6.

    However, I lost a lot of time over this because the error Channel is !good() does not express in any way why it is failing.
    It took a lot of debugging to find that out.

    It would be nice if I had received an error like Fail to open [::1]:60099: IPv6 not enabled.

  3. saifhhasan commented on Apr 27, 2018

    @saifhhasan
    Contributor

    Hello @jeroen-dhollander, what you mentioned sounds very legit. I will add a check in OpenR to validate it's requirement so that in future it saves time for others :) .. Will keep issue open and close once I land a change to check for ipv6 requirement.

    Again thanks for reporting and valuable suggestion to make OpenR better.

  4. saifhhasan commented on May 23, 2018

    @saifhhasan
    Contributor

    Closing issue as warning has been added. - f0fa8ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions