nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.56k stars 4.08k forks source link

GuzzleHttp Name Already in Use #14330

Closed kevdogg closed 5 years ago

kevdogg commented 5 years ago

Steps to reproduce

  1. Installed Nextcloud/apache. Collobora Server running on separate machine with Ubuntu
  2. Nextcloud seems to function normally except when trying to open a file with Collabora
  3. 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

Tell us what should happen Collabora should open document for editing

Actual behaviour

Tell us what happens instead Error discussed as above

I've referenced previously filed report which is similar in nature: https://github.com/nextcloud/server/issues/11278. All of my certificates are through LetsEncrypt and all are up to date. I can however access the WebAdmin at https://office.DOMAIN.com/loleaflet/dist/admin/admin.html. I don't get any error when displaying admin console. Following version of collabora is being used:

LOOLWSD 4.0.0 (git hash: b956fd1)

LOKit Collabora Office 6.0-23 (git hash: 6410049)

Server configuration

When attempting to debug problem with editing documents, I don't think collabora server is being reached as nothing shows within the logs to suggest loolwsd daemon has been accessed. Problem seems to originate on nextcloud server as GuzzleHTTP cannot declare class because name already in use "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'"

Operating system:

  1. FreeNas - 11.2-U2

Web server:

  1. Apache Webserver running in FreeBSD jail on Freenas - Apache/2.4.38 (FreeBSD)
  2. Collabora running as native service (not in docker container) within Virtualized Ubuntu setup - 18.04

Database: mysql Ver 15.1 Distrib 10.2.21-MariaDB, for FreeBSD11.2 (amd64) using readline 5.1

PHP version: PHP 7.2.15 (cli) (built: Feb 10 2019 01:14:31) ( NTS )

Nextcloud version: (see Nextcloud admin page)

Nextcloud 15.0.4

Updated from an older Nextcloud/ownCloud or fresh install:

Fresh install Nextcloud

Where did you install Nextcloud from:

FreeBSD repository using pkg

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.1.0 - activity: 2.8.2 - announcementcenter: 3.4.1 - apporder: 0.6.0 - audioplayer: 2.6.0 - calendar: 1.6.4 - cloud_federation_api: 0.1.0 - comments: 1.5.0 - contacts: 3.0.3 - dashboard: 6.0.0 - dav: 1.8.1 - dicomviewer: 1.1.0 - external: 3.2.0 - federatedfilesharing: 1.5.0 - federation: 1.5.0 - files: 1.10.0 - files_accesscontrol: 1.5.0 - files_pdfviewer: 1.4.0 - files_sharing: 1.7.0 - files_texteditor: 2.7.0 - files_trashbin: 1.5.0 - files_versions: 1.8.0 - files_videoplayer: 1.4.0 - firstrunwizard: 2.4.0 - gallery: 18.2.0 - groupfolders: 2.0.2 - logreader: 2.0.0 - lookup_server_connector: 1.3.0 - news: 13.0.3 - nextcloud_announcements: 1.4.0 - notes: 2.5.1 - notifications: 2.3.0 - oauth2: 1.3.0 - password_policy: 1.5.0 - polls: 0.9.5 - provisioning_api: 1.5.0 - quota_warning: 1.4.0 - radio: 0.6.4 - registration: 0.4.5 - richdocuments: 3.2.1 - serverinfo: 1.5.0 - sharebymail: 1.5.0 - socialsharing_diaspora: 1.0.4 - socialsharing_email: 1.0.5 - socialsharing_facebook: 1.0.4 - socialsharing_googleplus: 1.0.4 - spreed: 5.0.2 - support: 1.0.0 - survey_client: 1.3.0 - systemtags: 1.5.0 - theming: 1.6.0 - twofactor_backupcodes: 1.4.1 - unsplash: 1.1.3 - updatenotification: 1.5.0 - workflowengine: 1.5.0 Disabled: - admin_audit - encryption - files_external - user_ldap ```

Nextcloud configuration:

Config report ``` The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php { "system": { "apps_paths": [ { "path": "\/usr\/local\/www\/nextcloud\/apps", "url": "\/apps", "writable": true }, { "path": "\/usr\/local\/www\/nextcloud\/apps-pkg", "url": "\/apps-pkg", "writable": false } ], "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "memcache.local": "\\OC\\Memcache\\APCu", "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "10.0.1.158", "nextcloud..com", "10.0.1.162", "office..com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "15.0.4.0", "overwrite.cli.url": "http:\/\/10.0.1.158", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0 }, "memcache.locking": "\\OC\\Memcache\\Redis", "maintenance": false, "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpauth": 1, "mail_smtpsecure": "ssl", "mail_smtpauthtype": "PLAIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***" } } ```

Are you using external storage, if yes which one: local/smb/sftp/...

Not using external storage

Are you using encryption: yes/no

No encryption

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

No external user backend

Client configuration

Browser: Mozilla Firefox 65.0.1 and Chrome Version 72.0.3626.81 (Official Build) (64-bit)

Operating system: MacOS Mojave

Logs

Web server error log

Web server error log Insert your webserver log here [Thu Feb 21 09:41:44.807631 2019] [proxy_fcgi:error] [pid 55914] [client 24.13.24.199:47794] 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'

Nextcloud log (data/nextcloud.log)

Nextcloud log {"reqId":"aQvSkjRtBWOAVd1myalP","level":3,"time":"2019-02-21T15:41:44+00:00","remoteAddr":"ID_ADDRESS","user":"ncadmin","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=25&requesttoken=dUmu12zn%2BKmg20oH8YZbC7mBwAjeNpE82%2FoyZ%2Fufd5o%3D%3ARXGbmwOlrfHXkSxSyKkfauvPolv1ctkI7MJCPrzoItQ%3D","message":"Cannot declare class GuzzleHttp\\Handler\\CurlFactory, because the name is already in use at \/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php#15","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/72.0.3626.81 Safari\/537.36","version":"15.0.4.0"}

Browser log

Browser log Browser log doesn't log anything when trying to access collabora
kesselb commented 5 years ago

Sounds like: https://github.com/nextcloud/richdocuments/issues/264

Keep in mind that your server (i guess the freebsd instance) has to trust lets encrypt because their is some internal connection between nextcloud and collabora. You can use the patch below to disable ssl certificate verification.

Index: lib/Service/CapabilitiesService.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/Service/CapabilitiesService.php (revision 7c761381dc5e0bd0bde370b10ce67ed7f57b385b)
+++ lib/Service/CapabilitiesService.php (date 1550777570000)
@@ -71,6 +71,7 @@
            $response = $client->get(
                $capabilitiesEndpoint,
                [
+                   'verify' => false,
                    'timeout' => 5,
                ]
            );
Index: lib/Preview/Office.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/Preview/Office.php  (revision 7c761381dc5e0bd0bde370b10ce67ed7f57b385b)
+++ lib/Preview/Office.php  (date 1550777553000)
@@ -56,6 +56,7 @@
            // Since we upgraded guzzle in NC14 we have to do some dark magic here
            if (version_compare($this->config->getSystemValue('version'), '14.0.0.0', '<')) {
                $response = $client->post($this->getWopiURL() . '/lool/convert-to/png', [
+                   'verify' => false,
                    'timeout' => 10.0,
                    'body' => [
                        new PostFile($path, $stream),
@@ -63,6 +64,7 @@
                ]);
            } else {
                $response = $client->post($this->getWopiURL() . '/lool/convert-to/png', [
+                   'verify' => false,
                    'timeout' => 10.0,
                    'multipart' => [
                        [
Index: lib/WOPI/DiscoveryManager.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/WOPI/DiscoveryManager.php   (revision 7c761381dc5e0bd0bde370b10ce67ed7f57b385b)
+++ lib/WOPI/DiscoveryManager.php   (date 1550777059000)
@@ -81,7 +81,7 @@

        $client = $this->clientService->newClient();
        try {
-           $response = $client->get($wopiDiscovery);
+           $response = $client->get($wopiDiscovery, ['verify' => false]);
        } catch (\Exception $e) {
            throw $e;
        }
kesselb commented 5 years ago

https://github.com/nextcloud/richdocuments/pull/414

kevdogg commented 5 years ago

I know this issue is closed, however I'm really wondering if there could be more useful information to debug this problem rather than the workaround you've proposed. My certificates are not self signed and they are not expired. I'm running two virtual machines -- nextcloud on one machine with collobora within an Ubuntu VM. The certs have been copied to both instances. I don't get any error from the collobora end regarding a bad certificate. I have not idea if this is a permissions problem with the certs since the debugging information doesn't really help. Is there a better way to debug this problem?

kesselb commented 5 years ago

I just noticed that you are using the news app. Had some problems because the news app has their own copy of guzzle. Could you try to disable the news app and see if the error is gone?

kevdogg commented 5 years ago

Hmmmm -- not what I expected My cert has one domain -- .com and two subdomain nextcloud.domain.com and office.domain.com. The two subdomains are on different machines

I ssh'd into nextcloud instance and then ran curl curl https://office.domain.com curl: (7) Failed to connect to office.domain.com port 443: Connection refused

This is unexpected since I setup a simple index.html file on office.domain.com and can have it display in the browswer

However if I do the following: curl https://office.domain.com:9980 OK

I also disabled the news reader and it didn't seem to have any effect. I can disable more apps if it helps.

kesselb commented 5 years ago

Could you check if there are multiple guzzle copies? grep -rn /var/www/nextcloud -e 'class CurlFactory implements CurlFactoryInterface'

kevdogg commented 5 years ago

Looks like only one instance

# sudo grep -rn /usr/local/www/nextcloud -e 'class CurlFactory implements CurlFactoryInterface'
/usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15:class CurlFactory implements CurlFactoryInterface
kesselb commented 5 years ago

Hmm. Looks like a magic issue :see_no_evil:

https://help.nextcloud.com/t/nextcloud-and-collabora-on-docker-gives-blank-page-when-trying-to-edit-file/41443 https://help.nextcloud.com/t/solved-nextcloud-15-0-2-and-collabora-docker-latest/45216

Nothing else in your nextcloud.log?

kevdogg commented 5 years ago

I hate to post these here but these are the lines that appear in my nextcloud log. Curious nothing ever shows in the loolwsd.log file that I set to debug. I know a connection isn't being made from the apache/nextcloud machine to the loolwsd machine. Another interesting thing is that the admin portal works, however this doesn't go through https.

I've read the information in the posts you linked (I had seen them in the process of debugging). I made some changes to allow for the IP addresses and such however I can't tell if the changes made are working since nothing shows up in the loolwsd logs.

I've also tried running the loolwsd service and then changing to the docker instance. It seems both produce the same behavior.

I've edited the IP address and the domain name in the log below.

Port 443 is open on the Collabora machine, however there is nothing listening on port 443 -- so hence the error that says port 443 Connection refused. I have no idea if that relates to the problem.

{"reqId":"gUgj2vCPfkU6wlfLEoxO","level":3,"time":"2019-02-24T22:26:06+00:00","remoteAddr":"XX.XX.XX.XX","user":"ncadmin","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=25&requesttoken=xK5DcOk80SrrqaLj%2B2d3MgI4%2FA8vTrTCYkxkVMv%2Fx1Y%3D%3A9tkJQZpanFKfkO%2BgtQsmcWMXilVlHoyLVwgLAvyJimE%3D","message":{"Exception":"GuzzleHttp\Exception\ConnectException","Message":"cURL error 7: Failed to connect to office.DOMAIN.com port 443: Connection refused (see http:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html)","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":149,"function":"createRejection","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"errno":7,"error":"Failed to connect to office.gohilton.com port 443: Connection refused","url":"https:\/\/office.DOMAIN.com\/hosting\/discovery","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.000201,"namelookup_time":0.000164,"connect_time":0,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"","certinfo":[],"primary_port":0,"local_ip":"","local_port":0}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":102,"function":"finishError","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"invoke","class":"GuzzleHttp\Handler\CurlHandler","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"invoke","class":"GuzzleHttp\PrepareBodyMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":60,"function":"invoke","class":"GuzzleHttp\RedirectMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/HandlerStack.php","line":67,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":277,"function":"invoke","class":"GuzzleHttp\HandlerStack","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":125,"function":"transfer","class":"GuzzleHttp\Client","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"requestAsync","class":"GuzzleHttp\Client","type":"->","args":["get",{"class":"GuzzleHttp\Psr7\Uri"},{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"_conditional":{"User-Agent":"GuzzleHttp\/6.3.3 curl\/7.64.0 PHP\/7.2.15"}}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\Client","type":"->","args":["get","https:\/\/office.gohilton.com\/hosting\/discovery",{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true}]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/DiscoveryManager.php","line":84,"function":"get","class":"OC\Http\Client\Client","type":"->","args":["https:\/\/office.DOMAIN.com\/hosting\/discovery"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/Parser.php","line":41,"function":"get","class":"OCA\Richdocuments\WOPI\DiscoveryManager","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/TokenManager.php","line":155,"function":"getUrlSrc","class":"OCA\Richdocuments\WOPI\Parser","type":"->","args":["application\/vnd.oasis.opendocument.text"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/Controller\/DocumentController.php","line":184,"function":"getToken","class":"OCA\Richdocuments\TokenManager","type":"->","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"index","class":"OCA\Richdocuments\Controller\DocumentController","type":"->","args":[" sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Richdocuments\Controller\DocumentController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"richdocuments.document.index"}]},{"function":"__invoke","class":"OC\AppFramework\Routing\RouteActionHandler","type":"->","args":[{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"class":"OC\AppFramework\Routing\RouteActionHandler"},{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\Route\Router","type":"->","args":["\/apps\/richdocuments\/index"]},{"file":"\/usr\/local\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":185,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"} {"reqId":"gUgj2vCPfkU6wlfLEoxO","level":3,"time":"2019-02-24T22:26:06+00:00","remoteAddr":"XX.XX.XX.XX","user":"ncadmin","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=25&requesttoken=xK5DcOk80SrrqaLj%2B2d3MgI4%2FA8vTrTCYkxkVMv%2Fx1Y%3D%3A9tkJQZpanFKfkO%2BgtQsmcWMXilVlHoyLVwgLAvyJimE%3D","message":"Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use at \/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php#15","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"}

kesselb commented 5 years ago

Thank you :+1:

For outgoing connections (through IClient) nextcloud use a local copy of ca-bundle.crt in resources/config/ca-bundle.crt. The copy is a bit outdated. Does it work if you replace the content of ca-bundle.crt with this one https://curl.haxx.se/ca/cacert.pem?

kevdogg commented 5 years ago

I've included the log below however it doesn't seem that replacing the contents of the ca-bundle.cert file with your copy had any effect

Just a comment to make sure my config isn't screwing up. I'm running two servers. Apache/nextcloud on a public facing server and the ubuntu/collabora server on an internal LAN server. I wanted to avoid the 9980 port being open to the world.

domain.com, nextcloud.domain.com and office.domain.com all point to the same IP address.

The port 9980 is open on the ubuntu/collabora machine and is listening. I arbitrarily designated the ubuntu/collabora server as the office.domain.com machine.

The collabora app is setup to resolved to https://office.domain.com

Apache has three virtual domains within its configuration -- domain.com, nextcloud.domain.com and offfice.domain.com.

Within the office.domain.com virtual host file I have statements such as the following:

..... ProxyPass /loleaflet https://office.domain.com:9980/loleaflet retry=0> .... ProxyPass /lool/adminws wss://office.domain.com:9980/lool/adminws ... etc

I've modified the /etc/hosts file on the Apache/nextcloud machine to point to the LAN machine: 10.0.1.162 office.domain.com

Does nextcloud use the /etc/hosts file and could this be screwing up the name resolution with the https certs. This setup works with redirecting towards the admin consult however no certificates are being used here.

Log file below:

{"reqId":"M3j3710XrVAR9btN0Au1","level":3,"time":"2019-02-25T13:41:36+00:00","remoteAddr":"xx.xx.xx.xx","user":"ncadmin","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=539&requesttoken=Shc6y%2BZHrENMAe3nQ%2BPfPL7wnJxQ15CghKdPLSjuKVg%3D%3AeGBw%2BpUh4Ts4OKCkDY%2BOf9%2Ff6sYah6jpseMgex%2BYZG8%3D","message":{"Exception":"GuzzleHttp\Exception\ConnectException","Message":"cURL error 7: Failed to connect to office.domain.com port 443: Connection refused (see http:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html)","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":149,"function":"createRejection","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"errno":7,"error":"Failed to connect to office.domain.com port 443: Connection refused","url":"https:\/\/office.domain.com\/hosting\/discovery","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.000429,"namelookup_time":0.000371,"connect_time":0,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"","certinfo":[],"primary_port":0,"local_ip":"","local_port":0}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":102,"function":"finishError","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"invoke","class":"GuzzleHttp\Handler\CurlHandler","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"invoke","class":"GuzzleHttp\PrepareBodyMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":60,"function":"invoke","class":"GuzzleHttp\RedirectMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/HandlerStack.php","line":67,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":277,"function":"invoke","class":"GuzzleHttp\HandlerStack","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":125,"function":"transfer","class":"GuzzleHttp\Client","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"requestAsync","class":"GuzzleHttp\Client","type":"->","args":["get",{"class":"GuzzleHttp\Psr7\Uri"},{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"_conditional":{"User-Agent":"GuzzleHttp\/6.3.3 curl\/7.64.0 PHP\/7.2.15"}}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\Client","type":"->","args":["get","https:\/\/office.domain.com\/hosting\/discovery",{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true}]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/DiscoveryManager.php","line":84,"function":"get","class":"OC\Http\Client\Client","type":"->","args":["https:\/\/office.domain.com\/hosting\/discovery"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/Parser.php","line":41,"function":"get","class":"OCA\Richdocuments\WOPI\DiscoveryManager","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/TokenManager.php","line":155,"function":"getUrlSrc","class":"OCA\Richdocuments\WOPI\Parser","type":"->","args":["application\/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/Controller\/DocumentController.php","line":184,"function":"getToken","class":"OCA\Richdocuments\TokenManager","type":"->","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"index","class":"OCA\Richdocuments\Controller\DocumentController","type":"->","args":[" sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Richdocuments\Controller\DocumentController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"richdocuments.document.index"}]},{"function":"__invoke","class":"OC\AppFramework\Routing\RouteActionHandler","type":"->","args":[{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"class":"OC\AppFramework\Routing\RouteActionHandler"},{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\Route\Router","type":"->","args":["\/apps\/richdocuments\/index"]},{"file":"\/usr\/local\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":185,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"}

{"reqId":"M3j3710XrVAR9btN0Au1","level":3,"time":"2019-02-25T13:41:36+00:00","remoteAddr":"xx.xx.xx.xx","user":"ncadmin","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=539&requesttoken=Shc6y%2BZHrENMAe3nQ%2BPfPL7wnJxQ15CghKdPLSjuKVg%3D%3AeGBw%2BpUh4Ts4OKCkDY%2BOf9%2Ff6sYah6jpseMgex%2BYZG8%3D","message":"Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use at \/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php#15","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"} {"reqId":"bWhu0A7YF5G3f5icSEBd","level":3,"time":"2019-02-25T13:41:37+00:00","remoteAddr":"xx.xx.xx.xx","user":"ncadmin","app":"richdocuments","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=539&requesttoken=Shc6y%2BZHrENMAe3nQ%2BPfPL7wnJxQ15CghKdPLSjuKVg%3D%3AeGBw%2BpUh4Ts4OKCkDY%2BOf9%2Ff6sYah6jpseMgex%2BYZG8%3D","message":{"Exception":"GuzzleHttp\Exception\ConnectException","Message":"cURL error 7: Failed to connect to office.domain.com port 443: Connection refused (see http:\/\/curl.haxx.se\/libcurl\/c\/libcurl-errors.html)","Code":0,"Trace":[{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":149,"function":"createRejection","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"errno":7,"error":"Failed to connect to office.domain.com port 443: Connection refused","url":"https:\/\/office.domain.com\/hosting\/discovery","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.000207,"namelookup_time":0.000157,"connect_time":0,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"","certinfo":[],"primary_port":0,"local_ip":"","local_port":0}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","line":102,"function":"finishError","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\Handler\CurlFactory","type":"::","args":[{"class":"GuzzleHttp\Handler\CurlHandler"},{"sink":{"class":"GuzzleHttp\Psr7\Stream"},"headers":[],"response":null,"request":{"class":"GuzzleHttp\Psr7\Request"},"options":{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":7,"onHeadersException":null,"class":"GuzzleHttp\Handler\EasyHandle"},{"class":"GuzzleHttp\Handler\CurlFactory"}]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"invoke","class":"GuzzleHttp\Handler\CurlHandler","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\Handler\{closure}","class":"GuzzleHttp\Handler\Proxy","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"invoke","class":"GuzzleHttp\PrepareBodyMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":60,"function":"invoke","class":"GuzzleHttp\RedirectMiddleware","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/HandlerStack.php","line":67,"function":"GuzzleHttp\{closure}","class":"GuzzleHttp\Middleware","type":"::","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":277,"function":"invoke","class":"GuzzleHttp\HandlerStack","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":125,"function":"transfer","class":"GuzzleHttp\Client","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"requestAsync","class":"GuzzleHttp\Client","type":"->","args":["get",{"class":"GuzzleHttp\Psr7\Uri"},{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true,"handler":{"class":"GuzzleHttp\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"_conditional":{"User-Agent":"GuzzleHttp\/6.3.3 curl\/7.64.0 PHP\/7.2.15"}}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\Client","type":"->","args":["get","https:\/\/office.domain.com\/hosting\/discovery",{"verify":"\/mnt\/data\/files_external\/rootcerts.crt","synchronous":true}]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/DiscoveryManager.php","line":84,"function":"get","class":"OC\Http\Client\Client","type":"->","args":["https:\/\/office.domain.com\/hosting\/discovery"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/Parser.php","line":41,"function":"get","class":"OCA\Richdocuments\WOPI\DiscoveryManager","type":"->","args":[]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/TokenManager.php","line":155,"function":"getUrlSrc","class":"OCA\Richdocuments\WOPI\Parser","type":"->","args":["application\/vnd.openxmlformats-officedocument.wordprocessingml.document"]},{"file":"\/usr\/local\/www\/nextcloud\/apps\/richdocuments\/lib\/Controller\/DocumentController.php","line":184,"function":"getToken","class":"OCA\Richdocuments\TokenManager","type":"->","args":[" sensitive parameters replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"index","class":"OCA\Richdocuments\Controller\DocumentController","type":"->","args":[" sensitive parameter replaced "]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Richdocuments\Controller\DocumentController"},"index"]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Richdocuments\Controller\DocumentController","index",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"richdocuments.document.index"}]},{"function":"__invoke","class":"OC\AppFramework\Routing\RouteActionHandler","type":"->","args":[{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"class":"OC\AppFramework\Routing\RouteActionHandler"},{"_route":"richdocuments.document.index"}]},{"file":"\/usr\/local\/www\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\Route\Router","type":"->","args":["\/apps\/richdocuments\/index"]},{"file":"\/usr\/local\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":185,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"} {"reqId":"bWhu0A7YF5G3f5icSEBd","level":3,"time":"2019-02-25T13:41:37+00:00","remoteAddr":"xx.xx.xx.xx","user":"ncadmin","app":"PHP","method":"GET","url":"\/index.php\/apps\/richdocuments\/index?fileId=539&requesttoken=Shc6y%2BZHrENMAe3nQ%2BPfPL7wnJxQ15CghKdPLSjuKVg%3D%3AeGBw%2BpUh4Ts4OKCkDY%2BOf9%2Ff6sYah6jpseMgex%2BYZG8%3D","message":"Cannot declare class GuzzleHttp\Handler\CurlFactory, because the name is already in use at \/usr\/local\/www\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php#15","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko\/20100101 Firefox\/65.0","version":"15.0.4.0"}

kesselb commented 5 years ago

It could be that /mnt/data/files_external/rootcerts.crt is not up to date. You may delete (or move it somewhere else) to trigger a refresh.

kesselb commented 5 years ago

You can use https://www.owasp.org/index.php/O-Saft to check your ssl configuration. Missing intermediate could be a problem.

kevdogg commented 5 years ago

Ok I deleted the rootcerts.crt and it didn't seem to make a difference

Took my awhile to get O-saft working. Damn o-saft.pl file -- first line #!/usr/bin/perl should have been #!/usr/local/bin/perl -- took an hour to figure that one out...

Anyway -- I used the program I used it on the top level domains (tld) and subdomains The tld produced these warnings:

WARNING: 148: 'openssl version -d' returned not existing: 'OPENSSLDIR: "/etc/ssl"'; ca_path not set . WARNING: 060: no PEM fila for CA found; some certificate checks may fail Given hostname:

The nextcloud.domain.com produced similar warnings

The office.domain.com produced:

WARNING: 148: 'openssl version -d' returned not existing: 'OPENSSLDIR: "/etc/ssl"'; ca_path not set . WARNING: 060: no PEM fila for CA found; some certificate checks may fail Given hostname: office.domain.com IP for given hostname: 10.0.1.162 Reverse resolved hostname: office.domain.com DNS entries for given hostname: 10.0.1.162 office.domaincom; **WARNING: 324: failed to connect target office.domain.com:443 : 'Connection refused'

I guess my question -- does port 443 on the host need a listening process? I noticed a similar error in the nextcloud log that said connection refused. I thought collabora host only needed a listening process on 9980?

This is from nextcloud log:

{"Exception":"GuzzleHttp\Exception\ConnectException","Message":"cURL error 7: Failed to connect to office.domain.com port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler

kesselb commented 5 years ago

You can run the tests against another port: https://www.owasp.org/index.php/O-Saft/Documentation#--port.3DPORT

Does it work if you applie the patch (disable ssl verification)? Did a lot of testing the last days and i can't see a general problem. Not sure what is wrong in your setup. I guess thats your job as administrator to figure that out :smile: Here are some examples from collabora for apache2: https://www.collaboraoffice.com/code/apache-reverse-proxy/

Okay for you to close this issue?

kevdogg commented 5 years ago

Ok I ran the tests against port 9980 and the certificate seems valid by the response. I have no idea what the error is because the logs are not informative at all. Thanks for the reference -- I used this page heavily when setting up my virtual host files for apache.

Yes I patched the files manually since there were only a few edits. Do I need to restart a process after doing this?? I get the same error in the log file after applying your patches above.

I can close this issue if you want, but its bothersome since clearly something isn't working.

kesselb commented 5 years ago

but its bothersome since clearly something isn't working.

Sure but is this related to nextcloud? Looks more like a configuration issue. If guzzle/curl is reporting connection refused there is usually not much we can do.

1) Does it work with the ip itself for internal connection instead of office.domain.com? 2) Does it work without apache2 (using collabora without reverse proxy)?

kevdogg commented 5 years ago

I've tried what you've asked

I specified the address https://10.0.1.162:9980 in the collabora app rather than office.domain.com and going through the reverse proxy (taking reverse proxy out of equation).

Settings on the loolwsd server were ssl=true and termination=false

With this combination I no longer obtain any guzzlehttp errors within the nextcloud.log. However I just get a circle that spins and spins and spins without getting any error message. I don't get anything showing up in the logs anywhere (either on the host or the client) and I can verify the collabora proces is running

I even tried the docker instance of collabora and virtually same behavior occurred. About ready to pull my hair out

kesselb commented 5 years ago

Does it work with the ip itself for internal connection instead of office.domain.com?

Forget that :smile: The client has to reach collabora so the private ip is not working. What i had in mind is to use the private ip for your apache2 proxy configuration. ProxyPass xxx 10.0.1.162 .. and use office. in nextcloud.

kevdogg commented 5 years ago

I tried changing the virtual host file as you suggested but that didn't seem to work either resulting in the same guzzlehttp error.

Beyond the admin console- I can see the WOPI discovery XML at https://office.domain.com/hosting/discovery

It lists the contents of the xml file. I don't understand the full process, however if the SSL certs were not valid, wouldn't the WOPI discovery fail?

kevdogg commented 5 years ago

Here what I can confirm

https://office.domain.com/hosting/capabilities https://office.domain.com/hosting/discovery https://office.domain.com/loleaflet/dist/admin/admin.html https://10.0.1.162:9980/hosting/capabilities - Works but browser produces errors about certname not matching 10.0.1.162 https://10.0.1.162:9980/hosting/discovery - Works with same error https://10.0.1.162:9980/loleaflet/dist/admin/admin.html - Works with same browser error curl://office.domain.com:9980 - OK curl://10.0.1.162:9980 - Produces error about the name mismatch

So it seems like https connection between nextcloud and collabora is working? Are we certain the GuzzleHttps Name Already in Use Error is specifically due to a certificate problem? I'm asking this problem because even with the patch applied as referenced above, I'm getting the same error.

mrustl commented 5 years ago

I experience the same problem using nextcloud 15.0.5 and collabora/code 4.0.2.1

As a lot of people experience problems with this issue: is there a roadmap for solving this bug?

kesselb commented 5 years ago

nextcloud/richdocuments#414

@mrustl you applied this patch? Do you have any new information about this problem (you may share https://github.com/nextcloud/server/blob/master/.github/ISSUE_TEMPLATE/Bug_report.md with us).

If you use a proxy for outgoing connections this proxy is also used for connections to collabora (see https://github.com/nextcloud/server/issues/12402).

kevdogg commented 5 years ago

@kesselb. That patch you referenced definitely does not fix the guzzlehttp name already in use error. I've had this error unsolved well over a month and never found a fix. Some have suggested changing the name of the collabora instance, setting up new reverse proxy, setting up new ssl cert for the new instance then changing it back. I haven't been able to do this. However if this is the work around there is clearly something wrong with the code somewhere.

kesselb commented 5 years ago

@kevdogg You may notice that my reply above starts with @someusername. You'll figure out yourself what that means.

kesselb commented 5 years ago

@juliushaertl @rullzer mind to have a look? This is a regression from https://github.com/nextcloud/server/pull/8051

If you try to return an exception like in the DocumentController you override the name of the template with the error class.

https://github.com/nextcloud/richdocuments/blob/6b8bea5c98ade491f4b64628dfaf8509925f6cfd/lib/Controller/DocumentController.php#L215-L226

https://github.com/nextcloud/server/blob/3f4941e48aead48bacc7077e2819b492d1394778/lib/private/Template/Base.php#L162-L188

Screenshot from 2019-03-25 19-36-52 Screenshot from 2019-03-25 19-37-09

If we pass file as additionalParams the value $file (which should be the name of the template) is overriden. We try to use CurlFactory as error template than.

mrustl commented 5 years ago

Nice to see some progress here. Thanks to @kesselb for cross-referencing https://github.com/nextcloud/richdocuments/pull/465.

I replaced the app richdocuments 3.2.4 with https://github.com/nextcloud/richdocuments/commit/0fb197922278f7e89a2466dfb34e45af141e3098.

Now I get the following error as detailled in Nextcloud Log section (see below)


name: Bug report about: Help us improving by reporting a bug labels: bug, 0. Needs triage

Steps to reproduce

Expected behaviour

Actual behaviour

Identical to https://github.com/nextcloud/server/issues/14330#issue-413003081.

Server configuration

Operating system:

Web server:

Database: MySQL DB 5.6.42

PHP version: currently: 7.0, but also tested 7.1, 7.2

Nextcloud version: (see Nextcloud admin page) 15.0.5

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

Where did you install Nextcloud from: Github: https://github.com/nextcloud/server/releases/tag/v15.0.5

Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list - Accessibility 1.1.0 Offiziell - Activity 2.8.2 Offiziell - Announcement center 3.4.1 Offiziell - AppOrder 0.6.0 - Auditing / Logging 1.5.0 Offiziell - Brute-force settings 1.3.0 Offiziell - Calendar 1.6.4 Offiziell - Collabora Online 3.2.4 Offiziell - Collaborative tags 1.5.0 Offiziell - Comments 1.5.0 Offiziell - Contacts 3.0.5 Offiziell - Deck 0.5.2 - Deleted files 1.5.0 Offiziell - Draw.io 0.9.2 - Federation 1.5.0 Offiziell - File access control 1.5.0 Offiziell - File sharing 1.7.0 Offiziell - Files automated tagging 1.5.0 Offiziell - First run wizard 2.4.0 Offiziell - Gallery 18.2.0 Offiziell - Log Reader 2.0.0 Offiziell - Mail 0.11.0 Offiziell - Markdown Editor 2.0.5 - Mind Map 0.0.11 - Monitoring 1.5.0 Offiziell - Nextcloud announcements 1.4.0 Offiziell - Notifications 2.3.0 Offiziell - Password policy 1.5.0 Offiziell - PDF viewer 1.4.0 Offiziell - Retention 1.4.2 Offiziell - Share by mail 1.5.0 Offiziell - Support 1.0.0 Offiziell - Talk 5.0.2 Offiziell - Terms of service 1.1.1 - Text editor 2.7.0 Offiziell - Theming 1.6.0 Offiziell - Update notification 1.5.0 - Offiziell Usage survey 1.3.0 Offiziell - Versions 1.8.0 Offiziell - Video player 1.4.0 Offiziell

Nextcloud configuration:

Config report ``` '1234', 'passwordsalt' => 'pw', 'secret' => 'secret', 'trusted_domains' => array ( 0 => 'subdomain.mydomain.com', 1 => 'mydomain.com', ), 'datadirectory' => 'much_more_folders/htdocs/nextcloud/data', 'tempdirectory' = 'much_more_folders//htdocs/nextcloud/tmp' 'dbtype' => 'mysql', 'version' => '15.0.5.3', 'overwrite.cli.url' => 'subdomain.mydomain.de', 'dbname' => 'db_name', 'dbhost' => 'domain.de', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'user', 'dbpassword' => 'pw', 'installed' => true, 'app.mail.accounts.default' => [ 'email' => '%EMAIL%', 'imapHost' => 'imap.xxxx.de', 'imapPort' => 993, 'imapSslMode' => 'ssl', 'smtpHost' => 'smtp.xxx.de', 'smtpPort' => 465, 'smtpSslMode' => 'tls', ], ); ```

Are you using external storage, if yes which one: local/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... no

Client configuration

Browser: Firefox 66

Operating system: Windows 7

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"__class__":"GuzzleHttp\\Psr7\\Request"},"options":{"verify":false,"timeout":5,"synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false},"errno":28,"onHeadersException":null,"__class__":"GuzzleHttp\\Handler\\EasyHandle"},{"__class__":"GuzzleHttp\\Handler\\CurlFactory"}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/Proxy.php","line":51,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":30,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Middleware.php","line":60,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/HandlerStack.php","line":67,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":277,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":125,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Client.php","line":131,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["get",{"__class__":"GuzzleHttp\\Psr7\\Uri"},{"verify":false,"timeout":5,"synchronous":true,"handler":{"__class__":"GuzzleHttp\\HandlerStack"},"allow_redirects":{"max":5,"protocols":["http","https"],"strict":false,"referer":false,"track_redirects":false},"http_errors":true,"decode_content":true,"cookies":false,"_conditional":{"User-Agent":"GuzzleHttp\/6.3.3 curl\/7.50.3 PHP\/7.0.33"}}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/Http\/Client\/Client.php","line":161,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["get","https:\/\/office.datenhelden.com:9980\/hosting\/discovery",{"verify":false,"timeout":5,"synchronous":true}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/DiscoveryManager.php","line":106,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["https:\/\/office.mydomain.com:9980\/hosting\/discovery",{"timeout":5,"verify":false}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/DiscoveryManager.php","line":78,"function":"fetchFromRemote","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->","args":[]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/apps\/richdocuments\/lib\/WOPI\/Parser.php","line":41,"function":"get","class":"OCA\\Richdocuments\\WOPI\\DiscoveryManager","type":"->","args":[]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/apps\/richdocuments\/lib\/TokenManager.php","line":155,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->","args":["application\/vnd.oasis.opendocument.text"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/apps\/richdocuments\/lib\/Controller\/DocumentController.php","line":176,"function":"getToken","class":"OCA\\Richdocuments\\TokenManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"index","class":"OCA\\Richdocuments\\Controller\\DocumentController","type":"->","args":["*** sensitive parameter replaced ***"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\DocumentController"},"index"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Richdocuments\\Controller\\DocumentController"},"index"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\DocumentController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"richdocuments.document.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"richdocuments.document.index"}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"richdocuments.document.index"}]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/richdocuments\/index"]},{"file":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/mnt\/web421\/a1\/90\/54603690\/htdocs\/nextcloud\/3rdparty\/guzzlehttp\/guzzle\/src\/Handler\/CurlFactory.php","Line":185,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"15.0.5.3"} ```

Browser log

not relevant

kesselb commented 5 years ago

@mrustl could you use the log reader to export a readable version?

mrustl commented 5 years ago

@kesselb here a more readable version as requested. Any idea how this can be fixed?

[richdocuments] Error: GuzzleHttp\Exception\ConnectException: cURL error 28: Connection timed out after 5000 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) at <<closure>>

 0. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 149
    createRejection(GuzzleHttp\Handl ... l}, {errno: 28,error ... 0})
 1. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 102
    finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 2. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 43
    finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
 3. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 4. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 51
    GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 5. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 37
    GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 6. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 30
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 70
    GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 8. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 60
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 67
    GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
10. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 277
    __invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
11. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 125
    transfer("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
12. /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 131
    requestAsync("get", GuzzleHttp\Psr7\Uri {}, {verify: false,t ... }})
13. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/Http/Client/Client.php line 161
    request("get", "https://office. ... y", {verify: false,t ... e})
14. /mnt/web421/a1/90/54603690/htdocs/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php line 106
    get("https://office. ... y", {timeout: 5,verify: false})
15. /mnt/web421/a1/90/54603690/htdocs/nextcloud/apps/richdocuments/lib/WOPI/DiscoveryManager.php line 78
    fetchFromRemote()
16. /mnt/web421/a1/90/54603690/htdocs/nextcloud/apps/richdocuments/lib/WOPI/Parser.php line 41
    get()
17. /mnt/web421/a1/90/54603690/htdocs/nextcloud/apps/richdocuments/lib/TokenManager.php line 155
    getUrlSrc("application/vnd.oasis.opendocument.text")
18. /mnt/web421/a1/90/54603690/htdocs/nextcloud/apps/richdocuments/lib/Controller/DocumentController.php line 176
    getToken("*** sensitive parameters replaced ***")
19. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    index("*** sensitive parameter replaced ***")
20. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Richdocument ... {}, "index")
21. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Richdocument ... {}, "index")
22. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\\Richdocume ... r", "index", OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"})
23. <<closure>>
    __invoke({_route: "richdocuments.document.index"})
24. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"})
25. /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/base.php line 987
    match("/apps/richdocuments/index")
26. /mnt/web421/a1/90/54603690/htdocs/nextcloud/index.php line 42
    handleRequest()

GET /nextcloud/index.php/apps/richdocuments/index?fileId=178&requesttoken=GH5LvLFGXhfVl0ZaNaRm15SqaKLAZUhIzUuCCIZKlDU%3D%3AWQh8%2FegzaGDn7mkPROUTv%2BHBOvuVPCUq%2BjvaMLMz82Y%3D
from 91.65.106.237 by mrustl at 2019-03-26T13:38:23+00:00
[PHP] Error: Undefined offset: 0 at /mnt/web421/a1/90/54603690/htdocs/nextcloud/lib/private/AppFramework/Http.php#150

GET /nextcloud/index.php/apps/richdocuments/settings/check
from 91.65.106.237 by mrustl at 2019-03-26T13:38:22+00:00
[PHP] Error: You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /mnt/web421/a1/90/54603690/htdocs/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18

GET /nextcloud/index.php/apps/richdocuments/index?fileId=178&requesttoken=GH5LvLFGXhfVl0ZaNaRm15SqaKLAZUhIzUuCCIZKlDU%3D%3AWQh8%2FegzaGDn7mkPROUTv%2BHBOvuVPCUq%2BjvaMLMz82Y%3D
from 91.65.106.237 by mrustl at 2019-03-26T13:38:24+00:00
kesselb commented 5 years ago

Any idea how this can be fixed?

No. Connection from nextcloud to collabora is not stable. If you have ssh access to your webhosting you can test a bit with curl.

mrustl commented 5 years ago

No. Connection from nextcloud to collabora is not stable. If you have ssh access to your webhosting you can test a bit with curl.

I have ssh access. Which test do you propose? (a have really no idea how to do the testing)

kesselb commented 5 years ago

curl https://office.yourdomain.com:PORT/hosting/discovery is the http request from your stack trace.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity and it seems to be missing some essential informations. It will be closed if no further activity occurs. Thank you for your contributions.

kesselb commented 5 years ago

@kevdogg any updates? Do you see another error in your log with the latest richdocuments app?

kevdogg commented 5 years ago

@kesselb -- Sorry been away from project for awhile. This is to let you know I'm still here and I should be testing this week sometime.

kevdogg commented 5 years ago

Hi

Thanks for your patience. Just re-set things with web servers and SSL certs. Just so I’m working with the copy your are working on, where do I get the latest rich documents app? Github or through next cloud app store? I’m looking at this page currently: https://apps.nextcloud.com/apps/richdocuments https://apps.nextcloud.com/apps/richdocuments

On Sep 25, 2019, at 2:36 PM, Daniel Kesselberg notifications@github.com wrote:

@kevdogg https://github.com/kevdogg any updates? Do you see another error in your log with the latest richdocuments app?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nextcloud/server/issues/14330?email_source=notifications&email_token=ABH75VZYCMNCJXORTEPQF4TQLO4SJA5CNFSM4GY7EXG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TCWBQ#issuecomment-535177990, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH75V374BKWUI72ZYZLQ4TQLO4SJANCNFSM4GY7EXGQ.

kesselb commented 5 years ago

Version from App Store should contain the patch already.

kevdogg commented 5 years ago

Ok -- took me a while to get things reconfigured particularly with SSL and reverse proxies. But specifically with the updated richdocuments app I'm not receiving any more GuzzleHttp Name Already in Use errors -- in fact I don't see anything about this in the logs at all. Which is great.
Hopefully others find this to be the case.

juliusknorr commented 5 years ago

@kesselb I created an issue in the richdocuments app to track the template file override separately: https://github.com/nextcloud/richdocuments/issues/646

kesselb commented 5 years ago

Thanks @kevdogg :+1: