fastcgi-problem with dietpi x86 lighttpd nextcloud collabora [solved]

Having issues with your DietPi installation or found a bug? Post it here.
rick110
Posts: 4
Joined: Thu Dec 10, 2020 9:12 pm

fastcgi-problem with dietpi x86 lighttpd nextcloud collabora [solved]

Post by rick110 »

Hi,

I am running on dietpi x86 and installed LLMP and nextcloud. In nextcloud I activated the collabora CODE - Server.

Formerly I used Arch Linux and nextcloud worked with the LLMP-stack pretty well, even the collabora-server.

When I try to work with a document in collabora there is no connection to the collabora-server. The workspace remains empty.

The lighttpd error.log shows the following entry:

Code: Select all

(mod_fastcgi.c.421) FastCGI-stderr: PHP message: PHP Warning:  file_get_contents(http://localhost:9982/hosting/capabilities): failed to open stream: HTTP request failed! in /var/www/nextcloud/apps/richdocumentscode/proxy.php on line 208
Has anyone an idea how to fix it?

Thank you in advance

Rick
Last edited by rick110 on Sat Dec 12, 2020 7:54 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by Joulinar »

Hi,

many thanks for your message. According the error, your system is trying to connect to http://localhost:9982/hosting/capabilities

can you check LISTEN ports

Code: Select all

ss -tulpn | grep LISTEN
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
rick110
Posts: 4
Joined: Thu Dec 10, 2020 9:12 pm

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by rick110 »

Thank you for the fast response.

I can call the page

http://localhost:9982/hosting/capabilities

it shows a lot of information.

Code: Select all

ss -tulpn | grep LISTEN
shows a lot of ports, so I used

Code: Select all

ss -tulpn | grep LISTEN | grep 9982
and I got:

Code: Select all

tcp    LISTEN   0        64                      *:9982                 *:*      users:(("loolwsd",pid=10547,fd=18))
So I think, the adress is reachable, I have no clue, why fastcgi says "fails to open the Stream"
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by Joulinar »

ok it took me a while to get a x86 system up and running but finally it's working for me. Can you check following on nextcloud

Go to
  1. Settings
  2. Administration
  3. Collabora Online Development Edition
  4. check "Use your own server"
  5. enter "http://<your_ip>:9982"
should looks like this

picture.PNG

now I'm able to open documents

picture1.PNG
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
rick110
Posts: 4
Joined: Thu Dec 10, 2020 9:12 pm

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by rick110 »

Hi,

I had to sleep and work a liitle bit in meantime.

I am using the nextcloud collabora CODE-Server-App.

I tried to activate the first menu point "own server" with the following adress (btw.: the IP is the correct one of the localhost): http://192.168.178.80:9982

The server was accepted with a green checkmark, but when i tried to edit an document, the screen remained black. That a little less than before, when the screen went grey and showed the menu-headline.

I mentioned that the "own server" is only accepted, when i startet the built-in CODE-server before.

Thank you for your help!
rick110
Posts: 4
Joined: Thu Dec 10, 2020 9:12 pm

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by rick110 »

I just found the origin of the problem and the solution:

In the lighty config-file

Code: Select all

/etc/lighttpd/lighttpd.conf
in the section

Code: Select all

server.http-parseopts = (
  "header-strict"           => "enable",# default
  "host-strict"             => "enable",# default
  "host-normalize"          => "enable",# default
  "url-normalize-unreserved"=> "enable",# recommended highly
  "url-normalize-required"  => "disable",# recommended
  "url-ctrls-reject"        => "enable",# recommended
  "url-path-2f-decode"      => "enable",# recommended highly (unless breaks app)
 #"url-path-2f-reject"      => "enable",
  "url-path-dotseg-remove"  => "enable",# recommended highly (unless breaks app)
 #"url-path-dotseg-reject"  => "enable",
 #"url-query-20-plus"       => "enable",# consistency in query string
)
the following keyword

Code: Select all

"url-normalize-required"  => "disable",# recommended
must to be disabled.

Maybe that information maybe helpful for anybody ;)
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora [solved]

Post by Joulinar »

strange for me this is working with default web server settings
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
krtpowa
Posts: 12
Joined: Wed Jan 31, 2018 1:10 am
Location: Spain
Contact:

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by krtpowa »

rick110 wrote: Sat Dec 12, 2020 7:52 pm I just found the origin of the problem and the solution:

In the lighty config-file

Code: Select all

/etc/lighttpd/lighttpd.conf
in the section

Code: Select all

server.http-parseopts = (
  "header-strict"           => "enable",# default
  "host-strict"             => "enable",# default
  "host-normalize"          => "enable",# default
  "url-normalize-unreserved"=> "enable",# recommended highly
  "url-normalize-required"  => "disable",# recommended
  "url-ctrls-reject"        => "enable",# recommended
  "url-path-2f-decode"      => "enable",# recommended highly (unless breaks app)
 #"url-path-2f-reject"      => "enable",
  "url-path-dotseg-remove"  => "enable",# recommended highly (unless breaks app)
 #"url-path-dotseg-reject"  => "enable",
 #"url-query-20-plus"       => "enable",# consistency in query string
)
the following keyword

Code: Select all

"url-normalize-required"  => "disable",# recommended
must to be disabled.

Maybe that information maybe helpful for anybody ;)
I have tried this, but it does not work for me, I have been testing for several days .. there is a docker with collabora-code, I have it working, in the Nextcloud configuration it makes a green check, but when opening the file, the screen remains blank.

There is no easy way to configure collaborate with dietpi? collabora / onlyoffice / ms Office online

Thanks
krtpowa
Posts: 12
Joined: Wed Jan 31, 2018 1:10 am
Location: Spain
Contact:

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora

Post by krtpowa »

Joulinar wrote: Fri Dec 11, 2020 12:17 am ok it took me a while to get a x86 system up and running but finally it's working for me. Can you check following on nextcloud

Go to
  1. Settings
  2. Administration
  3. Collabora Online Development Edition
  4. check "Use your own server"
  5. enter "http://<your_ip>:9982"
should looks like this


picture.PNG


now I'm able to open documents


picture1.PNG
This not work on Arm64? it would be great for raspberry, because I think there is no other alternative.
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: fastcgi-problem with dietpi x86 lighttpd nextcloud collabora [solved]

Post by Joulinar »

for me it is working well on RPi4B 64bit
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply