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

Rclone reports no internet access when using ethernet #11

Open
Blakestr opened this issue Aug 31, 2018 · 2 comments
Open

Rclone reports no internet access when using ethernet #11

Blakestr opened this issue Aug 31, 2018 · 2 comments

Comments

@Blakestr
Copy link

Was using wifi, plugged in ethernet, reboot Retropie.

When I started a rom (and exited) same error message, Not Connected to Internet.

Problem went away when I did that. (I saw this somewhere maybe but I didn't see on the issues board)

@kwaiette
Copy link

I ran into this problem, here's some more information on it:

If wifi is on AND ethernet is plugged in, getAvailableConnection() returns 2 (can't ping gateway). If I turn off wifi, everything works fine with only ethernet. If I comment out the return 2 line it works just fine with both wifi and ethernet, i.e. 8.8.8.8 is pinged successfully.

With further testing I found that I could ping my gateway from a shell (logged in through SSH) using the exact same ping command as the script, but it fails inside the script. I added a line to the script to ping another machine on my LAN and that was successful.

Possible solution: skip the gateway ping check and rely only on the 8.8.8.8 ping check.

@kwaiette
Copy link

kwaiette commented Feb 13, 2019

Right after I posted the above comment I realized what's going on. If both wifi and ethernet are connected, the command ip r | grep default | cut -d " " -f 3 returns two results so gatewayIP contains the value 192.168.1.1\n192.168.1.1 in my case. The ping output looks the same as if there was only one gateway listed but the command fails.

Since in my case I'm connecting to the same router with both ethernet and wifi, I could add head -n 1 to the gatewayIP command. As a more general case it might be better to determine which gateway is being used, e.g. ip route get 8.8.8.8.

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