Next.js Discord

Discord Forum

Docker container error

Unanswered
Chalcid wasp posted this in #help-forum
Open in Discord
Chalcid waspOP
After building my image and creating a docker container of it, it works on the first minutes but then the application starts giving me these errors.

I'm using NextJS 13.4.12

Error: socket hang up
    at connResetException (node:internal/errors:720:14)
    at Socket.socketOnEnd (node:_http_client:525:23)
    at Socket.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET'
}
Error: connect ECONNREFUSED 172.17.0.8:40025
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '172.17.0.8',
  port: 40025
}

10 Replies

European sprat
try updating next
Chalcid waspOP
Apparently the errors mentioned have been fixed, but the Images didnt load
European sprat
what does that mean?
Chalcid waspOP
The images thar are used by next/image dont load right
European sprat
you need to figure out what the correct path to them is
look at the console logs to see where it thinks they are and then adjust accordingly
Chalcid waspOP
I didnt have changed the paths to the images, the application load the images for some minutes then starts giving the same error on console
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 172.17.0.8:32775
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '172.17.0.8',
    port: 32775
  }
}
European sprat
that error looks like you haven't updated nextjs
since that was an error on lower versions