jellyseerr icon indicating copy to clipboard operation
jellyseerr copied to clipboard

Error: Something went wrong retrieving movie, Failed to fetch movie details: read ECONNRESET

Open ramkrishna757575 opened this issue 1 year ago • 12 comments

Description

When opening Jellyseerr web ui, multiple APIs are failing and content doesn't load in the UI. For example several sections on the "Discover" page (Popular Movies section, etc) are breaking with the error: { "message": "Unable to retrieve popular series." } This also happens if, we click on any movie and go to its details page. The API fails here as well.

Note: This issue is intermittent as the sections and the movie details do load sometimes, and many times they fail.

Version

1.7.0 Running in Docker

Steps to Reproduce

  1. Goto Jellyseerr web UI
  2. Wait for the UI to load data for the Discover page
  3. Observe that several sections of this page do not show any data even when waiting for a long time
  4. If clicking on any movie that was loaded, and going to the movie details page, sometimes the data for movie details also doesn't load

Screenshots

Screenshot 2023-12-09 210656

Logs

2023-12-09T15:12:50.306Z [debug][API]: Something went wrong retrieving movie {"errorMessage":"[TMDB] Failed to fetch movie details: read ECONNRESET","movieId":"572802"}
AxiosError: Request failed with status code 500
    at settle (file:///app/node_modules/axios/lib/core/settle.js:19:12)
    at IncomingMessage.handleStreamEnd (file:///app/node_modules/axios/lib/adapters/http.js:556:11)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ERR_BAD_RESPONSE',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: null },
    validateStatus: [Function: validateStatus],
    headers: AxiosHeaders {
      Accept: 'application/json, text/plain, */*',
      cookie: 'connect.sid=s%3ApjJ2BDhq8eMmh7zH76_ufBcM5A6eCn_R.n9URxn%2BT9dUtgwzrQXarJDPveR1FXkf8x4v5BUyyBlQ',
      'User-Agent': 'axios/1.3.4',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    method: 'get',
    url: 'http://localhost:5055/api/v1/movie/572802',
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'localhost',
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(async_id_symbol)]: 40027,
      [Symbol(kHandle)]: [TCP],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 60,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'GET /api/v1/movie/572802 HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'cookie: connect.sid=s%3ApjJ2BDhq8eMmh7zH76_ufBcM5A6eCn_R.n9URxn%2BT9dUtgwzrQXarJDPveR1FXkf8x4v5BUyyBlQ\r\n' +
      'User-Agent: axios/1.3.4\r\n' +
      'Accept-Encoding: gzip, compress, deflate, br\r\n' +
      'Host: localhost:5055\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/api/v1/movie/572802',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 500,
      statusMessage: 'Internal Server Error',
      client: [Socket],
      _consuming: true,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://localhost:5055/api/v1/movie/572802',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 12,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'localhost',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://localhost:5055/api/v1/movie/572802',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      cookie: [Array],
      'user-agent': [Array],
      'accept-encoding': [Array],
      host: [Array]
    },
    [Symbol(kUniqueHeaders)]: null
  },
  response: {
    status: 500,
    statusText: 'Internal Server Error',
    headers: AxiosHeaders {
      'x-powered-by': 'Express',
      'content-type': 'application/json; charset=utf-8',
      'content-length': '39',
      etag: 'W/"27-FNUmYWpg+1cXkgQBJZEf2wtJZY0"',
      date: 'Sat, 09 Dec 2023 15:12:50 GMT',
      connection: 'close'
    },
    config: {
      transitional: [Object],
      adapter: [Array],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [AxiosHeaders],
      method: 'get',
      url: 'http://localhost:5055/api/v1/movie/572802',
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'GET /api/v1/movie/572802 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'cookie: connect.sid=s%3ApjJ2BDhq8eMmh7zH76_ufBcM5A6eCn_R.n9URxn%2BT9dUtgwzrQXarJDPveR1FXkf8x4v5BUyyBlQ\r\n' +
        'User-Agent: axios/1.3.4\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: localhost:5055\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v1/movie/572802',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    data: { message: 'Unable to retrieve movie.' }
  }
}
2023-12-09T15:12:51.170Z [debug][API]: Something went wrong retrieving the series genre slider {"errorMessage":"[TMDB] Failed to fetch discover TV: read ECONNRESET"}
2023-12-09T15:12:51.187Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: read ECONNRESET"}
2023-12-09T15:12:51.193Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"}
2023-12-09T15:12:51.404Z [debug][API]: Something went wrong retrieving movie {"errorMessage":"[TMDB] Failed to fetch movie details: read ECONNRESET","movieId":"1114901"}
2023-12-09T15:12:51.592Z [debug][API]: Something went wrong retrieving the movie genre slider {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"}
2023-12-09T15:12:56.367Z [debug][API]: Something went wrong retrieving the series genre slider {"errorMessage":"[TMDB] Failed to fetch discover TV: read ECONNRESET"}
2023-12-09T15:12:56.391Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"}
2023-12-09T15:13:00.005Z [debug][Jobs]: Starting scheduled job: Download Sync 
2023-12-09T15:13:00.009Z [debug][Download Tracker]: Found 1 item(s) in progress on Radarr server: Radarr 
2023-12-09T15:13:02.088Z [debug][API]: Something went wrong retrieving the movie genre slider {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"}
2023-12-09T15:13:02.097Z [debug][API]: Something went wrong retrieving popular series {"errorMessage":"[TMDB] Failed to fetch discover TV: read ECONNRESET"}
2023-12-09T15:13:02.110Z [debug][API]: Something went wrong retrieving movie {"errorMessage":"[TMDB] Failed to fetch movie details: read ECONNRESET","movieId":"1114901"}

Platform

desktop

Device

Desktop PC

Operating System

Windows 11

Browser

Brave

Additional Context

No response

Code of Conduct

  • [X] I agree to follow Jellyseerr's Code of Conduct

ramkrishna757575 avatar Dec 09 '23 15:12 ramkrishna757575

You're losing connection to tmdb for some reason

This probably might not help but you could try specify dns in the container. Just to narrow it down. Either it's your docker container losing connection or its your router or isp

fallenbagel avatar Dec 09 '23 16:12 fallenbagel

@ramkrishna757575 Did you get resolution for your issue? I am facing same issue since last few days.

mohit-kothari avatar Dec 12 '23 20:12 mohit-kothari

I had that issue once, my VPN updated or something, and was no longer tunneling properly. Turned it off and the connection was restored

Mitazaki avatar Dec 14 '23 15:12 Mitazaki

I think my issue was due to IPv6. I disabled IPv6 on the VM running jellyseerr docker container. After this, things seems to be stable now.

Update: though it appeared to work for a day, sadly issue is back again.

mohit-kothari avatar Dec 14 '23 20:12 mohit-kothari

I've been encountering the same issue for the past couple of weeks. It's interesting that majority of the users experiencing this problem appear to be from India. By any chance, are you using Airtel ISP?

2023-12-23T16:27:28.342Z [debug][API]: Something went wrong retrieving trending items {"errorMessage":"[TMDB] Failed to fetch all trending: read ECONNRESET"} 2023-12-23T16:27:28.353Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"} 2023-12-23T16:27:29.084Z [debug][API]: Something went wrong retrieving popular movies {"errorMessage":"[TMDB] Failed to fetch discover movies: read ECONNRESET"}

aadhithbala avatar Dec 23 '23 16:12 aadhithbala

By any chance, are you using Airtel ISP?

Yes, I am using Airtel too. I also noticed this few days ago. I created a new API key and tried hitting tmdb API via postman and interestingly, it fails first time with Connection reset by peer error but works from second time onwards.

mohit-kothari avatar Dec 23 '23 18:12 mohit-kothari

Unfortunately this seems to be an issue w the isp+tmdb connection so I cannot help you there 😔

My advise would be try a proxy. From a simple vps

fallenbagel avatar Dec 23 '23 21:12 fallenbagel

Sorry wasn't able to reply before. I am still facing this issue. And yes, I am also using Airtel ISP 😞 @Fallenbagel I'll try the suggestion you gave sometime later if time permits and update my findings.

Thanks for looking into this.

ramkrishna757575 avatar Dec 25 '23 12:12 ramkrishna757575

Update: @Fallenbagel you were right. I am running Jellyseerr in a docker container. I updated the network config of the container to use VPN and then restarted the container. And voila! everything is back to working again.

Thanks again for helping me resolve this issue 😀

ramkrishna757575 avatar Dec 25 '23 13:12 ramkrishna757575

Update: @Fallenbagel you were right. I am running Jellyseerr in a docker container. I updated the network config of the container to use VPN and then restarted the container. And voila! everything is back to working again.

Thanks again for helping me resolve this issue 😀

I'm not using a VPN at the moment. However, I've set up Cloudflare warp-cli in tunnel-only mode, and it appears to be resolving the issue for now. What VPN are you currently using to overcome this API error?

aadhithbala avatar Dec 25 '23 13:12 aadhithbala

Update: @Fallenbagel you were right. I am running Jellyseerr in a docker container. I updated the network config of the container to use VPN and then restarted the container. And voila! everything is back to working again. Thanks again for helping me resolve this issue 😀

I'm not using a VPN at the moment. However, I've set up Cloudflare warp-cli in tunnel-only mode, and it appears to be resolving the issue for now. What VPN are you currently using to overcome this API error?

I am using ExpressVPN also as a docker container

ramkrishna757575 avatar Dec 25 '23 13:12 ramkrishna757575

I decided to change the DNS to cloudflare(1.1.1.1) and also kept the default DNS as Secondary Option and restarted the Network Service and Jellyseer. That was the fix. Looks like issue is with TMDB if you are unable to reach their server either the ISP's default routing is not allowing it or due to local DNS caching. In that case change the default DNS to some providers like Cloudflare,Google DNS, Open DNS,Next DNS,etc and Flush the DNS cache in your OS.

Setting up VPN is not a Reliable option, one could use Proxy but then having to Again refresh Proxy Address is not a better solution. But if you are using Docker then you may use VPN to tunnel your traffic of JellySeerr Container Only this could be an Idle Solution.

wlrmarl avatar Dec 26 '23 11:12 wlrmarl

I will be closing this as this is more of a tmdb api/isp/dns issue than jellyseerr

Feel free to reopen if you disagree

fallenbagel avatar May 23 '24 11:05 fallenbagel