I am trying to run simple API on AZURE but it could not start.
Looks like there are some problems with docker containers but I did not use docker on this project at all.
2024-06-11T12:38:06.250Z ERROR - Container smapi_0_41997ae8 for site smapi did not start within expected time limit. Elapsed time = 230.9409353 sec
2024-06-11T12:38:06.269Z ERROR - Container smapi_0_41997ae8 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
Below is a full output
2024-06-11T12:34:13.639389363Z _____
2024-06-11T12:34:13.639439868Z / _ __________ _________ ____
2024-06-11T12:34:13.639445369Z / /_ \___ / | _ __ _/ __
2024-06-11T12:34:13.639449669Z / | / /| | /| | / ___/
2024-06-11T12:34:13.639453669Z ____|__ /_____ ____/ |__| ___ >
2024-06-11T12:34:13.639457970Z / / /
2024-06-11T12:34:13.639462170Z A P P S E R V I C E O N L I N U X
2024-06-11T12:34:13.639466270Z
2024-06-11T12:34:13.639469971Z Documentation: http://aka.ms/webapp-linux
2024-06-11T12:34:13.639473871Z NodeJS quickstart: https://aka.ms/node-qs
2024-06-11T12:34:13.639477772Z NodeJS Version : v18.19.1
2024-06-11T12:34:13.639481672Z Note: Any data outside '/home' is not persisted
2024-06-11T12:34:13.639485672Z
2024-06-11T12:34:14.780987341Z Starting OpenBSD Secure Shell server: sshd.
2024-06-11T12:34:15.043069764Z Starting periodic command scheduler: cron.
2024-06-11T12:34:15.351047911Z Found build manifest file at '/home/site/wwwroot/oryx-manifest.toml'. Deserializing it...
2024-06-11T12:34:15.351084015Z Build Operation ID: 1f0c0dc2c767d17b
2024-06-11T12:34:15.966713179Z Environment Variables for Application Insight's IPA Codeless Configuration exists..
2024-06-11T12:34:16.075344278Z Writing output script to '/opt/startup/startup.sh'
2024-06-11T12:34:16.194539449Z Running #!/bin/sh
2024-06-11T12:34:16.194579453Z
2024-06-11T12:34:16.194586654Z # Enter the source directory to make sure the script runs where the user expects
2024-06-11T12:34:16.194591954Z cd "/home/site/wwwroot"
2024-06-11T12:34:16.194597054Z
2024-06-11T12:34:16.194601855Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2024-06-11T12:34:16.194606655Z if [ -z "$PORT" ]; then
2024-06-11T12:34:16.194611456Z export PORT=8080
2024-06-11T12:34:16.194616356Z fi
2024-06-11T12:34:16.194620757Z
2024-06-11T12:34:16.194625257Z echo Found tar.gz based node_modules.
2024-06-11T12:34:16.194629957Z extractionCommand="tar -xzf node_modules.tar.gz -C /node_modules"
2024-06-11T12:34:16.194634658Z echo "Removing existing modules directory from root..."
2024-06-11T12:34:16.194639358Z rm -fr /node_modules
2024-06-11T12:34:16.194643759Z mkdir -p /node_modules
2024-06-11T12:34:16.194788272Z echo Extracting modules...
2024-06-11T12:34:16.194795273Z $extractionCommand
2024-06-11T12:34:16.194800173Z export NODE_PATH="/node_modules":$NODE_PATH
2024-06-11T12:34:16.194805274Z export PATH=/node_modules/.bin:$PATH
2024-06-11T12:34:16.194809874Z if [ -d node_modules ]; then
2024-06-11T12:34:16.194827576Z mv -f node_modules _del_node_modules || true
2024-06-11T12:34:16.194832476Z fi
2024-06-11T12:34:16.194836777Z
2024-06-11T12:34:16.194840977Z if [ -d /node_modules ]; then
2024-06-11T12:34:16.194845377Z ln -sfn /node_modules ./node_modules
2024-06-11T12:34:16.194849978Z fi
2024-06-11T12:34:16.194861579Z
2024-06-11T12:34:16.194865879Z echo "Done."
2024-06-11T12:34:16.194870480Z npm start
2024-06-11T12:34:16.205774283Z Found tar.gz based node_modules.
2024-06-11T12:34:16.205797885Z Removing existing modules directory from root...
2024-06-11T12:34:16.275478599Z Extracting modules...
2024-06-11T12:34:31.515363979Z Done.
2024-06-11T12:34:36.050058764Z npm info using [email protected]
2024-06-11T12:34:36.059130100Z npm info using [email protected]
2024-06-11T12:34:39.345107039Z
2024-06-11T12:34:39.345148043Z > [email protected] start
2024-06-11T12:34:39.345154944Z > ts-node src/index.ts
2024-06-11T12:34:39.345159744Z
2024-06-11T12:34:40.042847337Z npm http fetch GET 200 https://registry.npmjs.org/npm 1335ms
2024-06-11T12:34:40.388046497Z npm http fetch GET 200 https://registry.npmjs.org/npm 2310ms
2024-06-11T12:35:17.140667787Z Express server has started on port 3000. Open http://localhost:3000/permissions to see results
2024-06-11T12:38:06.250Z ERROR - Container smapi_0_41997ae8 for site smapi did not start within expected time limit. Elapsed time = 230.9409353 sec
2024-06-11T12:38:06.269Z ERROR - Container smapi_0_41997ae8 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2024-06-11T12:38:06.320Z INFO - Stopping site smapi because it failed during startup.
I tried to change ports of app.listen
function but of course it did not work.
[email protected]
[email protected]
New contributor
Nazarij Tkaczuk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.