Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4118

Can not start API on Azure using Node.js

$
0
0

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 sec2024-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 X2024-06-11T12:34:13.639466270Z 2024-06-11T12:34:13.639469971Z Documentation: http://aka.ms/webapp-linux2024-06-11T12:34:13.639473871Z NodeJS quickstart: https://aka.ms/node-qs2024-06-11T12:34:13.639477772Z NodeJS Version : v18.19.12024-06-11T12:34:13.639481672Z Note: Any data outside '/home' is not persisted2024-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: 1f0c0dc2c767d17b2024-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/sh2024-06-11T12:34:16.194579453Z 2024-06-11T12:34:16.194586654Z # Enter the source directory to make sure the script runs where the user expects2024-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_PATH2024-06-11T12:34:16.194606655Z if [ -z "$PORT" ]; then2024-06-11T12:34:16.194611456Z      export PORT=80802024-06-11T12:34:16.194616356Z fi2024-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_modules2024-06-11T12:34:16.194643759Z mkdir -p /node_modules2024-06-11T12:34:16.194788272Z echo Extracting modules...2024-06-11T12:34:16.194795273Z $extractionCommand2024-06-11T12:34:16.194800173Z export NODE_PATH="/node_modules":$NODE_PATH2024-06-11T12:34:16.194805274Z export PATH=/node_modules/.bin:$PATH2024-06-11T12:34:16.194809874Z if [ -d node_modules ]; then2024-06-11T12:34:16.194827576Z     mv -f node_modules _del_node_modules || true2024-06-11T12:34:16.194832476Z fi2024-06-11T12:34:16.194836777Z 2024-06-11T12:34:16.194840977Z if [ -d /node_modules ]; then2024-06-11T12:34:16.194845377Z     ln -sfn /node_modules ./node_modules 2024-06-11T12:34:16.194849978Z fi2024-06-11T12:34:16.194861579Z 2024-06-11T12:34:16.194865879Z echo "Done."2024-06-11T12:34:16.194870480Z npm start2024-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 npm@10.5.02024-06-11T12:34:36.059130100Z npm info using node@v18.19.12024-06-11T12:34:39.345107039Z 2024-06-11T12:34:39.345148043Z > typeorm-sample@0.0.1 start2024-06-11T12:34:39.345154944Z > ts-node src/index.ts2024-06-11T12:34:39.345159744Z 2024-06-11T12:34:40.042847337Z npm http fetch GET 200 https://registry.npmjs.org/npm 1335ms2024-06-11T12:34:40.388046497Z npm http fetch GET 200 https://registry.npmjs.org/npm 2310ms2024-06-11T12:35:17.140667787Z Express server has started on port 3000. Open http://localhost:3000/permissions to see results2024-06-11T12:38:06.250Z ERROR - Container smapi_0_41997ae8 for site smapi did not start within expected time limit. Elapsed time = 230.9409353 sec2024-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.

node@v18.19.1npm@10.5.0


Viewing all articles
Browse latest Browse all 4118

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>