authenticvision / digitalsoul

MetaAnchor-Framework for self-hosting
MIT License
2 stars 0 forks source link

Internal server error with fetch failed (webp related) #43

Open tbergmueller opened 12 months ago

tbergmueller commented 12 months ago

While I was using the NFT view of RDFC, some images loaded and and at some point loading stopped. Logs revealed fetch errors. Note closing and re-opining the webpage did not make any difference

This is the hosted instance at digitalsoul.metaanchor.io

Logs:

kubectl --namespace metaanchor-digitalsoul logs -f digitalsoul-65b54446b7-zg6x2
- ready started server on 0.0.0.0:8080, url: http://localhost:8080
- warn "next" should not be imported directly, imported in /srv/app/.next/server/pages/index.js
See more info here: https://nextjs.org/docs/messages/import-next
Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40106,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40050,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40062,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40070,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40080,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (/srv/app/node_modules/next/dist/compiled/undici/index.js:1:63301)
      at Socket.emit (node:events:529:35)
      at endReadableNT (node:internal/streams/readable:1368:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 40096,
      remoteAddress: '127.0.0.1',
      remotePort: 37467,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1991,
      bytesRead: 0
    }
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async handleRequest (/srv/app/node_modules/next/dist/server/lib/router-server.js:446:24)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:463:13)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11372:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/srv/app/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/srv/app/node_modules/next/dist/server/lib/router-server.js:253:29)
    at async requestHandler (/srv/app/node_modules/next/dist/server/lib/router-server.js:474:24)
    at async Server.<anonymous> (/srv/app/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED 0.0.0.0:37467
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '0.0.0.0',
    port: 37467
  }
}
tbergmueller commented 12 months ago

After restarting the pod, I could open the NFT view again, however, after some time the same errors occured. I assume that fetching some NFT-Image is causing this.

tbergmueller commented 12 months ago

Note this is related to uploading WebP files. I uploaded to two images WebP-Files to H8CFW3.zip

After I removed the two assets with the uploaded web and restarted the container, I could no longer reproduce the issue. Note that https://nextjs.org/docs/messages/sharp-missing-in-production

Severity Not having supporting webp files is not good, but ok What is critical is that one unsupported asset can crash the whole running instance!

Reproduction Attached is a WebP to reproduce the issue.

Improvement-suggestions