GuzzleHttp Name Already in Use

Steps to reproduce
Nextcloud functions correectly, except when trying to open a file with Collabora
Error reproduced when selecting file and then pop up occurs at top of screen which states: “Failed to load Collabora Online - Please try again later”

Expected behaviour
Collabora should open document for editing

Actual behaviour
Error discussed as above
[php7:error] [pid 13759] [client 10.5.2.119:39472] PHP Fatal error: Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use in /var/www/wo-lar.com/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php
nextcloud.log and loolwsd.log are empty

Versions:
CODE-brand-4.0-2.noarch
loolwsd-4.0.1-1.el7.x86_64

Server configuration
The server is a modem/router and as such has two NICs; 1 for LAN and the other for WAN
I do have letsencrypt certificates for my main domain (wo-lar.com/www.wo-lar.com) and a seperate for loolwsd; doc.wo-lar.com
Native (no docker) installation of nextcloud and collabora on the same physical server
the service loolwsd is up and running
● loolwsd.service - LibreOffice Online WebSocket Daemon
Loaded: loaded (/usr/lib/systemd/system/loolwsd.service; enabled; vendor preset: disabled)
Active: active (running) since Fr 2019-03-01 17:28:58 CET; 32min ago
Main PID: 13929 (loolwsd)
CGroup: /system.slice/loolwsd.service
├─13929 /usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:child_root_path=/opt/lool/child-roots --o:file_se…
├─13931 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.0 --childroot=/opt…
└─13951 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.0 --childroot=/opt…

Operating system:
CENTOS 7

Web server:
Apache Webserver httpd-2.4.6-88.el7.centos.x86_64
Settings in loolwsd concerning termination and ssl:

true
false

Therefore I used the proxy settings for 1. SSL on both ends: The corresponding loolwsd setting is ssl.enable=true.

Database:
MariaDB-server-10.3.13-1.el7.centos.x86_64

PHP version:
PHP 7.2.15

Nextcloud version: (see Nextcloud admin page)
Nextcloud 15.0.5

Updated from an older Nextcloud/ownCloud or fresh install: 15.0.4

This seems to be a common problem. I read quite a few strings of messages dealing with this problem. Unfortunately, I cannot find a solution.

I appreciate your help iun getting this fixed.

Wolfgang

If you are use version 3.2.1 of the Nextcloud collabora app try using version 3.1.1.
3.2.1 is still buggy.

Reality is passing me. Newest version 3.2.2 works fine.

Not for me. Originally I got the same error as wp.rauchholz, the I tried to downgrade but it did not help. Now with 3.2.2 I get all kinds of errors :frowning:

same issue here, collabora docker is running fine, no error in the log files, downgrade did not help so back to 3.2.2 and on nginx not apache and error:
2019/03/02 16:32:45 [error] 1507#1507: *927 FastCGI sent in stderr: “PHP message: PHP Fatal error: Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use in /var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 15” while reading response header from upstream, client: 77.249.189.251, server: cloud.drieendertig.nl, request: “GET /index.php/apps/richdocuments/index?fileId=19&requesttoken=t0qdtu32IVFNqqPohfZpvaiAtKCxgHdLd1lW7tUuGwU%3D%3A9CHI%2FIG4ZWcD4uiytZ9Yz5313%2B3m2iQ9Mz0Sr4BMUW4%3D HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “cloud.drieendertig.nl”
2019/03/02 16:32:45 [error] 1507#1507: *927 upstream sent invalid status “0” while reading response header from upstream, client: 77.249.189.251, server: cloud.drieendertig.nl, request: “GET /index.php/apps/richdocuments/settings/check HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “cloud.drieendertig.nl”

Going through the the different posts I really can’t find a pattern that would help me to explain or get me a glue where to start. Debugging is not easy here.
Looking forward for some expert to give us some advices.

Wolfgang

Im having the same issue with the same error message , Any help would be appreciated.

This workaround works for us:

  1. Add a new Domain (for example www2.yourcloud.xyz) in your collabora and restart Collabora
  2. Go to /settings/admin/richdocuments and change the Collabora to the new Domain
  3. Save the settings

Now, Collabora should work. After Collabora works again, then you can change back to the old Domain.

1 Like

Thank you, can you give me more detail, im running Nextcloud 15.0.5
and Collabora 3.2.3
Here is the docker log its a bit long does this make any sense
wsd-00030-00030 2019-03-07 15:34:48.413828 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/ui-zh_TW.json as ‘/loleaflet/dist/l10n/ui-zh_TW.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.414962 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/help-sat.json as ‘/loleaflet/dist/l10n/help-sat.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.415114 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/help-sk.json as ‘/loleaflet/dist/l10n/help-sk.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.415776 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/help-kok.json as ‘/loleaflet/dist/l10n/help-kok.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.415929 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/help-dsb.json as ‘/loleaflet/dist/l10n/help-dsb.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.416674 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/ui-cs.json as ‘/loleaflet/dist/l10n/ui-cs.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.417697 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/ui-vec.json as ‘/loleaflet/dist/l10n/ui-vec.json’| wsd/FileServer.cpp:476
wsd-00030-00030 2019-03-07 15:34:48.418118 [ loolwsd ] TRC Reading file: '/usr/share/loolwsd/loleaflet/dist/l10n/ui-ve.json as ‘/loleaflet/dist/l10n/ui-ve.json’| wsd/FileServer.cpp:476

preload: merged unordf ucpchelp1 msforms vbaobj pcr vbaswobj sw animcore hwp flash chartcore solver sc wpftcalc xof ucpcmis1 wpftdraw sd svgfilter evtatt ucpftp1 graphicfilter wpftimpress sdfilt sm:failed

:failed

:failed

:failed

:failed

:failed

:failed

:failed

:failed

:failed

:failed

pdffilter PresentationMinimizer rptxml:failed

:failed

:failed

:failed

protocolhandler ucpdav1 wpftwriter msword lwpft writerfilter t602filter xmlfa basctl binaryurp uuresolver scd chartcontroller ldapbe2 dba sdbt dbu:failed

Here is the whole log

Im very new at this and i thank you in advance for any advice and help

Can you pastebin the log? The errors you have posted – I have the same errors as you above but it doesn’t seem to alter things.

https://pastebin.com/hceHYpfR

Next cloud error
https://pastebin.com/PFyFUAuU

@JABAHOSTING, Do you mean with “new domain” a new one for the Collabora Online server?

I have tried so but did not solve the problem. I still have the error “Failed to load Collabora Online - please try again later” while opening an office document within the Nextcloud UI.

Apache error log:

mod_fcgid: stderr: PHP Fatal error: Cannot declare class GuzzleHttp\\Handler\\CurlFactory, because the name is already in use in /var/www/clients/client1/web7/web/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 15

Fresh installation of Ubuntu 18.04, NC 15.05, Collabora Online 3.2.3

Edit:
After switching back to the previous Collabora Online domain but without port (9980) it is working.

:slight_smile:

Thanks for answering. I assume step 1 is chaning loolwsd.xml?

Can I use any domain?

Wolfgang

 
sure.

Why Port 9980? In Nextcloud you must to use the port 443 or without a port.

did you edit the files pointing to 9980 or just in nextcloud?
Did you create a new A record to point to the same server?
Please advise on all your steps it would be very helpfull and i thank you in advance

Because i’m starting Docker with port 9980.

See Collabora installation instructions:

Cleary changing the domain name within collabora and within nextcloud doesn’t work:

[Sun Mar 10 13:42:45.003356 2019] [proxy_fcgi:error] [pid 61427] [client 10.0.1.178:52779] Invalid status line from script ‘index.php’: 0
[Sun Mar 10 13:42:45.133846 2019] [proxy_fcgi:error] [pid 61176] [client 10.0.1.178:52778] AH01071: Got error ‘PHP message: PHP Fatal error: Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use in /usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 15\n’

You have to setup the reverse proxy for the second collabora domain as well.