Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jeroen-dhollander opened this issue Apr 26, 2018 · 4 comments
Closed

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

jeroen-dhollander opened this issue Apr 26, 2018 · 4 comments

Comments

@jeroen-dhollander
Copy link

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).

@saifhhasan
Copy link
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.

@jeroen-dhollander
Copy link
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.

@saifhhasan
Copy link
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.

facebook-github-bot pushed a commit that referenced this issue May 2, 2018
Summary:
Adding check in run_openr.sh to warn user if system is not ipv6 enabled. Also
read openr config if file exists to avoid spurious error of "Missing
Configuration" as it is not an error.

Resolves => #26

Reviewed By: smaheshm

Differential Revision: D7838101

fbshipit-source-id: 2812a47a24ad038a9a3d4e5a33d8ba49a52aa0a4
@saifhhasan
Copy link
Contributor

Closing issue as warning has been added. - f0fa8ed

facebook-github-bot pushed a commit that referenced this issue Jul 16, 2020
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: facebook/sapling#26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
facebook-github-bot pushed a commit that referenced this issue Feb 9, 2022
Summary:
Pull Request resolved: facebookexperimental/rust-shed#26

Pull Request resolved: facebook/sapling#104

No need for the checked in generated code anymore

Successful external CI Linux run on Git Hub PR: https://github.com/facebookexperimental/eden/runs/5130405984?check_suite_focus=true

Mac PR run fails with a SSL cert issue, will look separately

Reviewed By: chadaustin, mitrandir77

Differential Revision: D33840545

fbshipit-source-id: eafc2a0e2191d438fd828adeebc2e318d319025f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants