Hetunnel error Command failed

Hello, I have setup hetunnel but sometime my pppoe version drops.
After this drop my hetunnel never comes back...
The error I have is this

Sat Apr 24 00:27:44 2021 daemon.notice netifd: Interface 'hetunnel' is now down
Sat Apr 24 00:27:44 2021 daemon.notice netifd: Interface 'hetunnel' is setting up now
Sat Apr 24 00:27:44 2021 daemon.notice netifd: hetunnel (20220): Command failed: Unknown error

Any idea how to bisect this error?

Disect or bypass?

I want to fix this this...

You could perhaps trigger a restart using hotplug

Or something like this https://gist.github.com/dreamon11/dc35c659a594ee5e51d74d028e9ce988

at Apr 24 00:45:07 2021 user.notice 6in4-hetunnel: update 2/3: nochg 79.32.93.103
Sat Apr 24 00:45:07 2021 user.notice 6in4-hetunnel: updated
Sat Apr 24 00:45:07 2021 daemon.notice netifd: Interface 'hetunnel' is now down
Sat Apr 24 00:45:07 2021 daemon.notice netifd: Interface 'hetunnel' is setting up now
Sat Apr 24 00:45:08 2021 daemon.notice netifd: hetunnel (30155): Command failed: Unknown error
Sat Apr 24 00:45:10 2021 user.notice 6in4-hetunnel: update 1/3: nochg 79.32.93.103
Sat Apr 24 00:45:10 2021 user.notice 6in4-hetunnel: updated
Sat Apr 24 00:45:10 2021 daemon.notice netifd: Interface 'hetunnel' is now down
Sat Apr 24 00:45:10 2021 daemon.notice netifd: Interface 'hetunnel' is setting up now
Sat Apr 24 00:45:10 2021 daemon.notice netifd: hetunnel (30284): Command failed: Unknown error
Sat Apr 24 00:45:12 2021 user.notice 6in4-hetunnel: update 1/3: nochg 79.32.93.103
Sat Apr 24 00:45:12 2021 user.notice 6in4-hetunnel: updated
Sat Apr 24 00:45:12 2021 daemon.notice netifd: Interface 'hetunnel' is now down
Sat Apr 24 00:45:12 2021 daemon.notice netifd: Interface 'hetunnel' is setting up now
Sat Apr 24 00:45:12 2021 daemon.notice netifd: hetunnel (30413): Command failed: Unknown error
Sat Apr 24 00:45:14 2021 user.notice 6in4-hetunnel: update 1/3: nochg 79.32.93.103
Sat Apr 24 00:45:14 2021 user.notice 6in4-hetunnel: updated
Sat Apr 24 00:45:14 2021 daemon.notice netifd: Interface 'hetunnel' is now down
Sat Apr 24 00:45:14 2021 daemon.notice netifd: Interface 'hetunnel' is setting up now
Sat Apr 24 00:45:14 2021 daemon.notice netifd: hetunnel (30542): Command failed: Unknown error

The tunnel try to restart periodically... no luck
I suspect there is some bug in the he script

I think the timeout is too short - and the frequent retrying doesn't make he_net happy, blacklisting you for a while.

I've been carrying this delta for a while:

--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -25,7 +25,7 @@ test_6in4_rfc1918()
 
 proto_6in4_update() {
 	sh -c '
-		timeout=5
+		timeout=15
 
 		(while [ $((timeout--)) -gt 0 ]; do
 			sleep 1


2 Likes

let's try but i'm not so potivie it seems an error from the interface creation or something like that

i mean it's trange that in the if list it's showed as not connected.

While I was still on a contract with daily disconnects, I used the following to get around the problem:

0 5 * * * [ $(ifstatus wan | jsonfilter -e '@.uptime') -lt 3650 ] || (ubus call network.interface.wan6 down;ubus call network.interface.wan down;sleep 1;ubus call network.interface.wan up;sleep 15;ubus call network.interface.wan6 up)

But these days (no 24h-disconnect anymore, but still rather frequent firmware upgrades/ rebooting for testing, etc.), the longer timeout really helps me (the he_net tunnel comes up reliably).

Nope the command failed error is print before the update

ok i'm debugging the script

The error comes from

proto_send_update "$cfg"

and the error comes then from

ubus $options call network.interface notify_proto "$(json_dump)"

and tracking from that part is hard i think...

Fact is that a reboot fix the problem sooo ?