nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
355 stars 116 forks source link

Nextcloud will slow down if richdocuments connect to a turned off host #2722

Closed s8321414 closed 1 year ago

s8321414 commented 1 year ago

Describe the bug If we fill a turned off host in URL field, Nextcloud will slow down.

To Reproduce Steps to reproduce the behavior:

  1. Go to "Nextcloud Office" tab
  2. Fill a turned off host URL to URL field
  3. Click save button
  4. Go to another apps (such as "Files")

Expected behavior Nextcloud will respond normally.

Client details:

Server details

Operating system: CentOS 7

Web server: Apache

Database: SQLite/MariaDB

PHP version: 7.4

Nextcloud version: 24.0.X

Version of the richdocuments app: 6.3.2

Logs #### Nextcloud log (data/nextcloud.log) ``` [richdocuments] Error: GuzzleHttp\Exception\ConnectException: cURL error 7: Failed connect to ***:9980; No route to host (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://***:9980/hosting/discovery at <> 0. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 158 GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\Handl ... l}, {0: "And 25 more ... l}) 1. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 110 GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {}) 2. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 47 GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {}) 3. /var/www/html/odfweb/lib/private/Http/Client/DnsPinMiddleware.php line 113 GuzzleHttp\Handler\CurlHandler->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 4. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 35 OC\Http\Client\DnsPinMiddleware->OC\Http\Client\{closure}("*** sensitive parameters replaced ***") 5. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 31 GuzzleHttp\PrepareBodyMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 6. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 71 GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***") 7. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 63 GuzzleHttp\RedirectMiddleware->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 8. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 75 GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***") 9. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Client.php line 331 GuzzleHttp\HandlerStack->__invoke("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 10. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Client.php line 168 GuzzleHttp\Client->transfer("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***") 11. /var/www/html/odfweb/3rdparty/guzzlehttp/guzzle/src/Client.php line 187 GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, {0: "And 6 more ... }}) 12. /var/www/html/odfweb/lib/private/Http/Client/Client.php line 218 GuzzleHttp\Client->request("get", "http://192.168. ... y", {verify: false,t ... e}) 13. /var/www/html/odfweb/apps/richdocuments/lib/WOPI/DiscoveryManager.php line 84 OC\Http\Client\Client->get("http://192.168. ... y", {timeout: 45,nex ... e}) 14. /var/www/html/odfweb/apps/richdocuments/lib/WOPI/DiscoveryManager.php line 56 OCA\Richdocuments\WOPI\DiscoveryManager->fetchFromRemote() 15. /var/www/html/odfweb/apps/richdocuments/lib/WOPI/Parser.php line 41 OCA\Richdocuments\WOPI\DiscoveryManager->get() 16. /var/www/html/odfweb/apps/richdocuments/lib/TokenManager.php line 206 OCA\Richdocuments\WOPI\Parser->getUrlSrc("application/vnd.oasis.opendocument.text") 17. /var/www/html/odfweb/apps/richdocuments/lib/Controller/DocumentController.php line 207 OCA\Richdocuments\TokenManager->getToken("*** sensitive parameters replaced ***") 18. /var/www/html/odfweb/lib/private/AppFramework/Http/Dispatcher.php line 225 OCA\Richdocuments\Controller\DocumentController->index("*** sensitive parameter replaced ***", "/***.odt") 19. /var/www/html/odfweb/lib/private/AppFramework/Http/Dispatcher.php line 133 OC\AppFramework\Http\Dispatcher->executeController(OCA\Richdocument ... {}, "index") 20. /var/www/html/odfweb/lib/private/AppFramework/App.php line 172 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Richdocument ... {}, "index") 21. /var/www/html/odfweb/lib/private/Route/Router.php line 298 OC\AppFramework\App::main("OCA\\Richdocume ... r", "index", OC\AppFramework\ ... {}, {_route: "richdocuments.document.index"}) 22. /var/www/html/odfweb/lib/base.php line 1024 OC\Route\Router->match("/apps/richdocuments/index") 23. /var/www/html/odfweb/index.php line 36 OC::handleRequest() ```
joshtrichards commented 1 year ago

Duplicate of #2486