Yunohost shows "nginx 404 error" after 3 or 4 days of service

Hi everyone,

I’m having a problem I think with my mounted usb external disk on /home.
There is no problem during 3 or 4 days then I can’t connect to my raspberry-pi (on yunohost) and got nginx 404 error.
When I disconnect/reconnect the usb external disk from the raspberry-pi and hard reboot the raspberry-pi, it works but it means I have to be at home when it stops and thats sucks :/.
Maybe some of you have experienced the same issue or have any idea to solve this.

Thanks by advance for your help :slight_smile:

Do you have Nginx’s logs around the moment it stopped ? Maybe the answer is here :slight_smile:

Hi and thanks for your answer,

I’ve been waiting for many crashes to occur and that’s what i get every time :


May 30 07:37:10 YunoHost postfix/smtpd[19559]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
May 30 07:37:11 YunoHost postfix/smtpd[19559]: disconnect from unknown[52.169.198.95]
May 30 07:37:49 YunoHost dovecot: imap-login: Login: user=, method=PLAIN, rip=37.165.24.231, lip=192.168.1.13, mpid=19566, TLS, session=
May 30 07:37:49 YunoHost imap: antispam: plugin initialising (2.0-notgit)
May 30 07:37:49 YunoHost imap: antispam: “Junk” is exact match spam folder
May 30 07:37:49 YunoHost imap: antispam: “SPAM” is exact match spam folder
May 30 07:37:49 YunoHost imap: antispam: no unsure folders
May 30 07:37:49 YunoHost imap: antispam: “Trash” is exact match trash folder
May 30 07:37:49 YunoHost imap: antispam: pipe backend spam argument = learn_spam
May 30 07:37:49 YunoHost imap: antispam: pipe backend not-spam argument = learn_ham
May 30 07:37:49 YunoHost imap: antispam: pipe backend program = /usr/bin/rspamc
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[0] = -h
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[1] = localhost:11334
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[2] = -P
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[3] = q1
May 30 07:37:49 YunoHost imap: antispam: pipe backend tmpdir /tmp
May 30 07:37:49 YunoHost dovecot: imap-login: Login: user=, method=PLAIN, rip=37.165.24.231, lip=192.168.1.13, mpid=19567, TLS, session=
May 30 07:37:49 YunoHost imap: antispam: plugin initialising (2.0-notgit)
May 30 07:37:49 YunoHost imap: antispam: “Junk” is exact match spam folder
May 30 07:37:49 YunoHost imap: antispam: “SPAM” is exact match spam folder
May 30 07:37:49 YunoHost imap: antispam: no unsure folders
May 30 07:37:49 YunoHost imap: antispam: “Trash” is exact match trash folder
May 30 07:37:49 YunoHost imap: antispam: pipe backend spam argument = learn_spam
May 30 07:37:49 YunoHost imap: antispam: pipe backend not-spam argument = learn_ham
May 30 07:37:49 YunoHost imap: antispam: pipe backend program = /usr/bin/rspamc
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[0] = -h
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[1] = localhost:11334
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[2] = -P
May 30 07:37:49 YunoHost imap: antispam: pipe backend program arg[3] = q1
May 30 07:37:49 YunoHost imap: antispam: pipe backend tmpdir /tmp
May 30 07:39:02 YunoHost CRON[19573]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
May 30 07:40:31 YunoHost postfix/anvil[19561]: statistics: max connection rate 1/60s for (smtp:52.169.198.95) at May 30 07:37:10
May 30 07:40:31 YunoHost postfix/anvil[19561]: statistics: max connection count 1 for (smtp:52.169.198.95) at May 30 07:37:10
May 30 07:40:31 YunoHost postfix/anvil[19561]: statistics: max cache size 1 at May 30 07:37:10
May 30 07:43:24 YunoHost postfix/smtpd[19657]: warning: /etc/postfix/main.cf, line 150: overriding earlier entry: milter_protocol=6
May 30 07:43:24 YunoHost postfix/smtpd[19657]: warning: /etc/postfix/main.cf, line 152: overriding earlier entry: smtpd_milters=unix:/run/rmilter/rmilter.sock
May 30 07:43:24 YunoHost postfix/proxymap[19658]: warning: /etc/postfix/main.cf, line 150: overriding earlier entry: milter_protocol=6
May 30 07:43:24 YunoHost postfix/proxymap[19658]: warning: /etc/postfix/main.cf, line 152: overriding earlier entry: smtpd_milters=unix:/run/rmilter/rmilter.sock
May 30 07:43:24 YunoHost postfix/smtpd[19657]: connect from unknown[41.226.11.226]
May 30 07:43:24 YunoHost postfix/anvil[19659]: warning: /etc/postfix/main.cf, line 150: overriding earlier entry: milter_protocol=6
May 30 07:43:24 YunoHost postfix/anvil[19659]: warning: /etc/postfix/main.cf, line 152: overriding earlier entry: smtpd_milters=unix:/run/rmilter/rmilter.sock
May 30 07:43:24 YunoHost postfix/smtpd[19657]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused
May 30 07:43:25 YunoHost postfix/smtpd[19657]: disconnect from unknown[41.226.11.226]


Thanks for your help !

Hi there,

unfortunately those aren’t nginx logs :s

Nginx logs are located in /var/log/nginx/ (typically your.domain.tld-access.log and your.domain.tld-error.log).
Can you show us the end of these files when you get the 404 Error ? (ProTip : you can use tail -n 50 the_filename to display the last 50 lines of a file)

Also check the status of nginx with service nginx status.

Btw the logs you are showing tends to say that there’s some minor issue in the postfix configuration. Have you been tweaking it by hand ?

Cheers !

Alex

Ow, yes sorry !

So there is the files content before the last crash :

nginx/error.log:

2017/05/30 07:17:12 [info] 905#0: Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:63
2017/05/30 07:17:12 [info] 905#0: [lua] init.lua:57: SSOwat ready/

nginx/mydomain-access.log:

192.168.1.254 - - [30/May/2017:06:25:07 +0000] “HEAD / HTTP/1.1” 302 0 “-” “python-requests/2.4.3 CPython/2.7.9 Linux/4.9.24-v7+”
2a01:e35:8a85:35c0:6cf1:84a7:9fc8:bbfd - gohu [30/May/2017:06:55:57 +0000] “PROPFIND /nextcloud/remote.php/dav/addressbooks/users/gohu/Contacts%20Gohu/ HTTP/1.1” 207 849 “-” “DAVdroid/1.5.2-ose (2017/05/15; dav4android; okhttp3) Android/7.1.2”
2a01:e35:8a85:35c0:6cf1:84a7:9fc8:bbfd - gohu [30/May/2017:06:55:57 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “DAVdroid/1.5.2-ose (2017/05/15; dav4android; okhttp3) Android/7.1.2”
82.226.243.72 - - [30/May/2017:07:09:31 +0000] “GET /remote.php/webdav/ HTTP/1.1” 302 154 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:31 +0000] “GET /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC93ZWJkYXYv HTTP/1.1” 200 966 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “GET /remote.php/webdav/ HTTP/1.1” 302 154 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “GET /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC93ZWJkYXYv HTTP/1.1” 200 966 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /remote.php/caldav/ HTTP/1.1” 302 154 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC9jYWxkYXYv HTTP/1.1” 405 166 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “GET /remote.php/webdav/ HTTP/1.1” 302 154 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /.well-known/caldav HTTP/1.1” 301 178 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “GET /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC93ZWJkYXYv HTTP/1.1” 200 966 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:32 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “GET /remote.php/webdav/ HTTP/1.1” 302 154 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “GET /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC93ZWJkYXYv HTTP/1.1” 200 966 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “PROPFIND /nextcloud/remote.php/dav HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “GET /remote.php/webdav/ HTTP/1.1” 302 154 “-” “-”
82.226.243.72 - gohu [30/May/2017:07:09:33 +0000] “PROPFIND /nextcloud/remote.php/dav HTTP/1.1” 207 872 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “GET /yunohost/sso/?r=aHR0cHM6Ly9ocS5uZXRsaWIucmUvcmVtb3RlLnBocC93ZWJkYXYv HTTP/1.1” 200 966 “-” “-”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 401 567 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:33 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “PROPFIND /nextcloud/remote.php/dav/principals/users/gohu/ HTTP/1.1” 207 816 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 572 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/ HTTP/1.1” 207 3482 “-” “Evolution/3.22.7”
82.226.243.72 - - [30/May/2017:07:09:34 +0000] “PROPFIND /.well-known/carddav HTTP/1.1” 301 178 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:34 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “PROPFIND /nextcloud/remote.php/dav HTTP/1.1” 207 869 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 572 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:35 +0000] “PROPFIND /nextcloud/remote.php/dav/principals/users/gohu/ HTTP/1.1” 207 642 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “PROPFIND /nextcloud/remote.php/dav/addressbooks/users/gohu/ HTTP/1.1” 207 1218 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:36 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 572 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:37 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:37 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:37 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 572 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:37 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:38 +0000] “REPORT /nextcloud/remote.php/dav/calendars/gohu/contact_birthdays/ HTTP/1.1” 207 295 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:38 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:38 +0000] “OPTIONS /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 200 0 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:39 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”
82.226.243.72 - gohu [30/May/2017:07:09:39 +0000] “PROPFIND /nextcloud/remote.php/dav/calendars/gohu/personal/ HTTP/1.1” 207 562 “-” “Evolution/3.22.7”

nginx/mydomain-error.log:
empty since 2017/05/18:

2017/05/18 23:28:52 [error] 18250#0: *3143 open() “/usr/share/nginx/html/.well-known/autoconfig/mail/config-v1.1.xml” failed (2: No such file or directory), client: 2a01:e35:8a85:35c0:84b9:6906:cc73:1b14, server: hq.netlib.re, request: “GET /.well-known/autoconfig/mail/config-v1.1.xml?emailaddress=gohu%40hq.netlib.re HTTP/1.1”, host: “hq.netlib.re

service nginx status:

Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: active (running) since mar. 2017-05-30 07:17:14 UTC; 1 day 6h ago
Main PID: 1405 (nginx)
CGroup: /system.slice/nginx.service
├─1405 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─1406 nginx: worker process
├─1407 nginx: worker process
├─1408 nginx: worker process
└─1409 nginx: worker process

mai 30 07:17:10 YunoHost systemd[1]: Starting A high performance web server and a reverse proxy server…
mai 30 07:17:14 YunoHost systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
mai 30 07:17:14 YunoHost systemd[1]: Started A high performance web server and a reverse proxy server.

Thanks !

Hugo

Uuuuh okay, but there’s no sign of “404 error” in there. Are you trying to fix the 404 error, or the reboot thing ? Or do you expect them to be related somehow ?

The “404 error” shows up when my logs stops (That’s what i sent). Impossible to access my yunohost even using SSH.
So I need to reboot it manually to fix this.
Is it possible that my external disk mounted on /home stops or freezes and provoke this ?

I think my external disk is going to sleep at some point.
It’s a “WD MyBook” external disk.

So i installed hd-idle and set-up idle-time to 0 so it won’t go to sleep.

I hope it will work, i will come back to tell you.

Thanks to all helpers :slight_smile:

Hugo