arm linux下nginx服务无法正常启动是什么原因?
生活随笔
收集整理的這篇文章主要介紹了
arm linux下nginx服务无法正常启动是什么原因?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這是DS白攝像頭,
[root@RV1126_RV1109:~]# ps -aux | grep nginx root 339 0.0 0.4 12644 2196 ? Ss 20:35 0:00 nginx: master process /usr/sbin/nginx www-data 427 0.9 0.5 12944 2924 ? S 20:35 0:05 nginx: worker process root 3419 0.0 0.0 2056 200 pts/0 S+ 20:44 0:00 grep nginx [root@RV1126_RV1109:/]# find . -name "nginx" ./etc/logrotate.d/nginx # 可執行文件 ./etc/nginx # 文件夾 ./tmp/nginx # 文件夾(我沒有tmp文件夾) ./var/lib/nginx # 空文件夾 ./usr/sbin/nginx # 一堆文件(包含nginx可執行文件) find: ./proc/452/task/517/fdinfo/72: No such file or directory find: ./proc/452/task/520/fdinfo/77: No such file or directory find: ./proc/452/task/553/fdinfo/72: No such file or directory find: ./proc/452/task/556/fdinfo/72: No such file or directory [root@RV1126_RV1109:/]# [root@RV1126_RV1109:/]# cd /etc/logrotate.d/ [root@RV1126_RV1109:/etc/logrotate.d]# ls nginx [root@RV1126_RV1109:/etc/logrotate.d]# cd /etc/nginx/ [root@RV1126_RV1109:/etc/nginx]# ls fastcgi.conf fastcgi_params.default mime.types nginx.conf.default uwsgi_params fastcgi.conf.default koi-utf mime.types.default scgi_params uwsgi_params.default fastcgi_params koi-win nginx.conf scgi_params.default win-utf [root@RV1126_RV1109:/etc/nginx]# cd /tmp/nginx/ [root@RV1126_RV1109:/tmp/nginx]# ls access.log client-body error.log fastcgi proxy scgi uwsgi [root@RV1126_RV1109:/tmp/nginx]# cd /var/lib/nginx/ [root@RV1126_RV1109:/var/lib/nginx]# ls [root@RV1126_RV1109:/var/lib/nginx]# [root@RV1126_RV1109:/var/lib/nginx]# cd /usr/sbin/ [root@RV1126_RV1109:/usr/sbin]# ls alsaconf dnsmasq fsfreeze ip6tables-restore nandtest setlogcons ubirsvol alsactl dropbear hostapd ip6tables-save nandwrite ubiattach ubiupdatevol arping eeprog i2c-stub-from-dump iptables nginx ubiblock v4l2-dbg avahi-autoipd ether-wake i2cdetect iptables-restore ntpd ubicrc32 wpa_cli avahi-daemon fbset i2cdump iptables-save partprobe ubidetach wpa_passphrase avahi-dnsconfd fcgiwrap i2cget iw pm-hibernate ubiformat wpa_supplicant chroot fdformat i2cset killall5 pm-powersave ubimkvol xtables-multi connmand flash_erase i2ctransfer loadfont pm-suspend ubinfo connmand-wait-online flash_lock in.tftpd mtd_debug pm-suspend-hybrid ubinize crond flash_unlock inetd mtdinfo rdate ubirename dnsd flashcp ip6tables nanddump readprofile ubirmvol [root@RV1126_RV1109:/usr/sbin]#我們自己的攝像頭,camera2沒找到nginx服務是怎么回事?文檔上也說要開啟nginx服務
我在camera2上搜索nginx
[root@RV1126_RV1109:/]# find . -name "*nginx*" ./etc/init.d/dS50nginx ./etc/logrotate.d/nginx # 可執行文件 ./etc/nginx # 文件夾 ./etc/nginx/nginx.conf ./etc/nginx/nginx.conf.default find: ./proc/622/task/623/fd/193: No such file or directory find: ./proc/622/task/633/fd/166: No such file or directory find: ./proc/622/task/633/fd/193: No such file or directory find: ./proc/622/task/702/fd/192: No such file or directory find: ./proc/622/task/716/fd/193: No such file or directory find: ./proc/622/task/717/fdinfo/166: No such file or directory find: ./proc/622/task/720/fd/193: No such file or directory find: ./proc/622/task/721/fdinfo/166: No such file or directory find: ./proc/622/task/725/fd/192: No such file or directory find: ./proc/622/task/725/fdinfo/193: No such file or directory find: ./proc/622/task/729/fdinfo/193: No such file or directory find: ./proc/622/task/732/fdinfo/192: No such file or directory find: ./proc/622/task/737/fdinfo/166: No such file or directory find: ./proc/622/task/737/fdinfo/192: No such file or directory find: ./proc/622/task/741/fdinfo/166: No such file or directory find: ./proc/622/task/747/fdinfo/166: No such file or directory find: ./proc/622/task/747/fdinfo/192: No such file or directory find: ./proc/622/task/751/fdinfo/166: No such file or directory find: ./proc/622/task/751/fdinfo/192: No such file or directory find: ./proc/622/task/752/fdinfo/193: No such file or directory find: ./proc/622/task/760/fdinfo/192: No such file or directory find: ./proc/622/task/761/fdinfo/193: No such file or directory find: ./proc/622/task/773/fd/166: No such file or directory find: ./proc/622/task/774/fdinfo/193: No such file or directory find: ./proc/622/task/778/fd/192: No such file or directory find: ./proc/622/task/779/fdinfo/193: No such file or directory find: ./proc/622/task/782/fd/193: No such file or directory find: ./proc/622/task/786/fd/166: No such file or directory find: ./proc/622/task/786/fd/192: No such file or directory find: ./proc/622/task/790/fd/192: No such file or directory find: ./proc/622/task/794/fd/166: No such file or directory find: ./proc/622/task/794/fd/192: No such file or directory find: ./proc/622/task/800/fdinfo/193: No such file or directory find: ./proc/622/task/804/fd/192: No such file or directory find: ./proc/622/task/808/fdinfo/193: No such file or directory ./usr/sbin/nginx # 一堆文件(包含nginx可執行文件)嘗試手動啟動nginx
nginx -c /etc/nginx/nginx.conf [root@RV1126_RV1109:/]# nginx -c /etc/nginx/nginx.conf nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory) 2021/10/19 15:28:41 [emerg] 1770#0: mkdir() "/var/tmp/nginx/client-body" failed (2: No such file or directory)是nginx權限不夠?
查看nginx命令在哪:
[root@RV1126_RV1109:/usr/sbin]# type nginx nginx is /usr/sbin/nginx [root@RV1126_RV1109:/usr/sbin]#切換到/usr/sbin
查看文件權限,發現nginx其他用戶組不具備寫權限
[root@RV1126_RV1109:/usr/sbin]# ls -lah total 11M drwxrwxr-x 2 root root 4.0K Jan 6 2021 . drwxrwxr-x 9 root root 4.0K Sep 24 02:06 .. ...省略 -rwxrwxr-x 1 root root 832K Feb 27 2021 nginx ...省略給它賦權限
[root@RV1126_RV1109:/usr/sbin]# chmod 777 nginx然后再執行:
nginx -c /etc/nginx/nginx.conf還是不行,一樣的錯誤:
[root@RV1126_RV1109:/usr/sbin]# nginx -c /etc/nginx/nginx.conf nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory) 2021/10/19 15:42:22 [emerg] 2434#0: mkdir() "/var/tmp/nginx/client-body" failed (2: No such file or directory)20211020 DS后臺daemon運行的時候也沒看到nginx在跑,我把daemon禁用看看?
[root@RV1126_RV1109:/usr/sbin]# ps -aux | grep nginx root 911 0.0 0.0 2100 224 pts/0 S+ 16:26 0:00 grep nginx你看都沒看到nginx在跑
禁用daemon
[root@RV1126_RV1109:/usr/sbin]# cd /opt/init/ [root@RV1126_RV1109:/opt/init]# [root@RV1126_RV1109:/opt/init]# vi run.sh
reboot重啟
。。。
20211022 得了,看這個吧,解決了
https://dontla.blog.csdn.net/article/details/120855079
總結
以上是生活随笔為你收集整理的arm linux下nginx服务无法正常启动是什么原因?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: nginx报错:nginx: [aler
- 下一篇: VMware ubuntu虚拟机怎么设置