Turris OS 4.0 beta3 is now released!

I confirm too with 500 error on Foris

Could you please try to restart fosquitto if it happens? /etc/init.d/fosquitto restart

Here to

server error 500

In addition to what Moeller0 reported i see

2019-06-22 10:21:52: (http-header-glue.c.1273) read(): Connection reset by peer 12 10 
2019-06-22 10:21:52: (gw_backend.c.2147) response not received, request sent: 885 on socket: unix:/tmp/fastcgi.foris-config.socket-0 for /foris/config?, closing connection 

whenever i want to log in to Foris.

Right, believe I’ve found the issue. Could you all try logging in to ssh and run: “mkdir /usr/lib/python3.6/site-packages/foris/locale”
Rebooting shouldn’t be necessary - it should just work after doing that.

1 Like

Progress. Now the login screen appears and i can login to Foris. Foris seems to work fine now.
Thanks HomerSP.

Remark: I had to reboot to make Foris work. After the login I received only 404’s.

BTW: Foris is still on v100.0, the same as 4B2.

Ok, guys, I think that I have everything that I need to be able to fix the error 500, which someone of you is having. It happens when you don’t have any other language than English.

As the fix is currently on the review. Right now, what you can do is to install, for example, foris-l10n-de and reboot your router.

3 Likes

With new LXC version and info in this thread:


I was able to switch to 4.0 branch (but with fast rollback option - I have 4.0 on SSD and 3.11 on MMC).
Most of things works. I still need to check why timezone config in foris is not working (the same exception as usual, but it may be my configuration), and one of my RPi’s does is unavailable via WiFi.
And not all leds blinks as required:)

Ok, first problem: my Aeon Labs Z-stick (kmod-usb-serial-cp210x) does not work.
It works on 3.11.x and on current Debian.

dmesg

[ 261.311281] usb 4-1: new full-speed USB device number 6 using xhci-hcd
[ 261.461429] usb 4-1: Device not responding to setup address.
[ 261.681375] usb 4-1: Device not responding to setup address.
[ 261.901288] usb 4-1: device not accepting address 6, error -71
[ 262.051279] usb 4-1: new full-speed USB device number 7 using xhci-hcd
[ 262.201425] usb 4-1: Device not responding to setup address.
[ 262.421371] usb 4-1: Device not responding to setup address.
[ 262.641280] usb 4-1: device not accepting address 7, error -71
[ 262.647218] usb usb4-port1: attempt power cycle
[ 263.361283] usb 4-1: new full-speed USB device number 8 using xhci-hcd
[ 263.367999] usb 4-1: Device not responding to setup address.
[ 263.591365] usb 4-1: Device not responding to setup address.
[ 263.811278] usb 4-1: device not accepting address 8, error -71
[ 263.961282] usb 4-1: new full-speed USB device number 9 using xhci-hcd
[ 263.968022] usb 4-1: Device not responding to setup address.
[ 264.191397] usb 4-1: Device not responding to setup address.
[ 264.411278] usb 4-1: device not accepting address 9, error -71
[ 264.417271] usb usb4-port1: unable to enumerate USB device

Any hints how to debug this?

Another issue:

dmesg

[ 1240.091340] ------------[ cut here ]------------
[ 1240.095990] WARNING: CPU: 1 PID: 5 at net/netfilter/core.c:393 __nf_unregister_net_hook+0x6c/0x2a0
[ 1240.104990] Modules linked in: ath9k(O) ath9k_common(O) qcserial pppoe ppp_async ath9k_hw(O) ath10k_pci(O) ath10k_core(O) ath(O) usb_wwan pppox ppp_generic nf_conntrack_ipv6 mac80211(O) iptable_nat ipt_REJECT ipt_MASQUERADE ebtable_nat ebtable_filter ebtable_broute cp210x cfg80211(O) xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY usbserial slhc sch_cake(O) nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat_ftp nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink
[ 1240.176183] nf_conntrack_ftp nf_conntrack iptable_mangle iptable_filter ipt_ECN ip_tables ebtables ebt_vlan ebt_stp ebt_redirect ebt_pkttype ebt_mark_m ebt_mark ebt_limit ebt_among ebt_802_3 crc_ccitt compat(O) act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress i2c_mux_pca954x i2c_mux ledtrig_oneshot ledtrig_heartbeat ledtrig_gpio xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables
[ 1240.246969] ifb sit ip6_tunnel tunnel6 tunnel4 ip_tunnel veth tun snd_compress snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd soundcore ledtrig_transient
[ 1240.264167] CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G W O 4.14.128 #0
[ 1240.271754] Hardware name: Marvell Armada 380/385 (Device Tree)
[ 1240.277691] Workqueue: netns cleanup_net
[ 1240.281636] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[ 1240.289403] [] (show_stack) from [] (dump_stack+0x88/0x9c)
[ 1240.296645] [] (dump_stack) from [] (__warn+0xe4/0x100)
[ 1240.303623] [] (__warn) from [] (warn_slowpath_null+0x20/0x28)
[ 1240.311215] [] (warn_slowpath_null) from [] (__nf_unregister_net_hook+0x6c/0x2a0)
[ 1240.320459] [] (__nf_unregister_net_hook) from [] (nf_unregister_net_hooks+0x1c/0x34)
[ 1240.330049] [] (nf_unregister_net_hooks) from [] (ops_exit_list+0x38/0x60)
[ 1240.338682] [] (ops_exit_list) from [] (cleanup_net+0x188/0x294)
[ 1240.346446] [] (cleanup_net) from [] (process_one_work+0x240/0x3d4)
[ 1240.354468] [] (process_one_work) from [] (worker_thread+0x330/0x560)
[ 1240.362667] [] (worker_thread) from [] (kthread+0x148/0x154)
[ 1240.370082] [] (kthread) from [] (ret_from_fork+0x14/0x2c)
[ 1240.377339] —[ end trace b6b4fe1c8c7c479f ]—

Can you post the output of lsusb

lsusb shows:

root@Turris:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Device is connected, kernel module is loaded.

I want to confirm that this fixed the issue for me. Thanks a lot to all who helped diagnosing this.

1 Like

That is strange, because there is no indication that the usb device is connected.

taking a stab - it seems to point to a race between nf_register_hook() and cleanup_net()

Why it would happen on your mode I would not know - from your post I would reckon that lxc is installed? Anything fancy with netns, e.g. split routing mwan or some vpn policy based routing or https://www.wireguard.com/netns?

When I connect USB Drive or FTDI connector to front usb - it works. It is also visible under LXC.
The Z-Stick is connected to back usb. In 3.11 it works. In 4.0 it only produces errors in dmesg during connect. No other signs of life.

Aeon Labs Z-stick is this self-powered Z-Wave USB dongle?

It might be that the driver is not providing correct power management. Is it the driver same as on Debian?

Did you try another driver? There seems to be couple of the kmod-usb-serial variety.

I have only one LXC container and have just installed openvpn (6 client instances).
I have also an issue with openvpn. Or rather with routing.

/etc/config/firewall

config zone
option forward ‘REJECT’
option output ‘ACCEPT’
option name ‘VPN’
option input ‘REJECT’
option masq ‘1’
option mtu_fix ‘1’
option network ‘[network names]’

config forwarding
option dest ‘VPN’
option src ‘lan’

That was enough for 3.11. Can anybody tell me, why in 4.0 I can access all networks listed in VPN zone from router itself, but not from computer, that is in LAN zone?

Yes, it is powered from USB.
It’s kmod-usb-serial-cp210x.
I’ve tried also kmod-usb-serial-ftdi, ch341 and pl2303, but none of them works.
In debian it uses cp210x

According to the manufacturer’s documentation that should do. I suppose kmod-usb-serial is installed anyway?


AFAIK openvpn does not utilize netns but lxc does. From your initial post it is not clear at which stage the issue happens.

Might be a bit drastic but for debugging purpose you could, if you like, create a snapshot with schnapps then unistall all lxc apps and reboot and see whether the issue reproduces. If it does reproduce than it likely is not lxc causing it.
After that rollback with schnapps to the previously created snapshot and see whether the issue is present again.

Yes, kmod-usb-serial is installed.
Other serial connector (on FTDI chip) works.
Now I’ve checked it on front usb.

root@Turris:~# lsusb
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Edit: on 3.11 it works fine on back usb.

Podsumowanie

root@turris:~# dmesg | grep usb
[ 7.517852] xhci-hcd f10f0000.usb3: xHCI Host Controller
[ 7.523211] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[ 7.530803] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[ 7.539375] xhci-hcd f10f0000.usb3: irq 46, io mem 0xf10f0000
[ 7.553294] xhci-hcd f10f0000.usb3: xHCI Host Controller
[ 7.558622] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 3
[ 7.566168] usb usb3: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 7.582377] xhci-hcd f10f8000.usb3: xHCI Host Controller
[ 7.587707] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[ 7.595305] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[ 7.603873] xhci-hcd f10f8000.usb3: irq 47, io mem 0xf10f8000
[ 7.617661] xhci-hcd f10f8000.usb3: xHCI Host Controller
[ 7.622995] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 5
[ 7.630531] usb usb5: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 7.931084] usb 4-1: new full-speed USB device number 2 using xhci-hcd
[ 26.459702] usbcore: registered new interface driver cdc_wdm
[ 26.774662] usbcore: registered new interface driver usbserial
[ 26.780542] usbcore: registered new interface driver usbserial_generic
[ 26.787127] usbserial: USB Serial support registered for generic
[ 26.820628] usbcore: registered new interface driver cdc_ether
[ 26.826846] usbcore: registered new interface driver cp210x
[ 26.832488] usbserial: USB Serial support registered for cp210x
[ 26.843624] usb 4-1: cp210x converter now attached to ttyUSB0
[ 26.851247] usbcore: registered new interface driver ftdi_sio
[ 26.857061] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 26.873239] usbcore: registered new interface driver qmi_wwan
[ 26.879810] usbcore: registered new interface driver rndis_host
[ 27.007253] usbcore: registered new interface driver option
[ 27.012929] usbserial: USB Serial support registered for GSM modem (1-port)
[ 27.020550] usbcore: registered new interface driver qcserial
[ 27.026364] usbserial: USB Serial support registered for Qualcomm USB modem
root@turris:~# lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

WIth lxc: I’ll check in some free time.
But I have some data-collecting services in container, so I don’t like downtime:)

But it does not have a lithium battery like the Labs Z-stick?

Again utilizing schnapps it might be possible to first remove the driver (kmod-usb-serial-cp210x) that ships with TOS4.x and then manually try with opkg installing the driver from TOS3.x and see whether it makes a difference. It still could be a kernel issue and not the driver though.

I am not sure how familiar with schnapps's rollback/export/import features you are. I do a bit of troubleshooting/debugging and schnapps is extremely handy for that purpose. Of course it requires a bit of time, each rollback, export/import or even reinstalling the snapshot from usb.

But of course I would not want to lead you on in messing up your system - always at your own risk.


One more thought springs to mind - is the manufacturer of Labs Z-stick providing firmware updates, if there is such feature, and is the latest installed?

Look at updates to my last post.
I’ve switched to 3.11 (have 3.11 on MMC and 4.0 on SSD, switched by fw_setenv and reboot) and there it works (I wanted to check if port is not damaged).
In 4.0 it works fine in front usb, but not in back usb.
I guess that there may be something with hub drivers (front is 3.0, back is 2.0), but have no experience in this matter.
About Z-Stick - I do not remember any firmware update. Aeon offers upgraded version of this stick and old one is abandoned.
Tested serial connector have no battery.