OpenWrt Forum Archive

Topic: LuCI silent failure / won't start?

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm running a WT3020. Installing OpenWrt was a breeze. I've tried to get LuCI and, separately when I failed, LuCI-ssl to work. Unfortunately I can't get either _and_ I can't seem to find any good error messages. opkg install goes great, /etc/init.d/uhttpd start doesn't give any errors (although it also doesn't give any success messages and I don't see any newly open sockets in a netstat -nal).

Here's a general Paste2 with everything: http://paste2.org/DaImsHLW

I'm super duper stuck. What else can I try & thanks in advance!

Can you post your uhttpd config please.

Some of the errors I've spotted is that you don't supply any certificate and key for uhttpd (/etc/uhttpd.crt and key) to use and you don't have uhttpd-mod-tls installed.

(Last edited by t3hn00b on 21 Jul 2015, 09:43)

Sorry I thought that my uhttpd config was in that paste. I'll try to post in a minute.

The SSL issues don't explain why pure LuCI wouldn't run tough. Eh?

I would have thought my key and crt would be generated when I install LuCI-ssl though right? I couldn't even generate them manually though. You'll see an error in those logs about px5g and /bin/ash- not sure what that's about.

Here's everything I could find that's part of the config. I also placed a valid SSL key and cert into the two files (so they both exist and have valid data). You'll see I tried to start the server and ran an immediate netstat, just to give it completeness.

root@OpenWrt:~# uci show uhttpd
uhttpd.main=uhttpd
uhttpd.main.listen_http='0.0.0.0:80' '[::]:80'
uhttpd.main.listen_https='0.0.0.0:443' '[::]:443'
uhttpd.main.redirect_https='1'
uhttpd.main.home='/www'
uhttpd.main.rfc1918_filter='1'
uhttpd.main.max_requests='3'
uhttpd.main.max_connections='100'
uhttpd.main.cert='/etc/uhttpd.crt'
uhttpd.main.key='/etc/uhttpd.key'
uhttpd.main.cgi_prefix='/cgi-bin'
uhttpd.main.script_timeout='60'
uhttpd.main.network_timeout='30'
uhttpd.main.http_keepalive='20'
uhttpd.main.tcp_keepalive='1'
uhttpd.main.ubus_prefix='/ubus'
uhttpd.px5g=cert
uhttpd.px5g.days='730'
uhttpd.px5g.bits='1024'
uhttpd.px5g.country='DE'
uhttpd.px5g.state='Berlin'
uhttpd.px5g.location='Berlin'
uhttpd.px5g.commonname='OpenWrt'
root@OpenWrt:~# vim /etc/uhttpd.crt
root@OpenWrt:~# vim /etc/uhttpd.key
root@OpenWrt:~# /etc/init.d/uhttpd start
root@OpenWrt:~# netstat -nal
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 192.168.10.1:22         192.168.10.173:62097    ESTABLISHED
tcp        0      0 :::53                   :::*                    LISTEN     
tcp        0      0 :::22                   :::*                    LISTEN     
udp        0      0 0.0.0.0:53              0.0.0.0:*                           
udp        0      0 0.0.0.0:67              0.0.0.0:*                           
udp        0      0 :::546                  :::*                               
udp        0      0 :::547                  :::*                               
udp        0      0 :::53                   :::*                               
raw        0      0 ::%4556988:58           :::*                    58         
raw        0      0 ::%4556988:58           :::*                    58         
raw        0      0 ::%4556988:58           :::*                    58         
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING        280 /var/run/ubus.sock
unix  6      [ ]         DGRAM                       936 /dev/log
unix  2      [ ]         DGRAM                      1274
unix  2      [ ]         DGRAM                      1354
unix  3      [ ]         STREAM     CONNECTED        283 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED        282
unix  2      [ ]         DGRAM                      1327
unix  3      [ ]         STREAM     CONNECTED        938
unix  3      [ ]         STREAM     CONNECTED        939 /var/run/ubus.sock
unix  2      [ ]         DGRAM                      1573
unix  3      [ ]         STREAM     CONNECTED       1010
unix  3      [ ]         STREAM     CONNECTED       1212 /var/run/ubus.sock
unix  3      [ ]         STREAM     CONNECTED       1211
unix  2      [ ]         DGRAM                      1222
unix  3      [ ]         STREAM     CONNECTED       1011 /var/run/ubus.sock
root@OpenWrt:~# cat /etc/config/uhttpd

config uhttpd 'main'
    list listen_http '0.0.0.0:80'
    list listen_http '[::]:80'
    list listen_https '0.0.0.0:443'
    list listen_https '[::]:443'
    option redirect_https '1'
    option home '/www'
    option rfc1918_filter '1'
    option max_requests '3'
    option max_connections '100'
    option cert '/etc/uhttpd.crt'
    option key '/etc/uhttpd.key'
    option cgi_prefix '/cgi-bin'
    option script_timeout '60'
    option network_timeout '30'
    option http_keepalive '20'
    option tcp_keepalive '1'
    option ubus_prefix '/ubus'

config cert 'px5g'
    option days '730'
    option bits '1024'
    option country 'DE'
    option state 'Berlin'
    option location 'Berlin'
    option commonname 'OpenWrt'

root@OpenWrt:~#

Any ideas? Did I post the right info? Thanks!

Hey, I don't know any of the uhttpd specifics, but I think from the terminal output it looks like the luci and luci-ssl installations got crossed somehow.  Specifically, it looks like uhttpd was configured for ssl by the luci-ssl installation and now it's crossed up because the certs are not in place, and it can't find px5g even though it's installed.  I've only been using OpenWrt for a week, but if you're early in the configuration process, I'd be tempted to backup your /etc/config/network, /etc/config/firewall, and any others unrelated to luci and uhttpd that you've modified, and then reflash the router and try installing luci out of the box to avoid crossing up the uhttpd configuration with a subsequent luci-ssl installation.

Maybe somebody more experienced can look at and pick apart your luci and uhttpd configurations, but that's how I'd approach it, since you don't seem to have a ton of additional packages and configurations set up at this point.  I'd much rather get a stable base set up before proceeding with any additional work.  That said, hopefully somebody with more experience will be able/willing to give you some advice about the best way forward.

If you do opt to flash it, you just pull down the OpenWrt image to the router or a compatible USB (hopefully, you've got a WT3020 with a USB port), and use the sysupgrade command.


If you don't have a USB, you can pass sysupgrade a URL to the image, but I prefer to flash from a local image if possible. 


To backup a list of your packages for later, you can use:

opkg list-installed | cut -f 1 -d ' ' > /path/to/packages.list

To backup your config files for later, manual restoration of the core configs, you'd use:

sysupgrade -b /path/to/file.tar.gz

To flash without restoring config files, you'd use:

sysupgrade -n <image file or URL>

I say hold off for better advice, but it appears to be tricky getting a response around here when you're new.

(Last edited by fecaleagle on 26 Jul 2015, 05:30)

hi

ps | grep uhttpd to see if deamon is running
but it seems it fails becouse of certs and px5g

do a reflash or failsafe>delete rootfs_data or failsafe>firstboot
http://wiki.openwrt.org/doc/howto/generic.failsafe

just do a opkg install luci
check errors if any
http://wiki.openwrt.org/doc/howto/luci.essentials

these are all my luci related packages for AA
luci - 0.11.1-1
luci-app-ddns - 0.11.1-1
luci-app-firewall - 0.11.1-1
luci-app-qos - 0.11.1-1
luci-i18n-english - 0.11.1-1
luci-lib-core - 0.11.1-1
luci-lib-ipkg - 0.11.1-1
luci-lib-nixio - 0.11.1-1
luci-lib-sys - 0.11.1-1
luci-lib-web - 0.11.1-1
luci-mod-admin-core - 0.11.1-1
luci-mod-admin-full - 0.11.1-1
luci-proto-core - 0.11.1-1
luci-proto-ppp - 0.11.1-1
luci-sgi-cgi - 0.11.1-1
luci-theme-base - 0.11.1-1
luci-theme-openwrt - 0.11.1-1

The discussion might have continued from here.