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

script often fails with error #13

Closed
cfdisk opened this issue Jan 6, 2024 · 11 comments · Fixed by #24
Closed

script often fails with error #13

cfdisk opened this issue Jan 6, 2024 · 11 comments · Fixed by #24
Labels
bug Something isn't working

Comments

@cfdisk
Copy link

cfdisk commented Jan 6, 2024

Hi. Script often fails for me:

[INFO] You have IPv6 connectivity. Continuing.
[INFO] Finished cleaning up previous setup.
[INFO] Waiting for the propagation in the Linux kernel.
[DEBUG] Debug info:
random_ipv6_address --> XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX 
random_ipv6_address_mask --> 64
gateway --> fe80::1
interface_index --> 2
interface_name --> eth0
ipv6_subnet --> XXXX:XXXX:XXXX:XXXX::/64
[Error] Failed to remove the configured (Google) IPv6 subnets.
        May be expected if the route were not yet configured and that was a cleanup due to an error.
[INFO] Finished cleaning up previous setup.
[INFO] Waiting for the propagation in the Linux kernel.
[ERROR] Failed to send the request for checking the new IPv6 address! The setup did not work!
        Your provider probably does not allow setting any arbitrary IPv6 address.
        Or did you correctly configured the IPv6 subnet to use?
       Exception:
HTTPConnectionPool(host='2606:4700::6812:7261', port=80): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fe489f6b010>, 'Connection to 2606:4700::6812:7261 timed out. (connect timeout=5)'))

However, sometimes (rarely) it works without errors. New IP+route is then listed ( ip a and ip r )
I have not yet been able to determine any regularity.

Machine is a root server at netcup.

EDIT:
Debian12.4 x64
Kernel 6.1.0-17-amd64
Nothing special

Thanks for advices

@unixfox
Copy link
Member

unixfox commented Jan 8, 2024

Please post the operating system and version of the operating system.

@cfdisk
Copy link
Author

cfdisk commented Jan 8, 2024

Added requested info to original post.

It feels like some kind of timeout thing

@adambala
Copy link

I have the exact same issue except in my situation the script doesn't work without errors at all.

ping6 ipv6.google.com command gives me these stats:

--- ipv6.google.com ping statistics ---
81 packets transmitted, 81 received, 0% packet loss, time 80114ms
rtt min/avg/max/mdev = 0.367/0.554/1.386/0.217 ms

I'm trying to run it on the Digital Ocean droplet:

  • Linux: Ubuntu 23.10 x64
  • Kernel: 6.5.0-14-generic

IPv6 is enabled.

@unixfox
Copy link
Member

unixfox commented Jan 16, 2024

I have the exact same issue except in my situation the script doesn't work without errors at all.

ping6 ipv6.google.com command gives me these stats:

--- ipv6.google.com ping statistics ---
81 packets transmitted, 81 received, 0% packet loss, time 80114ms
rtt min/avg/max/mdev = 0.367/0.554/1.386/0.217 ms

I'm trying to run it on the Digital Ocean droplet:

* Linux: Ubuntu 23.10 x64

* Kernel: 6.5.0-14-generic

IPv6 is enabled.

That's a non-issue, digitalocean only allow 16 IPv6 addresses. You are not going to have enough ipv6 for the rotation: https://docs.digitalocean.com/glossary/subnet/

@adambala
Copy link

I have the exact same issue except in my situation the script doesn't work without errors at all.
ping6 ipv6.google.com command gives me these stats:

--- ipv6.google.com ping statistics ---
81 packets transmitted, 81 received, 0% packet loss, time 80114ms
rtt min/avg/max/mdev = 0.367/0.554/1.386/0.217 ms

I'm trying to run it on the Digital Ocean droplet:

* Linux: Ubuntu 23.10 x64

* Kernel: 6.5.0-14-generic

IPv6 is enabled.

That's a non-issue, digitalocean only allow 16 IPv6 addresses. You are not going to have enough ipv6 for the rotation: https://docs.digitalocean.com/glossary/subnet/

This is sad. But thanks for the answer anyway!

@warnerbryce
Copy link

I have the same problem but for the moment i didn't had the chance to have it working.
VPS on OVH I have /56 subnet on IPv6
Debian 12
Netplan
i type the command python3 smart-ipv6-rotator.py run --ipv6range=(Network found via gestioip.net)/56

If i change the IPv6 in the Netplan conf with a random one in the same network, it works... but not with this tool.

@cfdisk
Copy link
Author

cfdisk commented Apr 4, 2024

As a workaround for me I'm running the script in a loop until it returns 0:

until ./smart-ipv6-rotator.py run --ipv6range=<mysubnet>::/64
do
    sleep 3
done

@unixfox unixfox added the bug Something isn't working label Apr 21, 2024
@warnerbryce
Copy link

warnerbryce commented Apr 28, 2024

As a workaround for me I'm running the script in a loop until it returns 0:

until ./smart-ipv6-rotator.py run --ipv6range=<mysubnet>::/64
do
    sleep 3
done

Thanks, in my case it doesn't work.
The script run for 34 hours and still didn't found a valid IP.
I will switch manually everytime my service crash, it will be quicker.

EDIT : It turns out, it don't works on OVH VPS, so i took off my Raspberry PI 4 and installed Debian on it.
The script works well without problem.

@unixfox
Copy link
Member

unixfox commented May 22, 2024

Please test with the latest code update. Do a clean before upgrading: https://github.com/iv-org/smart-ipv6-rotator?tab=readme-ov-file#upgrading

@cfdisk
Copy link
Author

cfdisk commented May 23, 2024

I updated according to instructions.

The problem remains for me, however it has become very rare: on average, it only fails once in about 5 attempts

@unixfox
Copy link
Member

unixfox commented May 23, 2024

We now have 3 retries and with a timeout of 10 seconds when testing the IPv6 connectivity.

If you are still running into issues is that:

  • you have not configured the correct IPv6 subnet size
  • your provider may not allow you to change the IPv6 address too frequently
  • your server may have difficulties reaching the test ipv6 server from time to time (about this one we could allow to use another test server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants