https://netmaker.org logo
Netclient is totally broken on openwrt on 0.15.1
# netmaker
q
Netclient is totally broken on openwrt on 0.15.1
b
can you explain what you mean with specific details. I just now installed on an openwrt container. While there is a bit an issue with starting the daemon as openwrt does not have systemd, it is functioning and usable.
can you explain what you mean with some details. I just installed on an openwrt container. Minor issue with starting daemon but totally usable.
q
It isn't, after you join it to the network it will crash
b
what arch
q
x86
and arm7
b
logs?
q
let me install it again
[netclient] 2022-09-08 17:46:58 error running command: id -u [netclient] 2022-09-08 17:46:58 2022/09/08 17:46:58 exec: "id": executable file not found in $PATH
over and over again
On 0.15.0 the same thing happend when you set the node as relay/ingress/egress, but on 0.15.1 it just don't work
b
/usr/bin/id is a standard tool and should be in your path
q
It is
On both x86 and arm7
b
yes
id is the standard way to determine if user is root (or has root privileges)
q
And it works if you run the command from command line
But something is messed on netclient
b
what happens when you run sudo id
q
sudo is not present on openwrt by default
b
so you are running as root and id works from command line but can't be found by netclient
q
Thats it
openwrt runs everything as root by default
b
and netclient runs id -u
q
May it run with the sudo?
b
you can try, should not make any difference
q
I mean, does netclient run id -u or sudo id -u
I think installing sudo it works
But ingress/egress/relay doesn't
Copy code
panic: runtime error: slice bounds out of range [1:0]

goroutine 23 [running]:
github.com/gravitl/netmaker/netclient/ncutils.RunCmds({0x1708330, 0x3, 0x3}, 0x0)
    /home/runner/work/netmaker/netmaker/netclient/ncutils/netclientutils.go:441 +0x218
github.com/gravitl/netmaker/netclient/wireguard.ApplyWithoutWGQuick(0x17c8440, {0x1898122, 0x7}, {0x16c4ff0, 0x22}, 0x1)
    /home/runner/work/netmaker/netmaker/netclient/wireguard/noquick.go:103 +0x680
github.com/gravitl/netmaker/netclient/wireguard.ApplyConf(0x17c8440, {0x1898122, 0x7}, {0x16c4ff0, 0x22})
    /home/runner/work/netmaker/netmaker/netclient/wireguard/common.go:289 +0x17c
github.com/gravitl/netmaker/netclient/functions.NodeUpdate({0x69028c, 0x1626160}, {0x69001c, 0x17bc3c0})
    /home/runner/work/netmaker/netmaker/netclient/functions/mqhandlers.go:135 +0xdec
github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch.func2()
    /home/runner/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.4.1/router.go:214 +0x7b8
created by github.com/eclipse/paho%2emqtt%2egolang.(*router).matchAndDispatch
    /home/runner/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.4.1/router.go:173 +0x268
b
netclient runs id -u
q
It doesn't work
I don't know why but it happens on both of my devices
And everything is clean, i remove all files every time i test it
b
what version of openwrt
q
22.03
I also have a docker container with openwrt, same thing happens
b
works on 21.02.3
q
21.02.3 you mean? I may check it
b
yes, typo
q
Let me try it on docker
b
I will look in the panic on egress
q
Same error on 21.02.3 after enabling ingress/egress/relay
id -u works
b
yes, I got it as well... looking into it
q
Thank you 🙂
b
I found the problem; working on PR to fix; will be in 0.15.2 which will be released early next week
q
Perfect, thank you so much for your effort
The id -u from the openwrt 22.03 is fixed too?
b
no I can see nothing to do about that one
q
You think it's a problem about openwrt it self?
b
maybe...
the only thing that might be doable is to use the full path to id
q
After installing sudo i made it work just one time. After stoping it it didn't work anymoire
On Openwrt the /usr/bin/id is a symbolic link, while in a ubuntu server it's the executable it self
b
that should not make a difference
is the symbolic link the same on 22.03 as 21.02.3 ie --> /bin/busybox
q
Yes
b
does not make any sense why it doesn't work on 22.03
q
Will make some test tomorrow, today im bussy
Don't ask me why bu today everything is working
None of my devices are getting the error for id -u
And i didn't even rebooted the devices since the last time i tried it...
b
FM
3 Views