Closed BUG-reporter closed 3 years ago
From looking at your logs it seems like your Postgesql server isn't running:
Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\\n\\tIs the server running on host \\\"nc.local\\\" (127.0.1.1) and accepting\\n\\tTCP\\\/IP connections on port 5432?
Same Problem
@EmJotGeh Can you test the suggestions in here: https://github.com/e-alfred/ocdownloader/issues/192#issuecomment-747686827
From looking at your logs it seems like your Postgesql server isn't running:
Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\\n\\tIs the server running on host \\\"nc.local\\\" (127.0.1.1) and accepting\\n\\tTCP\\\/IP connections on port 5432?
If it would not running, my nextcloud would not working too. It is here: nc.ucl.com.ua. And it works well.
Fixed by https://github.com/e-alfred/ocdownloader/commit/cfa4c8fb3430ab4b7a84625b44e091c4621b2124 and ocDownloader 1.7.10. Thanks for your report!
Signing status
``` No errors have been found. ```App list
``` Enabled: - accessibility: 1.6.0 - activity: 2.13.3 - bruteforcesettings: 2.0.1 - calendar: 2.1.2 - checksum: 1.0.0 - cloud_federation_api: 1.3.0 - comments: 1.10.0 - contacts: 3.4.2 - contactsinteraction: 1.1.0 - dashboard: 7.0.0 - dav: 1.16.1 - event_update_notification: 1.1.0 - federatedfilesharing: 1.10.1 - federation: 1.10.1 - files: 1.15.0 - files_external: 1.11.1 - files_lock: 20.0.0 - files_pdfviewer: 2.0.1 - files_rightclick: 0.17.0 - files_sharing: 1.12.0 - files_trashbin: 1.10.1 - files_versions: 1.13.0 - files_videoplayer: 1.9.0 - firstrunwizard: 2.9.0 - fulltextsearch: 20.0.0 - fulltextsearch_elasticsearch: 20.0.0 - logreader: 2.5.0 - lookup_server_connector: 1.8.0 - mail: 1.7.2 - nextcloud_announcements: 1.9.0 - notes: 4.0.1 - notifications: 2.8.0 - oauth2: 1.8.0 - ocdownloader: 1.7.9 - password_policy: 1.10.1 - photos: 1.2.0 - privacy: 1.4.0 - provisioning_api: 1.10.0 - recommendations: 0.8.0 - serverinfo: 1.10.0 - settings: 1.2.0 - sharebymail: 1.10.0 - support: 1.3.0 - survey_client: 1.8.0 - systemtags: 1.10.0 - text: 3.1.0 - theming: 1.11.0 - twofactor_backupcodes: 1.9.0 - unsplash: 1.1.7 - updatenotification: 1.10.0 - user_status: 1.0.1 - viewer: 1.4.0 - weather_status: 1.0.0 - workflowengine: 2.2.0 Disabled: - admin_audit - encryption - user_ldap ```Config report
``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nc.ucl.com.ua" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/nc.ucl.com.ua", "dbtype": "pgsql", "version": "20.0.2.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "filelocking.enabled": "true", "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "theme": "", "loglevel": 2, "updater.release.channel": "stable", "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpauthtype": "PLAIN", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "app_install_overwrite": [ "checksum", "ocdownloader", "files_lock" ] } } ```Aria2c log file (set the log level to debug by using --log-level=debug)
``` aria2c.log 2020-12-17 00:54:58.325853 [INFO] [Context.cc:179] <<--- --- --- --- 2020-12-17 00:54:58.325933 [INFO] [Context.cc:180] --- --- --- --- 2020-12-17 00:54:58.325953 [INFO] [Context.cc:181] --- --- --- --->> 2020-12-17 00:54:58.325966 [INFO] [Context.cc:182] aria2 1.35.0 2020-12-17 00:54:58.325984 [INFO] [Context.cc:183] gcc 9.3.0 built by x86_64-pc-linux-gnu on Mar 22 2020 15:33:25 2020-12-17 00:54:58.326002 [INFO] [Context.cc:184] Linux 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 2020-12-17 00:54:58.326016 [INFO] [Context.cc:185] zlib/1.2.11 libxml2/2.9.10 sqlite3/3.31.1 GnuTLS/3.6.11 nettle GMP/6.2.0 c-ares/1.15.0 libssh2/1.8.0 2020-12-17 00:54:58.326033 [INFO] [Context.cc:186] Логування розпочато 2020-12-17 00:54:58.326055 [DEBUG] [Context.cc:215] Not setting rlimit NO_FILE: 1024 >= 1024 2020-12-17 00:54:58.326067 [INFO] [SocketCore.cc:1659] Checking configured addresses 2020-12-17 00:54:58.326207 [INFO] [SocketCore.cc:1710] Not considered: 127.0.0.1 2020-12-17 00:54:58.326226 [INFO] [SocketCore.cc:1707] Found configured address: 10.17.16.9 2020-12-17 00:54:58.326240 [INFO] [SocketCore.cc:1710] Not considered: ::1 2020-12-17 00:54:58.326300 [INFO] [SocketCore.cc:1710] Not considered: fe80::3c9b:d7ff:fe25:dfea%host0 2020-12-17 00:54:58.326317 [INFO] [SocketCore.cc:1714] IPv4 configured=1, IPv6 configured=0 2020-12-17 00:54:58.326533 [WARN] [DownloadEngineFactory.cc:198] Neither --rpc-secret nor a combination of --rpc-user and --rpc-passwd is set. This is insecure. It is extremely recommended to specify --rpc-secret with the adequate secrecy or now deprecated --rpc-user and --rpc-passwd. 2020-12-17 00:54:58.326682 [INFO] [HttpListenCommand.cc:106] CUID#8 - Using port 6800 for accepting new connections 2020-12-17 00:54:58.326720 [NOTICE] [HttpListenCommand.cc:108] IPv4 RPC: listening on TCP port 6800 2020-12-17 00:54:58.326810 [INFO] [HttpListenCommand.cc:106] CUID#9 - Using port 6800 for accepting new connections 2020-12-17 00:54:58.326838 [NOTICE] [HttpListenCommand.cc:108] IPv6 RPC: listening on TCP port 6800 2020-12-17 00:54:58.339317 [DEBUG] [Platform.cc:87] GnuTLS: <3> ASSERT: ../../../lib/x509/dn.c[_gnutls_x509_compare_raw_dn]:990 2020-12-17 00:54:58.339661 [INFO] [LibgnutlsTLSContext.cc:158] 138 certificate(s) were imported. 2020-12-17 00:55:00.406672 [NOTICE] [SaveSessionCommand.cc:81] Успішне перетворення сесії '/var/local/aria2c/aria2c.sess'. 2020-12-17 00:55:02.408967 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:04.411259 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:06.413560 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:08.415873 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:10.418150 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:12.420461 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:14.422744 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:16.425036 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:18.427326 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:20.429641 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:22.431922 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:24.434235 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:26.436527 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:28.438840 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:30.441132 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:32.443445 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:34.445753 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:36.448088 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:38.450384 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:40.452687 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:42.454964 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:44.457267 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:46.459561 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:48.461874 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:50.464159 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:52.466450 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:54.468744 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:56.471036 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:55:58.473333 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:00.475643 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:02.477938 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:04.480276 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:06.482579 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:08.484887 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:10.487179 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:12.489475 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:14.491764 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:16.494068 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:18.496351 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:20.498644 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:22.500948 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:24.503221 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:26.505518 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:28.507878 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:30.510242 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:32.512560 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:34.514864 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:36.517158 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:38.519420 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:40.521673 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:42.523911 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:44.526161 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:46.528410 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:48.530649 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:50.532900 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:52.535173 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:54.537408 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:56.539649 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:56:58.541364 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. 2020-12-17 00:57:00.543624 [INFO] [SaveSessionCommand.cc:73] No change since last serialization or startup. No serialization is necessary this time. ```Web server error log
``` [Wed Dec 16 23:56:15.184243 2020] [mpm_worker:notice] [pid 243885:tid 139993087851584] AH00292: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations [Wed Dec 16 23:56:15.184359 2020] [core:notice] [pid 243885:tid 139993087851584] AH00094: Command line: '/usr/sbin/apache2' ```Nextcloud log
``` sudo cat /var/www/nextcloud/data/nextcloud.log {"reqId":"S7B6f8IFMTbp9rGQ9kyN","level":3,"time":"2018-04-27T19:30:33+00:00","remoteAddr":"192.168.122.1","user":"--","app":"no app in context","method":"POST","url":"\/nextcloud\/index.php","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\\n\\tIs the server running on host \\\"nc.local\\\" (127.0.1.1) and accepting\\n\\tTCP\\\/IP connections on port 5432?\\ncould not connect to server: Connection refused\\n\\tIs the server running on host \\\"nc.local\\\" (192.168.122.9) and accepting\\n\\tTCP\\\/IP connections on port 5432?\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(429): OC\\\\DB\\\\Connection->connect()\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(389): Doctrine\\\\DBAL\\\\Connection->getDatabasePlatformVersion()\\n#2 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(328): Doctrine\\\\DBAL\\\\Connection->detectDatabasePlatform()\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(623): Doctrine\\\\DBAL\\\\Connection->getDatabasePlatform()\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(151): Doctrine\\\\DBAL\\\\Connection->setTransactionIsolation(2)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172): OC\\\\DB\\\\Connection->__construct(Array, Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOPgSql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Configuration), Object(Doctrine\\\\Common\\\\EventManager))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/ConnectionFactory.php(152): Doctrine\\\\DBAL\\\\DriverManager::getConnection(Array, Object(Doctrine\\\\DBAL\\\\Configuration), Object(Doctrine\\\\Common\\\\EventManager))\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Setup\\\/AbstractDatabase.php(139): OC\\\\DB\\\\ConnectionFactory->getConnection('pgsql', Array)\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Setup\\\/PostgreSQL.php(44): OC\\\\Setup\\\\AbstractDatabase->connect(Array)\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Setup.php(340): OC\\\\Setup\\\\PostgreSQL->setupDatabase('admin')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/core\\\/Controller\\\/SetupController.php(66): OC\\\\Setup->install(Array)\\n#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(945): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#12 \\\/var\\\/www\\\/nextcloud\\\/index.php(37): OC::handleRequest()\\n#13 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php\",\"Line\":64}","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko\/20100101 Firefox\/59.0","version":"13.0.1.1"} {"reqId":"S7B6f8IFMTbp9rGQ9kyN","level":2,"time":"2018-04-27T19:30:33+00:00","remoteAddr":"192.168.122.1","user":"--","app":"no app in context","method":"POST","url":"\/nextcloud\/index.php","message":"Error trying to connect as \"postgres\", assuming database is setup and tables need to be created","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko\/20100101 Firefox\/59.0","version":"13.0.1.1"} ```Browser log
``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```