Problem Running nginx

Hi, I am using OpenWrt SNAPSHOT r6284-65d8795b3 running on P&W R619AC.
RAM: 512 MB
SoC: Qualcomm 4019 (ARMv7 rev 5 (v71))

The firmware was obtained and was not built/compile by me.
It was obtained from:
https://pan.wwang.pw/%F0%9F%94%A5OpenWrt_LEAN/%E7%AB%9E%E6%96%97%E4%BA%912.0/2023-12-15

openwrt-ipq40xx-generic-p2w_r619ac-128m-squashfs-nand-sysupgrade.bin

I tried install nginx using:
opkg install nginx-ssl

Output from terminal:

Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libstdcpp6 and libstdcpp6) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libstdcpp6 and libstdcpp6) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libatomic1 and libatomic1) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Installing nginx-ssl (1.25.5-r3) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/nginx-ssl_1.25.5-r3_arm_cortex-a7_neon-vfpv4.ipk
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libstdcpp6 and libstdcpp6) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libstdcpp6 and libstdcpp6) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (nginx-ssl-util and nginx-ssl-util) providing same name marked HOLD or PREFER. Using latest.
Installing libubox20240329 (2024.03.29~eb9bcb64-r1) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libubox20240329_2024.03.29~eb9bcb64-r1_arm_cortex-a7_neon-vfpv4.ipk
Installing libubus20231128 (2023.11.28~f84eb599-r1) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libubus20231128_2023.11.28~f84eb599-r1_arm_cortex-a7_neon-vfpv4.ipk
Installing nginx-util (1.6-r21) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/nginx-util_1.6-r21_all.ipk
Installing libpcre2 (10.42-r1) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libpcre2_10.42-r1_arm_cortex-a7_neon-vfpv4.ipk
Installing nginx-ssl-util (1.6-r21) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/nginx-ssl-util_1.6-r21_arm_cortex-a7_neon-vfpv4.ipk
Installing libxml2 (2.12.6-r1) to root...
Downloading https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/libxml2_2.12.6-r1_arm_cortex-a7_neon-vfpv4.ipk
Configuring libubox20240329.
Configuring libubus20231128.
Configuring nginx-util.
Configuring libpcre2.
Configuring nginx-ssl-util.
Configuring libxml2.
Configuring nginx-ssl.

Then when tried to start nginx using:
service nginx start

Output from terminal:

Segmentation fault
nginx_init: NOT using conf file!
show config to be used by: nginx -T -c ''

Then on system log:

Sat Jun 15 21:20:49 2024 daemon.err nginx_init: 2024/06/15 21:20:49 [crit] 12491#0: pread() "/usr/" failed (21: Is a directory)
Sat Jun 15 21:20:49 2024 daemon.err nginx_init: nginx: configuration file /usr/ test failed
Sat Jun 15 21:20:49 2024 daemon.err nginx_init: NOT using conf file!

I tried to search for solution from numerous places, but did not found any similarity issue match to my issue I am facing.

I hope anyone could give some hint as to what going on here. Thanks.

Please identify crashing process (should be in kernel log aka dmesg too.
sh -x /etc/init.d/nginx start

Using cmd:
sh -x /etc/init.d/nginx start

Terminal output:

+ START=80
+ USE_PROCD=1
+ G_OPTS='daemon off;'
+ NGINX_UTIL=/usr/bin/nginx-util
+ UCI_CONF_TEMPLATE=/etc/nginx/uci.conf.template
+ LATEST_UCI_CONF_VERSION=1.2
+ /usr/bin/nginx-util get_env
Segmentation fault
+ eval
+ CONF=
+ extra_command relog 'Reopen log files (without reloading)'
/etc/init.d/nginx: line 109: extra_command: not found

Recent dmesg output when sh -x /etc/init.d/nginx start executed:

[ 9837.187486] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[10253.435853] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[10668.172015] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[10979.860131] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[11436.316268] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[12036.862840] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[12838.507684] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[13998.818975] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[15052.047970] ath10k_ahb a800000.wifi: Invalid VHT mcs 15 peer stats
[15395.919507] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[15935.846067] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[16320.442038] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[16631.730068] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[17122.827170] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[17482.404075] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[18062.589551] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[18635.813592] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0
[19535.885136] ath10k_ahb a000000.wifi: mac flush vdev 0 drop 0 queues 0x1 ar->paused: 0x0  arvif->paused: 0x0

Dmesg don't seem to show any error/crashing process related to nginx.

This command crashes.

Post ubus call system board , seems you are trying to make ancient vendor sdk run in a modern day.

Terminal output:

{
        "kernel": "5.10.199",
        "hostname": "OpenWrt_Main",
        "system": "ARMv7 Processor rev 5 (v7l)",
        "model": "P&W R619AC 128M",
        "board_name": "p2w,r619ac-128m",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "target": "ipq40xx/generic",
                "revision": "R23.11.11",
                "description": "OpenWrt "
        }
}

Install (sysupgrade) real OpenWRT
https://firmware-selector.openwrt.org/?version=23.05.3&target=ipq40xx%2Fgeneric&id=p2w_r619ac-128m

Or get nginx from coolsnowwolf lede clone (as your version banner says) and ask them if anything crashes.

You will need to back up configuration and type it back using backup contents as guidance.

Hmm ok, regarding the cmd that crash (segmentation fault):
nginx-util get_env

Is there any ways that allow it to output which modules causing it to crash.

FYI, I have another router with same router that run similar configuration. This one with older firmware has nginx running without issue.

Cmd ubus call system board with output of another working router

{
        "kernel": "5.4.234",
        "hostname": "OpenWrt_Main",
        "system": "ARMv7 Processor rev 5 (v7l)",
        "model": "P&W R619AC 128M",
        "board_name": "p2w,r619ac-128m",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "target": "ipq40xx/generic",
                "revision": "R23.3.3",
                "description": "OpenWrt "
        }
}

Cmd nginx-util get_env output of another working router

UCI_CONF='/etc/nginx/uci.conf'
NGINX_CONF='/etc/nginx/nginx.conf'
CONF_DIR='/etc/nginx/conf.d/'
LAN_NAME='_lan'
LAN_LISTEN='/var/lib/nginx/lan.listen'
LAN_SSL_LISTEN='/var/lib/nginx/lan_ssl.listen'
SSL_SESSION_CACHE_ARG='shared:SSL:32k'
SSL_SESSION_TIMEOUT_ARG='64m'
ADD_SSL_FCT='add_ssl'
MANAGE_SSL='uci_manage_ssl'

Version nginx working on another router (R23.3.3):
nginx - 1.25.2-1
nginx-ssl - 1.25.2-1
nginx-ssl-util - 1.6-20
nginx-util - 1.6-20

Version nginx not working on router (R23.11.11):
nginx-ssl - 1.25.5-r3
nginx-ssl-util - 1.6-r21
nginx-util - 1.6-r21

Thanks.

This is not from the official OpenWrt project. Therefore, if you are experiencing issues, please either reach out to the maintainers of the specific fork you are using or install official OpenWrt and we can help you here.

1 Like
Version nginx not working on router (R23.11.11):
nginx-ssl - 1.25.5-r3

openwrt built packages will crash on fork distributions, "works as you intended" ie crashes in your face and neither purveyor will be able or willing to change that.

Thank you for the complement on my stupidity/idioticity/idiocy asked question.

As the result, I now realize this firmware was based on openwrt snapshot version some time ago.

One of the possible reason could be the installed nginx dont like the old firmware Linux kernel version which then throw this odd error.

In situation like this, it is better to just backup the configuration then flash new latest firmware then reconfigure it, this should always solve this odd issue.

Now I managed to install then configure new firmware with nginx installed and running properly mainly as intended as reverse proxy to serve multiple service on router with only single port.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.