Open Uwe-MrT opened 2 years ago
I can confirm this problem too!
It does not only occour after a complete system restart but also after a simple "service php-fpm restart". After that, documents are no longer opened but downloaded.
Only fix seems to be to save setting "use internal code" again.
I also tried to do this via CLI, bit it did not fix the issue: sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https:\/\/[domain]\/apps\/richdocumentscode\/proxy.php?req=
sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https:\/\/[domain]\/apps\/richdocumentscode\/proxy.php?req=
sudo -u collab php --define apc.enable_cli=1 occ richdocuments:activate-config
I noticed that after a php-fpm restart following lines are missing in "service php-fpm status": โโ416738 bash -c ( /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/c> โโ416739 /bin/bash /srv/www/collab/home/tmp/.mount_CollabZwuiv1/AppRun --pidfile=/srv/www/collab/home/tmp/coolwsd.pid โโ416743 /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/collab/home> โโ416747 coolwsd --config-file=/srv/www/collab/home/tmp/.mount_CollabZwuiv1/etc/coolwsd/coolwsd.xml --disable-cool-user-che> โโ416749 /srv/www/collab/home/tmp/.mount_CollabZwuiv1/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/> โโ425267 /srv/www/collab/home/tmp/.mount_CollabZwuiv1/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/>
Is there a CLI workaround on how to start the necessary child processes after php restart and why does nextcloud not start them automatically?
I think the main problem is that we cache the capabilities and the automatic start doesn't get triggered then for some reason.
Is there a CLI workaround on how to start the necessary child processes after php restart and why does nextcloud not start them automatically?
You could try to manually do a curl request to https://[domain]/apps/richdocumentscode/proxy.php?status to get the status and also trigger the start of the coolwsd process
That will trigger https://github.com/CollaboraOnline/richdocumentscode/blob/master/proxy.php#L246-L259
The situation there could improve with https://github.com/nextcloud/richdocuments/pull/1901, but would need to validate if that is actually the case.
You could try to manually do a curl request to https://[domain]/apps/richdocumentscode/proxy.php?status to get the status and also trigger the start of the coolwsd process
Does not work.
I can confirm that the call of this URL extends the php-fpm service status by the lines of the killed subprocesses. But something is still missing, as files still get downloaded and not opended by nextcloud office.
See:
1. Output with working nextclood office: service php-fpm status โ php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-02-14 12:37:49 CET; 33s ago Docs: man:php-fpm7.4(8) Process: 106291 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS) Main PID: 106262 (php-fpm7.4) Status: "Processes active: 0, idle: 28, Requests: 18, slow: 0, Traffic: 0.9req/sec" Tasks: 40 (limit: 2311) Memory: 761.4M CPU: 5.141s CGroup: /system.slice/php7.4-fpm.service โโ106262 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf) โโ106263 php-fpm: pool nextcloud โโ106264 php-fpm: pool nextcloud โโ106265 php-fpm: pool nextcloud โโ106266 php-fpm: pool nextcloud โโ106267 php-fpm: pool nextcloud โโ106268 php-fpm: pool nextcloud โโ106269 php-fpm: pool nextcloud โโ106270 php-fpm: pool nextcloud โโ106271 php-fpm: pool nextcloud โโ106272 php-fpm: pool nextcloud โโ106273 php-fpm: pool nextcloud โโ106274 php-fpm: pool nextcloud โโ106275 php-fpm: pool nextcloud โโ106276 php-fpm: pool nextcloud โโ106277 php-fpm: pool nextcloud โโ106278 php-fpm: pool nextcloud โโ106279 php-fpm: pool nextcloud โโ106280 php-fpm: pool nextcloud โโ106281 php-fpm: pool nextcloud โโ106282 php-fpm: pool nextcloud โโ106283 php-fpm: pool nextcloud โโ106284 php-fpm: pool nextcloud โโ106285 php-fpm: pool nextcloud โโ106286 php-fpm: pool nextcloud โโ106287 php-fpm: pool nextcloud โโ106288 php-fpm: pool nextcloud โโ106289 php-fpm: pool nextcloud โโ106290 php-fpm: pool nextcloud โโ106958 bash -c ( /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/collab/home/tmp/coolwsd.pid || /srv/www/collab/home/www/apps/richdocumen> โโ106959 /bin/bash /srv/www/collab/home/tmp/.mount_CollabZNN7DU/AppRun --pidfile=/srv/www/collab/home/tmp/coolwsd.pid โโ106963 /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/collab/home/tmp/coolwsd.pid โโ106967 coolwsd --config-file=/srv/www/collab/home/tmp/.mount_CollabZNN7DU/etc/coolwsd/coolwsd.xml --disable-cool-user-checking --port=9983 --lo-template-path=/srv/www/collab/home/tmp/.mount_Co> โโ106969 /srv/www/collab/home/tmp/.mount_CollabZNN7DU/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/tmp/.mount_CollabZNN7DU/ --lotemplate=/srv/www/collab/home/tmp/.mount_C> โโ106972 /srv/www/collab/home/tmp/.mount_CollabZNN7DU/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/tmp/.mount_CollabZNN7DU/ --lotemplate=/srv/www/collab/home/tmp/.mount_C>
2. Output after "service php-fpm restart": service php-fpm status โ php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-02-14 12:40:09 CET; 1s ago Docs: man:php-fpm7.4(8) Process: 108453 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS) Main PID: 108424 (php-fpm7.4) Status: "Ready to handle connections" Tasks: 29 (limit: 2311) Memory: 35.8M CPU: 69ms CGroup: /system.slice/php7.4-fpm.service โโ108424 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf) โโ108425 php-fpm: pool nextcloud โโ108426 php-fpm: pool nextcloud โโ108427 php-fpm: pool nextcloud โโ108428 php-fpm: pool nextcloud โโ108429 php-fpm: pool nextcloud โโ108430 php-fpm: pool nextcloud โโ108431 php-fpm: pool nextcloud โโ108432 php-fpm: pool nextcloud โโ108433 php-fpm: pool nextcloud โโ108434 php-fpm: pool nextcloud โโ108435 php-fpm: pool nextcloud โโ108436 php-fpm: pool nextcloud โโ108437 php-fpm: pool nextcloud โโ108438 php-fpm: pool nextcloud โโ108439 php-fpm: pool nextcloud โโ108440 php-fpm: pool nextcloud โโ108441 php-fpm: pool nextcloud โโ108442 php-fpm: pool nextcloud โโ108443 php-fpm: pool nextcloud โโ108444 php-fpm: pool nextcloud โโ108445 php-fpm: pool nextcloud โโ108446 php-fpm: pool nextcloud โโ108447 php-fpm: pool nextcloud โโ108448 php-fpm: pool nextcloud โโ108449 php-fpm: pool nextcloud โโ108450 php-fpm: pool nextcloud โโ108451 php-fpm: pool nextcloud โโ108452 php-fpm: pool nextcloud
3. Output after call of : https://[domain]/apps/richdocumentscode/proxy.php?status Return code: "{"status":"starting"}"
service php-fpm status โ php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-02-14 12:40:09 CET; 1min 8s ago Docs: man:php-fpm7.4(8) Process: 108453 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS) Main PID: 108424 (php-fpm7.4) Status: "Processes active: 0, idle: 28, Requests: 11, slow: 0, Traffic: 0req/sec" Tasks: 40 (limit: 2311) Memory: 698.7M CPU: 4.554s CGroup: /system.slice/php7.4-fpm.service โโ108424 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf) โโ108425 php-fpm: pool nextcloud โโ108426 php-fpm: pool nextcloud โโ108427 php-fpm: pool nextcloud โโ108428 php-fpm: pool nextcloud โโ108429 php-fpm: pool nextcloud โโ108430 php-fpm: pool nextcloud โโ108431 php-fpm: pool nextcloud โโ108432 php-fpm: pool nextcloud โโ108433 php-fpm: pool nextcloud โโ108434 php-fpm: pool nextcloud โโ108435 php-fpm: pool nextcloud โโ108436 php-fpm: pool nextcloud โโ108437 php-fpm: pool nextcloud โโ108438 php-fpm: pool nextcloud โโ108439 php-fpm: pool nextcloud โโ108440 php-fpm: pool nextcloud โโ108441 php-fpm: pool nextcloud โโ108442 php-fpm: pool nextcloud โโ108443 php-fpm: pool nextcloud โโ108444 php-fpm: pool nextcloud โโ108445 php-fpm: pool nextcloud โโ108446 php-fpm: pool nextcloud โโ108447 php-fpm: pool nextcloud โโ108448 php-fpm: pool nextcloud โโ108449 php-fpm: pool nextcloud โโ108450 php-fpm: pool nextcloud โโ108451 php-fpm: pool nextcloud โโ108452 php-fpm: pool nextcloud โโ108485 bash -c ( /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/collab/home/tmp/coolwsd.pid || /srv/www/collab/home/www/apps/richdocumen> โโ108486 /bin/bash /srv/www/collab/home/tmp/.mount_CollabpH02Zp/AppRun --pidfile=/srv/www/collab/home/tmp/coolwsd.pid โโ108490 /srv/www/collab/home/www/apps/richdocumentscode/collabora/Collabora_Online.AppImage --pidfile=/srv/www/collab/home/tmp/coolwsd.pid โโ108494 coolwsd --config-file=/srv/www/collab/home/tmp/.mount_CollabpH02Zp/etc/coolwsd/coolwsd.xml --disable-cool-user-checking --port=9983 --lo-template-path=/srv/www/collab/home/tmp/.mount_Co> โโ108503 /srv/www/collab/home/tmp/.mount_CollabpH02Zp/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/tmp/.mount_CollabpH02Zp/ --lotemplate=/srv/www/collab/home/tmp/.mount_C> โโ108505 /srv/www/collab/home/tmp/.mount_CollabpH02Zp/usr/bin/coolforkit --losubpath=lo --systemplate=/srv/www/collab/home/tmp/.mount_CollabpH02Zp/ --lotemplate=/srv/www/collab/home/tmp/.mount_C>
-> But files still downloaded and not opened by nextcloud office until I click on "use builtin CODE". Any other idea how to trigger this step via CLI?
Can you try the following order maybe:
curl https://[domain]/apps/richdocumentscode/proxy.php?status
sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https://[domain]/apps/richdocumentscode/proxy.php?req=
sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https://[domain]/apps/richdocumentscode/proxy.php?req=
sudo -u collab php --define apc.enable_cli=1 occ richdocuments:activate-config
That way the config activation will have the code process already running when trying to connect for setting up.
curl https://[domain]/apps/richdocumentscode/proxy.php?status sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https://[domain]/apps/richdocumentscode/proxy.php?req= sudo -u collab php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https://[domain]/apps/richdocumentscode/proxy.php?req= sudo -u collab php --define apc.enable_cli=1 occ richdocuments:activate-config
That way the config activation will have the code process already running when trying to connect for setting up.
No, it's also not working. All commands acknowledged OK but still all files downloaded instead of opening in nextcloud office.
Hi, I have exact the same problem. this is causing frustration on my customers because automated updates are not working if you need to do manual action in nextcloud afterwards. It there any chance to get it fixed? I use NC 25.0.3 on Debian 11.
Hi, I have exact the same problem. this is causing frustration on my customers because automated updates are not working if you need to do manual action in nextcloud afterwards. It there any chance to get it fixed? I use NC 25.0.3 on Debian 11.
I think, this Problem was solved ? I dont have this Problem anymore Debian 11 + NC 25.0.3
but if not, i fixed it that way...
i made a script this script will be executet on debian restart (i re-activated /etc/rc.local) see https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd
My Script
#!/bin/bash
cd /var/www/html/nextcloud
curl https://YOUR-ADRESS/nextcloud/apps/richdocumentscode/proxy.php?status
sudo -u www-data php --define apc.enable_cli=1 occ config:app:set richdocuments public_wopi_url --value https://YOUR-ADRESS/nextcloud/apps/richdocumentscode/proxy.php?req= &
sudo -u www-data php --define apc.enable_cli=1 occ config:app:set richdocuments wopi_url --value https://YOUR-ADRESS/nextcloud/apps/richdocumentscode/proxy.php?req= &
sudo -u www-data php --define apc.enable_cli=1 occ richdocuments:activate-config &
You need to replace YOUR-ADRESS with your web adress.
I dont know, is it a good fix or not, but it worked for me well.
Iยดll give it a try. Thank you.
Describe the bug if i want open document, it dont open. it save (download) the document. i go to settings - nextcloud office (nextcloud/index.php/settings/admin/richdocuments) and set up "use internal code " now it works fine, until i restart my server. then i can redo the steps above
To Reproduce Restart your Server
Expected behavior open, not download
Screenshots If applicable, add screenshots to help explain your problem.
Client details:
Server details
Operating system: Debian Bullseye
Web server: Apache2
Database: mariadb (mysql 10.5.12)
PHP version: 8.0.14
Nextcloud version: 23
Version of the richdocuments app 5.0.1
Version of Collabora Online 21.11.6
Logs
#### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```