The server will not fully start - it terminates early with an hc-pages-plugin timeout error.
After building the image with:
docker build --no-cache --platform=linux/amd64 -t hc-pdf-server:latest .
and running the container with:
docker run --platform=linux/amd64 -it -p 8080:8080 hc-pdf-server:latest
I get the following output:
yarn run v1.22.19
$ node dist/src/server.js
pageOptions: {
userAgent: undefined,
pageTimeoutMilliseconds: 30000,
emulateMediaTypeScreenEnabled: false,
acceptLanguage: undefined,
viewport: {
width: 800,
height: 600,
deviceScaleFactor: 1,
isMobile: false,
isLandscape: false,
hasTouch: false
}
}
launchOptions: {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-gpu',
'--disable-dev-shm-usage'
]
}
launchOptions {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-gpu',
'--disable-dev-shm-usage'
]
}
/app/node_modules/avvio/plugin.js:122
const err = new AVV_ERR_READY_TIMEOUT(name)
^
AvvioError [Error]: Plugin did not start in time: 'hc-pages-plugin'. You may have forgotten to call 'done' function or to resolve a Promise
at Timeout._onTimeout (/app/node_modules/avvio/plugin.js:122:19)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
code: 'AVV_ERR_READY_TIMEOUT',
fn: <ref *1> [AsyncFunction: plugin] {
default: [Circular *1],
hcPagesPlugin: [Circular *1],
[Symbol(skip-override)]: true,
[Symbol(fastify.display-name)]: 'hc-pages-plugin',
[Symbol(plugin-meta)]: { fastify: '^4.0.0', name: 'hc-pages-plugin' }
}
}
Node.js v18.15.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
... and the container terminates.
I am using a MacBook Pro M1 (thus the --platform=linux/amd64 references) for development and testing. Will be using AWS Kubernetes for production deployment once I can get it working locally.
Not sure why the timeout is occurring. I would appreciate any and all guidance on finding a solution.
The server will not fully start - it terminates early with an hc-pages-plugin timeout error.
After building the image with:
docker build --no-cache --platform=linux/amd64 -t hc-pdf-server:latest .and running the container with:
docker run --platform=linux/amd64 -it -p 8080:8080 hc-pdf-server:latestI get the following output:
... and the container terminates.
I am using a MacBook Pro M1 (thus the
--platform=linux/amd64references) for development and testing. Will be using AWS Kubernetes for production deployment once I can get it working locally.Not sure why the timeout is occurring. I would appreciate any and all guidance on finding a solution.