OpenWRT: failed to connect to ubus

Posted on

Problem :

I have a WNDR3800, flashed trunk version of OpenWRT, and then did a sysupgrade -r from previous working backup on the same machine. After reboot everything is normal (since many packages are not installed), but Once I try to connect to it via SSH it reports:

Aiee, segfault! You should probably report this as a bug to the developer
Connection to closed. 

After that I put it in failsafe mode, connected via telnet and tried severial commands:

root@(none):/# /etc/init.d/dropbear start
root@(none):/# mv: can't remove '/etc/dropbear/dropbear_dss_host_key': Read-only file system
mv: can't remove '/etc/dropbear/dropbear_rsa_host_key': Read-only file system
chown: /etc/dropbear: Read-only file system
chmod: /etc/dropbear: Read-only file system
Failed to connect to ubus

root@(none):/# mount_root
root@(none):/# /etc/init.d/dropbear start
Failed to connect to ubus
Failed to parse json data: unexpected end of data
interface lan has no physdev or physdev has no suitable ip
Failed to connect to ubus
root@(none):/# ifconfig
eth0      Link encap:Ethernet  HWaddr 46:94:FC:XX:XX:XX
          inet addr:  Bcast:  Mask:
          RX packets:2059 errors:0 dropped:531 overruns:1 frame:0
          TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:371693 (362.9 KiB)  TX bytes:18693 (18.2 KiB)

Also I tried firstboot with or without mount_root, in both cases it stucks and does nothing.

Since dropbear refuse to start, I am unable to configure anything. Is there any way I can revert to default settings or flash another version of firmware?

Solution :

You can try the recovery method using TFTP as described for the WNDR3700 here (it also applies to the WNDR3800). If this does not work, you can use the serial console as a last resort to directly talk to the U-Boot bootloader and instruct it to load a firmware image using TFTP. Hope this helps.

Unfortunately, the recent OpenWRT distributions seem to be broken in many ways. They change too many things too fast. Actually, I found your question while looking for known errors of the json parser of this ubus thing in latest “stable” 15.05 (couldn’t find anything in the OpenWRT forum/ticket system related to that particular error), which breaks something trivial as the firewall start/stop script and other commands like for example mount.

As for me, I will go back to 12.09 for now, which is the latest really stable version for my platforms (Netgear WNDR3700, TP-Link WDR4300, PCEngines Alix). As a long-time user of OpenWRT (10 years) I usually try to fix errors first before reverting back to older versions, but due to the lack of documentation of the new features it does take much too much time to dig into this new and (IMHO) very complex framework.

Leave a Reply

Your email address will not be published. Required fields are marked *