hirosystems/token-metadata-api

EADDRINUSE due to hard coded prometheus port conflict with blockchain api

Closed this issue ยท 2 comments

{"level":"info","time":"2024-07-20T20:37:02.642Z","pid":94902,"hostname":"nixos","name":"api","msg":"Initializing API service..."}
{"level":"error","time":"2024-07-20T20:37:02.810Z","pid":94902,"hostname":"nixos","name":"api","err":{"type":"Error","message":"listen EADDRINUSE: address already in use 0.0.0.0:9153","stack":"Error: listen EADDRINUSE: address already in use 0.0.0.0:9153\n at Server.setupListenHandle [as _listen2] (node:net:1897:16)\n at listenInCluster (node:net:1945:12)\n at doListen (node:net:2109:7)\n at process.processTicksAndRejections (node:internal/process/task_queues:83:21)","code":"EADDRINUSE","errno":-98,"syscall":"listen","address":"0.0.0.0","port":9153},"msg":"App failed to start"}

Token metadata API and blockchain API are hard coded to use the same port 9153 for prometheus, so they cannot run on the same host.

await promServer.listen({ host: ENV.API_HOST, port: 9153 });

https://github.com/hirosystems/stacks-blockchain-api/blob/1d9d0a681458addaaf556c988e1b11975b9d0371/src/index.ts#L205

๐ŸŽ‰ This issue has been resolved in version 1.0.0-beta.1 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version 1.0.0 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€