luluhoc / home-cinema-toolkit

HCT - Home Cinema Toolkit (Refactor is coming with more functions)
Creative Commons Zero v1.0 Universal
30 stars 0 forks source link

Error connecting HCT to Radarr outside of Docker #538

Open subrosie opened 3 months ago

subrosie commented 3 months ago

Sorry to trouble with this but I'm pulling my hair out at this point. Read all prior closed issues, instructions etc. Any advice would be appreciated.

I am running radarr via network attached storage (synology) outside of docker. I am running HCT inside of docker in that same NAS. Radarr/NAS has about 12,000 movies in the index.

Pulled the Radarr API key, paid for an OMDB API key since I have more than 1,000 movies to process. I can access Radarr in web browser using external IP (XX.XXX.XX.XXX:8310) or a dns (name.synology.me:8310). Within my home network i can also access with a local ip (192.168.0.120:8310). However, when I put that external IP and port (XX.XXX.XX.XXX:8310) or dns and port (name.synology.me:8310) into HCT, it gives me a connection error. I temporarily turned off security for Radarr (user/pass) to see if that made a difference and it did not. I also tried turning off API v3 box on HCT and it did not make a difference.

Oddly, when I use the local IP (192.168.0.120:8310) I do not get a connection error, but HCT seems to "hang" saying "getting movies from Radarr." I left this overnight and it did not complete in 12 hours.

Below are the logs. I'm not savvy on reading these but it looks like "connection refused" on the external IP and "connection timed out" on the internal IP. Makes no sense to me since i am currently able to access radarr from a remote location using the external ip...

Using the external ip address, I get the following logs (I've redacted my external IP in the below logs)

toJSON: [Function: toJSON]   isAxiosError: true, response: undefined, },

  _currentUrl: 'http://XX.XXX.XX.XXX:8310/api/v3/movie', }, [Symbol(kOutHeaders)]: [Object: null prototype]  

_redirectable: [Circular 1], protocol: 'http:', host: 'XX.XXX.XX.XXXX', reusedSocket: false, maxHeadersCount: null, parser: null, upgradeOrConnect: false, timeoutCb: null, aborted: false, res: null, _ended: false, path: '/api/v3/movie', insecureHTTPParser: undefined, maxHeaderSize: undefined, method: 'GET', socketPath: undefined, agent: [Agent], _onPendingData: [Function: nop], _keepAliveTimeout: 0, '\r\n', 'Connection: close\r\n' +   'Host: XX.XXX.XX.XXX:8310\r\n' +   'X-Api-Key: e2a6e9b979b04430ac5ccb019841ef85\r\n' +   'User-Agent: request\r\n' +   'Accept: application/json, text/plain, /*\r\n' + _header: 'GET /api/v3/movie HTTP/1.1\r\n' +   socket: [Socket], _closed: false, _headerSent: true, finished: true, _trailer: '', _hasBody: true, _contentLength: 0, _removedTE: false, _removedContLen: false, _removedConnection: false, sendDate: false, useChunkedEncodingByDefault: false, _defaultKeepAlive: true, maxRequestsOnConnectionReached: false, shouldKeepAlive: false, chunkedEncoding: false, _last: true, destroyed: false, writable: true, outputSize: 0, outputData: [], _maxListeners: undefined, _eventsCount: 7, _events: [Object: null prototype], _currentRequest: ClientRequest {   _onNativeResponse: [Function (anonymous)], _requestBodyBuffers: [], _requestBodyLength: 0, _redirects: [], _redirectCount: 0, _ending: true, _ended: true, }, pathname: '/api/v3/movie'   nativeProtocols: [Object], port: '8310', hostname: 'XX.XXX.XX.XXX', auth: undefined, agents: [Object], agent: undefined, headers: [Object], method: 'GET', path: '/api/v3/movie', protocol: 'http:', maxBodyLength: 10485760, maxRedirects: 21, _options: {   _maxListeners: undefined, _eventsCount: 2, }, error: [Function: handleRequestError]   response: [Function: handleResponse], _events: [Object: null prototype] {   },

  closeEmitted: false, closed: false, errored: null, autoDestroy: true, emitClose: true, errorEmitted: false, prefinished: false, constructed: true, pendingcb: 0, allNoop: true, allBuffers: true, bufferedIndex: 0, buffered: [], afterWriteTickInfo: null, writelen: 0, writecb: null, onwrite: [Function: bound onwrite], bufferProcessing: false, sync: true, corked: 0, writing: false, length: 0, defaultEncoding: 'utf8', decodeStrings: true, destroyed: false, finished: false, ended: false, ending: false, needDrain: false, finalCalled: false, highWaterMark: 16384, objectMode: false, _writableState: WritableState {   request: <ref 1> Writable {   }, data: undefined   validateStatus: [Function: validateStatus], maxBodyLength: -1, maxContentLength: -1, xsrfHeaderName: 'X-XSRF-TOKEN', xsrfCookieName: 'XSRF-TOKEN', adapter: [Function: httpAdapter], timeout: 0, transformResponse: [ [Function: transformResponse] ], transformRequest: [ [Function: transformRequest] ], }, 'X-Api-Key': 'e2a6e9b979b04430ac5ccb019841ef85'   'User-Agent': 'request', Accept: 'application/json, text/plain, /*', headers: {   method: 'get', url: 'http://XX.XXX.XX.XXX:8310/api/v3/movie', config: {   port: 8310, address: '76.153.84.121', syscall: 'connect', code: 'ECONNREFUSED', errno: -111,     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16) {   Error: connect ECONNREFUSED XX.XXX.XX.XXX:8310

Using the local ip, I get the following logs:

toJSON: [Function: toJSON]
 
isAxiosError: true,
response:   undefined,
},
[Symbol(kCapture)]: false
 
_currentUrl:   'http://192.168.0.120:8310/api/v3/movie',
},
[Symbol(kOutHeaders)]: [Object: null   prototype]
 
[Symbol(corked)]:   0,
[Symbol(kNeedDrain)]:   false,
[Symbol(kCapture)]:   false,
_redirectable: [Circular   *1],
protocol:   'http:',
host:   '192.168.0.120',
reusedSocket:   false,
maxHeadersCount:   null,
parser: null,
upgradeOrConnect:   false,
timeoutCb: null,
aborted: false,
res: null,
_ended: false,
path:   '/api/v3/movie',
insecureHTTPParser:   undefined,
maxHeaderSize:   undefined,
method: 'GET',
socketPath:   undefined,
agent: [Agent],
_onPendingData: [Function:   nop],
_keepAliveTimeout:   0,
'\r\n',
'Connection: close\r\n' +
 
'Host: 192.168.0.120:8310\r\n' +
 
'X-Api-Key: e2a6e9b979b04430ac5ccb019841ef85\r\n' +
 
'User-Agent: request\r\n' +
 
'Accept: application/json,   text/plain, */*\r\n' +
_header: 'GET /api/v3/movie HTTP/1.1\r\n' +
 
socket:   [Socket],
_closed: false,
_headerSent:   true,
finished: true,
_trailer: '',
_hasBody: true,
_contentLength:   0,
_removedTE:   false,
_removedContLen:   false,
_removedConnection:   false,
sendDate:   false,
useChunkedEncodingByDefault:   false,
_defaultKeepAlive:   true,
maxRequestsOnConnectionReached:   false,
shouldKeepAlive:   false,
chunkedEncoding:   false,
_last: true,
destroyed:   false,
writable: true,
outputSize: 0,
outputData: [],
_maxListeners:   undefined,
_eventsCount:   7,
_events: [Object: null   prototype],
_currentRequest: ClientRequest {
 
_onNativeResponse: [Function   (anonymous)],
_requestBodyBuffers: [],
_requestBodyLength:   0,
_redirects: [],
_redirectCount:   0,
_ending: true,
_ended: true,
},
pathname: '/api/v3/movie'
 
nativeProtocols:   [Object],
port: '8310',
hostname:   '192.168.0.120',
auth:   undefined,
agents:   [Object],
agent:   undefined,
headers:   [Object],
method: 'GET',
path:   '/api/v3/movie',
protocol:   'http:',
maxBodyLength:   10485760,
maxRedirects:   21,
_options: {
 
_maxListeners:   undefined,
_eventsCount: 2,
},
error: [Function: handleRequestError]
 
response: [Function:   handleResponse],
_events: [Object: null prototype] {
 
},
[Symbol(kOnFinished)]: []
 
closeEmitted:   false,
closed: false,
errored: null,
autoDestroy:   true,
emitClose:   true,
errorEmitted:   false,
prefinished:   false,
constructed:   true,
pendingcb: 0,
allNoop: true,
allBuffers:   true,
bufferedIndex:   0,
buffered: [],
afterWriteTickInfo:   null,
writelen: 0,
writecb: null,
onwrite: [Function: bound   onwrite],
bufferProcessing:   false,
sync: true,
corked: 0,
writing: false,
length: 0,
defaultEncoding:   'utf8',
decodeStrings:   true,
destroyed:   false,
finished:   false,
ended: false,
ending: false,
needDrain:   false,
finalCalled:   false,
highWaterMark:   16384,
objectMode:   false,
_writableState: WritableState {
 
request: <ref *1> Writable {
 
},
data: undefined
 
validateStatus: [Function:   validateStatus],
maxBodyLength:   -1,
maxContentLength:   -1,
xsrfHeaderName:   'X-XSRF-TOKEN',
xsrfCookieName:   'XSRF-TOKEN',
adapter: [Function:   httpAdapter],
timeout: 0,
transformResponse: [ [Function:   transformResponse] ],
transformRequest: [ [Function:   transformRequest] ],
},
'X-Api-Key':   'e2a6e9b979b04430ac5ccb019841ef85'
 
'User-Agent':   'request',
Accept: 'application/json,   text/plain, */*',
headers: {
 
method: 'get',
url:   'http://192.168.0.120:8310/api/v3/movie',
config: {
 
port: 8310,
address:   '192.168.0.120',
syscall: 'connect',
code: 'ETIMEDOUT',
errno: -110,
    at TCPConnectWrap.afterConnect [as   oncomplete] (node:net:1195:16) {
 
Error: connect ETIMEDOUT   192.168.0.120:8310