Sebclem / hassio-nextcloud-backup

Hass.io Add-on: Backup your snapshots to Nextcloud
GNU General Public License v3.0
118 stars 15 forks source link

Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https) ! #201

Closed jclsn closed 1 year ago

jclsn commented 1 year ago

Describe the bug I get a

Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https) !

although the url is definitely correct and working. I am using Nginx Proxy Manager for it. No idea if that is an issue.

To Reproduce Steps to reproduce the behavior: No idea. Install Nextcloud with docker compose and use Nginx Proxy Manager to create a proxy maybe

System information

Additional context

    at ServerResponse.send (/opt/nextcloud_backup/node_modules/express/lib/response.js:162:21)
    at file:///opt/nextcloud_backup/routes/api.js:56:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[10:50:23] INFO: Starting Node...
[2023-03-12 10:50:27] [info]:   Log level: info
[2023-03-12 10:50:27] [info]:   Backup timeout: 5400000
[2023-03-12 10:50:27] [info]:   Satus : Go !
[2023-03-12 10:50:27] [info]:   Initializing and checking webdav client...
[2023-03-12 10:50:27] [info]:   Starting auto clean cron...
[2023-03-12 10:50:27] [warn]:   No Cron settings available.
[2023-03-12 10:50:27] [info]:   Hassio API : Go !
[2023-03-12 10:50:31] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:50:31] [error]:  Nextcloud connection : FAIL !
[2023-03-12 10:50:31] [error]:  ... Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https) !
[2023-03-12 10:50:32] [info]:   Initializing and checking webdav client...
[2023-03-12 10:50:32] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:52:51] [info]:   Initializing and checking webdav client...
[2023-03-12 10:52:55] [error]:  uncaughtException: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property 'parser' -> object with constructor 'HTTPParser'
    --- property 'socket' closes the circle
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property 'parser' -> object with constructor 'HTTPParser'
    --- property 'socket' closes the circle
    at JSON.stringify (<anonymous>)
    at stringify (/opt/nextcloud_backup/node_modules/express/lib/response.js:1150:12)
    at ServerResponse.json (/opt/nextcloud_backup/node_modules/express/lib/response.js:271:14)
    at ServerResponse.send (/opt/nextcloud_backup/node_modules/express/lib/response.js:162:21)
    at file:///opt/nextcloud_backup/routes/api.js:56:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-03-12 10:52:55] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[10:52:58] INFO: Starting Node...
[2023-03-12 10:53:02] [info]:   Log level: info
[2023-03-12 10:53:02] [info]:   Backup timeout: 5400000
[2023-03-12 10:53:02] [info]:   Satus : Go !
[2023-03-12 10:53:02] [info]:   Initializing and checking webdav client...
[2023-03-12 10:53:02] [info]:   Starting auto clean cron...
[2023-03-12 10:53:02] [warn]:   No Cron settings available.
[2023-03-12 10:53:02] [info]:   Hassio API : Go !
[2023-03-12 10:53:06] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:53:06] [error]:  Nextcloud connection : FAIL !
[2023-03-12 10:53:06] [error]:  ... Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https) !
[2023-03-12 10:53:10] [info]:   Initializing and checking webdav client...
[2023-03-12 10:53:10] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:53:20] [info]:   Initializing and checking webdav client...
[2023-03-12 10:53:23] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:54:45] [info]:   Initializing and checking webdav client...
[2023-03-12 10:54:49] [error]:  uncaughtException: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property 'parser' -> object with constructor 'HTTPParser'
    --- property 'socket' closes the circle
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property 'parser' -> object with constructor 'HTTPParser'
    --- property 'socket' closes the circle
    at JSON.stringify (<anonymous>)
    at stringify (/opt/nextcloud_backup/node_modules/express/lib/response.js:1150:12)
    at ServerResponse.json (/opt/nextcloud_backup/node_modules/express/lib/response.js:271:14)
    at ServerResponse.send (/opt/nextcloud_backup/node_modules/express/lib/response.js:162:21)
    at file:///opt/nextcloud_backup/routes/api.js:56:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-03-12 10:54:49] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[10:54:52] INFO: Starting Node...
[2023-03-12 10:54:56] [info]:   Log level: info
[2023-03-12 10:54:56] [info]:   Backup timeout: 5400000
[2023-03-12 10:54:56] [info]:   Satus : Go !
[2023-03-12 10:54:56] [info]:   Initializing and checking webdav client...
[2023-03-12 10:54:56] [info]:   Starting auto clean cron...
[2023-03-12 10:54:56] [warn]:   No Cron settings available.
[2023-03-12 10:54:56] [info]:   Hassio API : Go !
[2023-03-12 10:55:00] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:55:00] [error]:  Nextcloud connection : FAIL !
[2023-03-12 10:55:00] [error]:  ... Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https) !
[2023-03-12 10:55:03] [info]:   Initializing and checking webdav client...
[2023-03-12 10:55:03] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:59:38] [info]:   Initializing and checking webdav client...
[2023-03-12 10:59:41] [error]:  Can't connect to Nextcloud (Error: getaddrinfo ENOTFOUND https)
[2023-03-12 10:59:41] [error]:  uncaughtException: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle
    at JSON.stringify (<anonymous>)
    at stringify (/opt/nextcloud_backup/node_modules/express/lib/response.js:1150:12)
    at ServerResponse.json (/opt/nextcloud_backup/node_modules/express/lib/response.js:271:14)
    at ServerResponse.send (/opt/nextcloud_backup/node_modules/express/lib/response.js:162:21)
    at file:///opt/nextcloud_backup/routes/api.js:56:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[10:59:44] INFO: Starting Node...
[2023-03-12 10:59:49] [info]:   Log level: info
[2023-03-12 10:59:49] [info]:   Backup timeout: 5400000
[2023-03-12 10:59:49] [info]:   Satus : Go !
[2023-03-12 10:59:49] [info]:   Initializing and checking webdav client...
[2023-03-12 10:59:49] [info]:   Starting auto clean cron...
[2023-03-12 10:59:49] [warn]:   No Cron settings available.
[2023-03-12 10:59:49] [info]:   Hassio API : Go !
Sebclem commented 1 year ago

Can you check that you have put only the hostname in settings (exemple.com without the https:// part) ?

jclsn commented 1 year ago

Oh yeah that works. Maybe you should make that more clear in the configuration or solve it in code so the user can write both.