Frustrating situation for deploy (Azure)

Hello community,
i am really frustrated with publishing my node.js project to azure.
Unfortunately I have no experience with this stack, the only thing I can do is share some logs that I read in Azure error reports.
Please help me understand what I have to do, within 5 days I have to be online!!!

_____
2023-06-09T20:11:16.958784782Z / _ \ __________ _________ ____
2023-06-09T20:11:16.958788782Z / /\ \__ / | _ __ _/ __ \
2023-06-09T20:11:16.958791882Z / | / /| | /| | /\ /
2023-06-09T20:11:16.958794882Z _
|__ /_____ _/ || __ >
2023-06-09T20:11:16.958797982Z / / /
2023-06-09T20:11:16.958800982Z A P P S E R V I C E O N L I N U X
2023-06-09T20:11:16.958803782Z
2023-06-09T20:11:16.958806482Z Documentation: http://aka.ms/webapp-linux
2023-06-09T20:11:16.958838783Z NodeJS quickstart: https://aka.ms/node-qs
2023-06-09T20:11:16.958847383Z NodeJS Version : v16.20.0
2023-06-09T20:11:16.958851183Z Note: Any data outside ā€˜/homeā€™ is not persisted
2023-06-09T20:11:16.958854483Z
2023-06-09T20:11:18.039480762Z Starting OpenBSD Secure Shell server: sshd.
2023-06-09T20:11:18.307726945Z Starting periodic command scheduler: cron.
2023-06-09T20:11:18.416738107Z Cound not find build manifest file at ā€˜/home/site/wwwroot/oryx-manifest.tomlā€™
2023-06-09T20:11:18.417850226Z Could not find operation ID in manifest. Generating an operation idā€¦
2023-06-09T20:11:18.417873227Z Build Operation ID: 315034b9-2293-4603-9952-bcbd8d89f6b8
2023-06-09T20:11:18.992808650Z Environment Variables for Application Insightā€™s IPA Codeless Configuration existsā€¦
2023-06-09T20:11:19.023061366Z Writing output script to ā€˜/opt/startup/startup.shā€™
2023-06-09T20:11:19.142422606Z Running #!/bin/sh
2023-06-09T20:11:19.142458706Z
2023-06-09T20:11:19.142464406Z # Enter the source directory to make sure the script runs where the user expects
2023-06-09T20:11:19.142468706Z cd ā€œ/home/site/wwwrootā€
2023-06-09T20:11:19.142472607Z
2023-06-09T20:11:19.142476407Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2023-06-09T20:11:19.142480107Z if [ -z ā€œ$PORTā€ ]; then
2023-06-09T20:11:19.142483807Z export PORT=8080
2023-06-09T20:11:19.142487807Z fi
2023-06-09T20:11:19.142491507Z
2023-06-09T20:11:19.161982540Z npm start
2023-06-09T20:11:25.778530183Z npm info using n******@9.6.4
2023-06-09T20:11:25.788635255Z npm info using n******@v16.20.0
2023-06-09T20:11:26.203419656Z
2023-06-09T20:11:26.203454757Z > y******@1.6.0 start
2023-06-09T20:11:26.203461857Z > node ./index.js
2023-06-09T20:11:26.203466457Z
2023-06-09T20:11:26.959862956Z node:internal/modules/cjs/loader:1029
2023-06-09T20:11:26.959898857Z throw err;
2023-06-09T20:11:26.959904357Z ^
2023-06-09T20:11:26.959922157Z
2023-06-09T20:11:26.959925957Z Error: Cannot find module ā€˜dotenvā€™
2023-06-09T20:11:26.959929657Z Require stack:
2023-06-09T20:11:26.959933257Z - /home/site/wwwroot/lib/server.js
2023-06-09T20:11:26.959936957Z - /home/site/wwwroot/index.js
2023-06-09T20:11:26.959940657Z at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
2023-06-09T20:11:26.959944358Z at Function.Module._load (node:internal/modules/cjs/loader:871:27)
2023-06-09T20:11:26.959948258Z at Module.require (node:internal/modules/cjs/loader:1098:19)
2023-06-09T20:11:26.959951958Z at require (node:internal/modules/cjs/helpers:108:18)
2023-06-09T20:11:26.959955558Z at Object. (/home/site/wwwroot/lib/server.js:2:5)
2023-06-09T20:11:26.959959758Z at Module._compile (node:internal/modules/cjs/loader:1196:14)
2023-06-09T20:11:26.959963458Z at Object.Module._extensionsā€¦js (node:internal/modules/cjs/loader:1250:10)
2023-06-09T20:11:26.959967158Z at Module.load (node:internal/modules/cjs/loader:1074:32)
2023-06-09T20:11:26.959970658Z at Function.Module._load (node:internal/modules/cjs/loader:909:12)
2023-06-09T20:11:26.959974258Z at Module.require (node:internal/modules/cjs/loader:1098:19) {
2023-06-09T20:11:26.959978258Z code: ā€˜MODULE_NOT_FOUNDā€™,
2023-06-09T20:11:26.959981958Z requireStack: [ ā€˜/home/site/wwwroot/lib/server.jsā€™, ā€˜/home/site/wwwroot/index.jsā€™ ]
2023-06-09T20:11:26.959985758Z }

Iā€™m guessing itā€™s missing the command npm install

Can you give me some more details?
Unfortunately Iā€™m not familiar with node.js, where should I put this command?

Put ā€œnpm installā€ in the beginning of ā€œComando Avviaā€

Ok, Iā€™ll try to insert the command right awayā€¦ PS are you Italian?

Iā€™m not Italian and I donā€™t know Azure, I just went to take a peek at your previous topic to try help you :wink:

A ok, really kind of youā€¦unfortunately it still doesnā€™t work, now Iā€™ve seen these errors too
Container yc-staging_0_85be9994 did not respond to HTTP pings on port: 8080, site launch failed
Container yc-staging_0_07568dfe did not respond to HTTP pings on port: 8080, site launch failed
Container yc-staging_0_07568dfe for site yc-staging ended, site launch failed

Those errors were already present

The reason I mentioned to do ā€œnpm installā€ was because I found this error:

Error: Cannot find module ā€˜dotenvā€™

Are you still seeing that error?

May help to expose the ports being refused. Like Apple Iā€™m not too clued up on Azue.

2023-06-09T23:04:34  Welcome, you are now connected to log-streaming service.

Starting Log Tail -n 10 of existing logs ----

/home/LogFiles/__lastCheckTime.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/__lastCheckTime.txt)
06/09/2023 22:50:29

/home/LogFiles/kudu/trace/48bcabf2772c-f7921074-a866-4365-b5f3-b653f1b76118.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/48bcabf2772c-f7921074-a866-4365-b5f3-b653f1b76118.txt)
2023-06-09T22:41:20 Startup Request, url: /api/deployments/?api-version=2018-11-01, method: GET, type: request, pid: 84,1,27, ScmType: None

/home/LogFiles/kudu/trace/7a8da51e11ca-7575ea62-3d9a-4981-aab5-5f51a60ef98b.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/7a8da51e11ca-7575ea62-3d9a-4981-aab5-5f51a60ef98b.txt)
2023-06-09T22:30:57 Startup Request, url: /detectors, method: GET, type: request, pid: 84,1,18, ScmType: None

/home/LogFiles/kudu/trace/88bd671c1d86-a3482787-4143-4b7c-8296-163dd6477950.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/88bd671c1d86-a3482787-4143-4b7c-8296-163dd6477950.txt)
2023-06-09T22:25:19 Startup Request, url: /detectors, method: GET, type: request, pid: 86,1,20, ScmType: None

/home/LogFiles/kudu/trace/905e93fbd25f-b2280686-21af-4d55-88bd-2191ffc48245.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/905e93fbd25f-b2280686-21af-4d55-88bd-2191ffc48245.txt)
2023-06-09T14:26:15 Startup Request, url: /api/deployments/?api-version=2018-11-01, method: GET, type: request, pid: 79,1,5, ScmType: None

/home/LogFiles/kudu/trace/970df8257bec-0adfac5f-d7b2-4b30-81dc-8d44ac6b39b0.txt (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/970df8257bec-0adfac5f-d7b2-4b30-81dc-8d44ac6b39b0.txt)
2023-06-09T15:17:12 Startup Request, url: /detectors, method: GET, type: request, pid: 79,1,21, ScmType: None

/home/LogFiles/2023_06_09_lw0sdlwk00008H_default_docker.log (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/2023_06_09_lw0sdlwk00008H_default_docker.log)
2023-06-09T22:50:49.030339389Z run npm fund for details
2023-06-09T22:50:49.032557228Z
2023-06-09T22:50:49.032573729Z found 0 vulnerabilities
2023-06-09T22:50:49.042189499Z npm notice
2023-06-09T22:50:49.050874054Z npm notice New minor version of npm available! 9.6.4 -> 9.7.1
2023-06-09T22:50:49.052446682Z npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.7.1
2023-06-09T22:50:49.052462382Z npm notice Run npm install -g npm@9.7.1 to update!
2023-06-09T22:50:49.052467782Z npm notice
2023-06-09T22:50:49.100435135Z npm info ok

/home/LogFiles/2023_06_09_lw0sdlwk00008H_docker.log (https://yc-staging.scm.azurewebsites.net/api/vfs/LogFiles/2023_06_09_lw0sdlwk00008H_docker.log)
2023-06-09T22:50:30.733Z INFO - Starting container for site
2023-06-09T22:50:30.735Z INFO - docker run -d --expose=8080 --name yc-staging_0_86bc981e -e WEBSITE_SITE_NAME=yc-staging -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=yc-staging.azurewebsites.net -e WEBSITE_INSTANCE_ID=30e4e8a073d6b23893ad40ea1f2ce810eded8ffe238ffb654d64fec398cc53ed -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/node:16-lts_20230502.1.tuxprod npm install

2023-06-09T22:50:30.735Z INFO - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-06-09T22:50:33.116Z INFO - Initiating warmup request to container yc-staging_0_86bc981e for site yc-staging
2023-06-09T22:50:50.022Z INFO - Waiting for response to warmup request for container yc-staging_0_86bc981e. Elapsed time = 16.9060764 sec
2023-06-09T22:50:50.039Z ERROR - Container yc-staging_0_86bc981e for site yc-staging has exited, failing site start
2023-06-09T22:50:50.058Z ERROR - Container yc-staging_0_86bc981e didnā€™t respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2023-06-09T22:50:50.067Z INFO - Stopping site yc-staging because it failed during startup.

Ending Log Tail of existing logs ā€”

Starting Live Log Stream ā€”

Could you maybe check Wappler settings for your target, to see if port is set 8080?

But the target has no port in settings other than the ftp one, Iā€™m going crazy

Can you show a screenshot so we can see too?

Unfortunately I only see this page with the error.
Yesterday I tried to publish via git and it worked only that today I screwed up and basically deleted the project.
I might try againā€¦

I tried to fix the ports but it doesnā€™t work

Do you have to relaunch the environment for the changes to take effect? Excuse my ignorance with regards to Azure.

I suggest hiring a freelancer on Upwork that knows NodeJS and Azure, sometimes itā€™s better to pay a bit than spend hours figuring on you own

2 Likes

yes I think you are right, I will do so! Thanks for your help