Closed kevdogg closed 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;
}
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?
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?
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.
Could you check if there are multiple guzzle copies?
grep -rn /var/www/nextcloud -e 'class CurlFactory implements CurlFactoryInterface'
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
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?
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"}
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
?
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"}
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.
You can use https://www.owasp.org/index.php/O-Saft to check your ssl configuration. Missing intermediate could be a problem.
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
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?
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.
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)?
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
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.
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?
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.
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?
@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).
@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.
@kevdogg You may notice that my reply above starts with @someusername. You'll figure out yourself what that means.
@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.
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.
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)
Identical to https://github.com/nextcloud/server/issues/14330#issue-413003081.
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:
List of activated apps:
Nextcloud configuration:
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
Browser: Firefox 66
Operating system: Windows 7
not relevant
@mrustl could you use the log reader to export a readable version?
@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
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.
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)
curl https://office.yourdomain.com:PORT/hosting/discovery
is the http request from your stack trace.
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.
@kevdogg any updates? Do you see another error in your log with the latest richdocuments app?
@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.
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.
Version from App Store should contain the patch already.
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.
@kesselb I created an issue in the richdocuments app to track the template file override separately: https://github.com/nextcloud/richdocuments/issues/646
Thanks @kevdogg :+1:
Steps to reproduce
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:
Web server:
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.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