[Resolved] Bad gateway on Dokuwiki / Baikal / Rainloop after migration and restore

Hello,
I need some help after looking for in the forum

My YunoHost configuration

Hardware: x64 vps
Internet access: in a datacenter
YunoHost version:
yunohost: 3.2.2
yunohost-admin: 3.2.1
moulinette: 3.2.0
ssowat: 3.2.0
Have you personalized your yunohost with some specifics configurations or do you use only the yunohost cli/webadmin tool ? basic

Description of my problem

So the context: From raspberry with Debian 8 Yunohost 2.7 (latest), I migrate to Debian 9 an yunohost 3
Then I made a backup
Then I create a new VPS OVH with debian 9 I installed Yunohost and restored the backup
So the probleme began
Mail is OK with Imap but not with roundcube rainloop neither and Dokiwiki Baikal

For exemple in dokuwiki the datas seem ok in /var/www/dokuwiki/data/pages, so restore was ok
I tried to delete the app dokuwiki and restore only in the backup the dokiwiki without error
Restart nginx
When l look in logs for

/var/log/nginx/error.log

2018/10/30 11:29:30 [crit] 20531#20531: *6933 connect() to unix:/run/php/php7.0-fpm-baikal.sock failed (2: No such file or directory) while connecting to upstream, client: 80.215.242.62, server: monserver.fr, request: “PROPFIND /baikal/card.php/addressbooks/jean/default/ HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.0-fpm-baikal.sock:”, host: “monserver.fr

But in /var/log/php7.0-fpm.log I saw tha for baikal dokiwiki is php5 and not php7

[30-Oct-2018 11:10:28] NOTICE: Reloading in progress …
[30-Oct-2018 11:10:28] NOTICE: reloading: execvp(“/usr/sbin/php-fpm7.0”, {“/usr/sbin/php-fpm7.0”, “–nodaemonize”, “–fpm-config”, “/etc/php/7.0/fpm/php-fpm.conf”})
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=7, “/var/run/php5-fpm-baikal.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=7, “/var/run/php5-fpm-baikal.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=8, “/var/run/php5-fpm-dokuwiki.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=8, “/var/run/php5-fpm-dokuwiki.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=9, “/var/run/php/php7.0-fpm-kanboard.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=9, “/var/run/php/php7.0-fpm-kanboard.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=10, “/var/run/php5-fpm-rainloop.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=10, “/var/run/php5-fpm-rainloop.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=11, “/var/run/php/php7.0-fpm-roundcube.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=11, “/var/run/php/php7.0-fpm-roundcube.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=12, “/var/run/php5-fpm-ttrss.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=12, “/var/run/php5-fpm-ttrss.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=13, “/run/php/php7.0-fpm.sock”
[30-Oct-2018 11:10:29] NOTICE: using inherited socket fd=13, “/run/php/php7.0-fpm.sock”
[30-Oct-2018 11:10:29] NOTICE: fpm is running, pid 19645
[30-Oct-2018 11:10:29] NOTICE: ready to handle connections
[30-Oct-2018 11:10:29] NOTICE: systemd monitor interval set to 10000ms
[30-Oct-2018 11:10:29] WARNING: [pool kanboard] child 20537 said into stderr: “ERROR: Unable to set php_value ‘always_populate_raw_post_data’”
[30-Oct-2018 11:10:29] WARNING: [pool kanboard] child 20541 said into stderr: “ERROR: Unable to set php_value ‘always_populate_raw_post_data’”
[30-Oct-2018 11:10:29] WARNING: [pool kanboard] child 20540 said into stderr: “ERROR: Unable to set php_value ‘always_populate_raw_post_data’”

What do you suggest to do ? Do You have an idea of the problem? and the origin?

Thanks a lot for helping

More infos, if neeed

{
“host”: “Debian 9.5”,
“kernel”: “4.9.0-8-amd64”,
“packages”: {
“yunohost”: {
“repo”: “stable”,
“version”: “3.2.2”
},
“yunohost-admin”: {
“repo”: “stable”,
“version”: “3.2.1”
},
“moulinette”: {
“repo”: “stable”,
“version”: “3.2.0”
},
“ssowat”: {
“repo”: “stable”,
“version”: “3.2.0”
}
},
“backports”: ,
“system”: {
“disks”: {
“sda1”: “Mounted on /, 39.4GiB (30.3GiB free)”
},
“memory”: {
“ram”: “3.8GiB (3.0GiB free)”,
“swap”: “0B (0B free)”
}
},
“nginx”: [
“nginx: the configuration file /etc/nginx/nginx.conf syntax is ok”,
“nginx: configuration file /etc/nginx/nginx.conf test is successful”
],
“services”: {
“glances”: “running (enabled)”,
“nslcd”: “running (enabled)”,
“metronome”: “running (enabled)”,
“postfix”: “exited (enabled)”,
“rspamd”: “running (enabled)”,
“yunohost-firewall”: “exited (enabled)”,
“dovecot”: “running (enabled)”,
“nginx”: “running (enabled)”,
“php7.0-fpm”: “running (enabled)”,
“dnsmasq”: “running (enabled)”,
“fail2ban”: “running (enabled)”,
“yunohost-api”: “running (enabled)”,
“mysql”: “running (enabled)”,
“avahi-daemon”: “running (enabled)”,
“shellinabox”: “running (enabled)”,
“redis-server”: “running (enabled)”,
“slapd”: “running (enabled)”,
“ssh”: “running (enabled)”
},
“applications”: {
“kanboard”: “Kanboard”,
“dokuwiki”: “Dokuwiki”,
“ttrss”: “Tiny Tiny RSS”,
“rainloop”: “Rainloop”,
“roundcube”: “Roundcube”,
“shellinabox”: “Shell In A Box”,
“jappix”: “Jappix”,
“wallabag”: “Wallabag”,
“baikal”: “Baikal”
},
“security”: {
“CVE-2017-5754”: {
“name”: “meltdown”,
“vulnerable”: false
}
}
}


To me it looks like the restore in Debian 9 (Yunohost 3.x) from Debian 8 (Yunohost 2.x) wasnt 100% successful ?

Anyway, can you check the status of php-fpm with : systemctl status php7.0-fpm

My first action was to upgrade with Yunohost migration tool Debian 8 Yuno V2.7 to Debian 9 Hyunohost V3.2 on Raspberry
In fact There have been a backup from Raspberry-Debian 9-Yunohost 3 and a restore on VPS-Debian 9-Yunohost 3

Thx for your help
see the result of systemctl status php7.0-fpm

● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-10-30 11:01:18 CET; 3h 32min ago
Docs: man:php-fpm7.0(8)
Process: 20508 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 19645 (php-fpm7.0)
Status: “Processes active: 0, idle: 17, Requests: 0, slow: 0, Traffic: 0req/sec”
Tasks: 18 (limit: 4915)
CGroup: /system.slice/php7.0-fpm.service
├─19645 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
├─20532 php-fpm: pool baikal
├─20533 php-fpm: pool baikal
├─20534 php-fpm: pool baikal
├─20535 php-fpm: pool dokuwiki
├─20536 php-fpm: pool dokuwiki
├─20537 php-fpm: pool kanboard
├─20540 php-fpm: pool kanboard
├─20541 php-fpm: pool kanboard
├─20542 php-fpm: pool rainloop
├─20543 php-fpm: pool rainloop
├─20544 php-fpm: pool rainloop
├─20545 php-fpm: pool roundcube
├─20546 php-fpm: pool roundcube
├─20547 php-fpm: pool ttrss
├─20548 php-fpm: pool ttrss
├─20549 php-fpm: pool www
└─20550 php-fpm: pool www

Oct 30 11:01:18 monserver.fr systemd[1]: Starting The PHP 7.0 FastCGI Process Manager…
Oct 30 11:01:18 monserver.fr systemd[1]: Started The PHP 7.0 FastCGI Process Manager.
Oct 30 11:10:28 monserver.fr systemd[1]: Reloading The PHP 7.0 FastCGI Process Manager.
Oct 30 11:10:28 monserver.fr systemd[1]: Reloaded The PHP 7.0 FastCGI Process Manager.

So can you elaborate what you mean by :

I can acces to the mail (send/receive) in IMAP with thunderbird/K9-mail, but not with webmail client,

  • Rainloop, dokiwiki, baikal ttrssare NOK (bad gateway)
  • Rouncube , Shell In a Box, Jappix are OK
  • Kanboard is OK (but my data have not been restore, but I don’t mind)

Okay, now I understand better. I indeed think it’s related to the /var/run/php5-fpm-ttrss.sock you found in php’s log.

To fix your issue, I think you should do the following

  • go in /etc/php/7.0/fpm/pool.d
  • here, you shall find file corresponding to baikal, dokuwiki, and rainloop.
  • in each of them, you should find a line containing stuff like /var/run/php5-fpm-appname.sock. Replace this path with /var/run/php/php7.0-fpm-appname.sock (replacing ‘appname’ with the name of the app…)
  • now go to /etc/nginx/conf.d/your.domain.tld.d/
  • here you shall find some other files for your three apps
  • again, you should find a line containing stuff like /var/run/php5-fpm-appname.sock. Replace this path with /var/run/php/php7.0-fpm-appname.sock (replacing ‘appname’ with the name of the app…)
  • restart php7.0-fpm and reload nginx with ‘systemctl restart php7.0-fpm’ and ‘systemctl reload nginx
  • ???
  • PROFIT (hopefully if there’s no syntax error :stuck_out_tongue:)
1 Like

NICE Thats Works !!!
Done on Dokuwiki

Now I will do it for other apps !!!

The files in /etc/php/7.0/fpm/pool.d was coorupted wuth php5 but in /etc/nginx/conf.d/your.domain.tld.d/ it was correct !

I check the others and then I will mark this post has resolved.

A BIG THANKS You save my day :slight_smile:

1 Like

OK for all apps !

Nice jobs ! Thanks again ! Now my migration is FULL ! :grinning::+1::clap:

1 Like