fractal-code / meteor-azure

Automate Meteor deployments on Azure App Service
MIT License
67 stars 20 forks source link

Failed to complete server initialisation #43

Closed aditzend closed 7 years ago

aditzend commented 7 years ago

I am not able to upload my app and I don't know where to start fixing the issue!

This is a heavily customized version of reaction commerce.

-MacOs 10.12.5


| => meteor-azure --settings ./settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code FFY2LMXT3 to authenticate.
info:    Updating Azure application settings
info:    Compiling application bundle
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
warn:    Using default web config
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
error:   Failed to complete server initialisation
________________________________________________________________________________
| ~/ecommerce/r6 @ Macs-MacBook-Pro-94 (user) 
| => meteor-azure --settings ./settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code FF48M8V5D to authenticate.
info:    Updating Azure application settings
info:    Compiling application bundle
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
warn:    Using default web config
info:    Deploying bundle tarball
error:   Request failed with status code 502
________________________________________________________________________________
| ~/ecommerce/r6 @ Macs-MacBook-Pro-94 (user) 
| => meteor-azure --settings ./settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code F9KAXAQEA to authenticate.
info:    Updating Azure application settings
info:    Compiling application bundle
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
warn:    Using default web config
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
error:   Failed to complete server initialisation```
ramijarrar commented 7 years ago

Can you try running in debug mode and paste the output?

aditzend commented 7 years ago

Here it goes!


| => meteor-azure --debug --settings settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code XXX to authenticate.
debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.8.0
debug:   set NPM to v4.3.0
info:    Compiling application bundle
debug:   generate meteor build
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
warn:    Using default web config
debug:   create tarball
info:    Deploying bundle tarball
error:   write EPIPE```
ramijarrar commented 7 years ago

That is the right command, but it looks like the connection dropped out mid-way at error: write EPIPE so please try again and paste the same output.

aditzend commented 7 years ago

This time it seems the problem is on my side, I am deploying the exact same codebase to galaxy with no errors. Weird.


| => meteor-azure --debug --settings settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code XXX to authenticate.
debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.8.0
debug:   set NPM to v4.3.0
info:    Compiling application bundle
debug:   generate meteor build
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
warn:    Using default web config
debug:   create tarball
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
debug:   Retrieving Kudu deployment log...
debug:   Command: bash script.sh
debug:   meteor-azure: Now using NVM v1.1.4
debug:   meteor-azure: Setting Node version
debug:   Version 4.8.0 is already installed.
debug:   meteor-azure: Now using Node v4.8.0 (32-bit)
debug:   meteor-azure: Now using NPM v4.3.0
debug:   meteor-azure: Unpacking bundle
debug:   tar: bundle/programs/server/npm/node_modules/meteor/kadira_flow-router-ssr/node_modules/.temp-o8sh5x/node_modules/.temp-839emg/node_modules/phantomjs: Cannot create symlink to '/Users/user/.meteor/packages/kadira_flow-router-ssr/.3.13.0.5nl0fa++os+web.browser+web.cordova/npm/node_modules/.temp-839emg/node_modules/phantomjs': No such file or directory
debug:   tar: bundle/programs/server/npm/node_modules/meteor/kadira_flow-router-ssr/node_modules/.temp-u3wal3/node_modules/phantomjs: Cannot create symlink to '/Users/user/.meteor/packages/kadira_flow-router-ssr/.3.13.0.5nl0fa++os+web.browser+web.cordova/npm/node_modules/.temp-u3wal3/node_modules/phantomjs': No such file or directory
debug:   tar: Exiting with failure status due to previous errors
debug:   meteor-azure: Could not unpack bundle
debug:   tar: bundle/programs/server/npm/node_modules/meteor/kadira_flow-router-ssr/node_modules/.temp-o8sh5x/node_modules/.temp-839emg/node_modules/phantomjs: Cannot create symlink to '/Users/user/.meteor/packages/kadira_flow-router-ssr/.3.13.0.5nl0fa++os+web.browser+web.cordova/npm/node_modules/.temp-839emg/node_modules/phantomjs': No such file or directory\r\ntar: bundle/programs/server/npm/node_modules/meteor/kadira_flow-router-ssr/node_modules/.temp-u3wal3/node_modules/phantomjs: Cannot create symlink to '/Users/user/.meteor/packages/kadira_flow-router-ssr/.3.13.0.5nl0fa++os+web.browser+web.cordova/npm/node_modules/.temp-u3wal3/node_modules/phantomjs': No such file or directory\r\ntar: Exiting with failure status due to previous errors\r\nmeteor-azure: Could not unpack bundle\r\nD:\Program Files (x86)\SiteExtensions\Kudu\65.60827.2986\bin\Scripts\starter.cmd bash script.sh
error:   Failed to complete server initialisation```
ramijarrar commented 7 years ago

Can you confirm which version you're using? Also, is this a new App Service Plan or has it been used to host other projects in the past?

aditzend commented 7 years ago

I am using meteor-azure -v 2.0.6 and I tested the package with an out of the box Meteor App and it worked great.

ramijarrar commented 7 years ago

So we can be sure this isn't an environment-specific issue, can you try doing a meteor reset then reinstalling your local node_modules and running again?

If that doesn't work the next step will be to try and reproduce this on of our test servers.

jeverduzco commented 7 years ago

I have the same problem

info: Authenticating with interactive login... To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code XXXXXX to authenticate. info: Updating Azure application settings info: Compiling application bundle warn: Using default web config info: Deploying bundle tarball info: Running server initialisation, polling for status... error: Failed to complete server initialisation

Any ideas? The Web App is new with 7GB of RAM

ramijarrar commented 7 years ago

@jvdjeery Can you you try running in debug mode and paste the output?

arshbucks commented 7 years ago

I'm actually getting a similar status (or lack thereof) - sans the "error" message. My deployments (have tried a couple of times) work just fine, for now.

Only issue is I just don't get any further response after info: Running server initialisation, polling for status..., but after ~5 minutes, the new site version seems to be up and running.

Not sure if that helps you figure anything out - let me know if I can help diagnose w/ my setup; I would eventually like to figure it out, in case I get errors when deploying.

ramijarrar commented 7 years ago

@arshs Can you paste the full command output in debug mode?

kissa1001 commented 7 years ago

I have same problem. Sometimes it would say successful and sometimes it would give this error. I'm using v2.0.6. Not sure what can cause this.

meteor-azure –debug --settings ./settings.json
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code BXS5QABEZ to authenticate.
info:    Updating Azure application settings
info:    Compiling application bundle
warn:    Using default web config
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
error:   Failed to complete server initialisation
ramijarrar commented 7 years ago

@jvdjeery @arshs @kissa1001

Without more information, it's difficult to say what's going on here or if it's even related to the original issue. Can anyone paste the command output in debug mode (just use --debug) so I can look into this further?

arshbucks commented 7 years ago

Hey, sorry for the delay, was backlogged. Just ran another deployment and got the following.

Note that for me, it succeeds, but in the following manner: the log ends at "polling for status" and doesn't seem to actually get the status periodically (it used to the first few times I used this tool. Don't think I made any changes in my process though.).

After beginning server initialization, and for the next 5-10 minutes, the OLD deployment is still up and running, which is good.

Then, after about 10-20 minutes, if I browse to the website, (while it is "running server initialization/polling for status") I'll get a 502 IIS error. Hit Refresh...wait a minute or two...and the log dumps out the remaining debug statements you see below...and the website is working again!

So all in all, it works for me, but would like to understand this better/be able to see the server initialization process as it happens, to diagnose any errors in the future. (maybe all that's missing is some sort of Kudu log flush statement? Perhaps it's all visible on the kudu log once the server starts initializing?)

>meteor-azure --settings ../settingsProd.json --web-config ../httpsMulticoreWeb.config --debug
info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code ********* to authenticate.
debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.8.4
debug:   set NPM to v4.6.1
info:    Compiling application bundle
debug:   generate meteor build

WARNING: The output directory is under your source tree.
         Your generated files may get interpreted as source code!
         Consider building into a different directory instead
         meteor build ../output

debug:   add custom web config
debug:   create tarball
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...

debug:   Retrieving Kudu deployment log...
debug:   Command: bash script.sh
debug:   meteor-azure: Now using NVM v1.1.4
debug:   meteor-azure: Setting Node version
debug:   Version 4.8.4 is already installed.
debug:   meteor-azure: Now using Node v4.8.4 (32-bit)
debug:   meteor-azure: Now using NPM v4.6.1
debug:   meteor-azure: Unpacking bundle
debug:   meteor-azure: Setting Node runtime
debug:   meteor-azure: Installing NPM dependencies
debug:   /tmp/8d512cd202b798a/bundle/programs/server /tmp/8d512cd202b798a
debug:
debug:   > fibers@1.0.15 install D:\local\Temp\8d512cd202b798a\bundle\programs\server\node_modules\fibers
debug:   > node build.js || nodejs build.js
debug:
debug:   `win32-ia32-46` exists; testing
debug:   Binary is fine; exiting
debug:
debug:   > meteor-dev-bundle@0.0.0 install D:\local\Temp\8d512cd202b798a\bundle\programs\server
debug:   > node npm-rebuild.js
debug:
debug:   meteor-dev-bundle@0.0.0 D:\local\Temp\8d512cd202b798a\bundle\programs\server
debug:   npm WARN meteor-dev-bundle@0.0.0 No description
debug:   +-- amdefine@1.0.1
debug:   npm WARN meteor-dev-bundle@0.0.0 No repository field.
debug:   npm WARN meteor-dev-bundle@0.0.0 No license field.
debug:   +-- asap@2.0.6
debug:   +-- fibers@1.0.15
debug:   +-- meteor-promise@0.8.5
debug:   +-- promise@8.0.1
debug:   | `-- asap@2.0.6  deduped
debug:   +-- semver@5.3.0
debug:   +-- source-map@0.1.32
debug:   | `-- amdefine@1.0.1  deduped
debug:   +-- source-map-support@0.3.2
debug:   | `-- source-map@0.1.32  deduped
debug:   `-- underscore@1.5.2
debug:
debug:   /tmp/8d512cd202b798a
debug:   meteor-azure: Rebuilding NPM dependencies
debug:   /tmp/8d512cd202b798a/bundle/programs/server/npm /tmp/8d512cd202b798a
debug:
debug:   > bcrypt@1.0.2 install D:\local\Temp\8d512cd202b798a\bundle\programs\server\npm\node_modules\bcrypt
debug:   > node-pre-gyp install --fallback-to-build
debug:
debug:   [bcrypt] Success: "D:\local\Temp\8d512cd202b798a\bundle\programs\server\npm\node_modules\bcrypt\lib\binding\bcrypt_lib.node" is installed via remote
debug:   abbrev@1.1.0 D:\local\Temp\8d512cd202b798a\bundle\programs\server\npm\node_modules\abbrev
debug:   ajv@4.11.8 D:\local\Temp\8d512cd202b798a\bundle\programs\server\npm\node_modules\ajv

.... a bunch of packages that it bundled into the app....

debug:   /tmp/8d512cd202b798a
debug:   meteor-azure: Syncing bundle
debug:   meteor-azure: Finished successfully
info:    Finished successfully
arshbucks commented 7 years ago

on a different project (this one is currently on Meteor 1.4, earlier project that worked was on Meteor 1.5.1), I am getting an error:

info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code *********** to authenticate.
debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.6.2
debug:   set NPM to v3.10.9
info:    Compiling application bundle
debug:   generate meteor build

WARNING: The output directory is under your source tree.
         Your generated files may get interpreted as source code!
         Consider building into a different directory instead
         meteor build ../output

debug:   add custom web config
debug:   create tarball
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
debug:   Retrieving Kudu deployment log...
debug:   Command: bash .config/azure/deploy.sh
debug:   meteor-azure: Setting Node version
debug:   Version 4.6.2 is already installed.
debug:   meteor-azure: Now using Node v4.6.2 (32-bit)
debug:   meteor-azure: Setting NPM version
debug:   meteor-azure: Now using NPM v3.10.9
debug:   meteor-azure: Installing NPM dependencies
debug:   meteor-azure: Building app
debug:   Thread was being aborted.
debug:   Thread was being aborted.
error:   Failed to complete server initialisation

any ideas on what to try to debug?

arshbucks commented 7 years ago

Updated to 1.5.2.2 with all packages as well -- still getting error.

It seems like the NPM versions are mismatched in this output below (my project uses node 4.8.4 / npm 4.6.1) -- could NPM versioning be the issue?


info:    Authenticating with interactive login...
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code ********** to authenticate.
debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.8.4
debug:   set NPM to v4.6.1
info:    Compiling application bundle
debug:   generate meteor build

WARNING: The output directory is under your source tree.
         Your generated files may get interpreted as source code!
         Consider building into a different directory instead
         meteor build ../output

debug:   add custom web config
debug:   create tarball
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
debug:   Retrieving Kudu deployment log...
debug:   Command: bash .config/azure/deploy.sh
debug:   meteor-azure: Setting Node version
debug:   Version 4.6.2 is already installed.
debug:   meteor-azure: Now using Node v4.6.2 (32-bit)
debug:   meteor-azure: Setting NPM version
debug:   meteor-azure: Now using NPM v3.10.9
debug:   meteor-azure: Installing NPM dependencies
debug:   meteor-azure: Building app
debug:   Thread was being aborted.
debug:   Thread was being aborted.
error:   Failed to complete server initialisation
arshbucks commented 7 years ago

Tried again just now (with 0 changes). Worked with below debug log. Not sure if it helps, but seems like NPM versioning was an issue. Note that this deployment was switched from your previous method (with .config folder and .deployment file). I definitely disconnected source control & deleted the "app settings" before deploying earlier...but maybe they hadn't fully "reset" by the time I started deployment (about 10 min after? Just a thought).

In case it helps - here is the log from today's successful deployment. If you see a potential bug, great, if not, could probably close this (note that in this case....it doesn't even have the issue of "disconnecting" from the server status - I get updates after "Running server initialization")

Either way, hopefully the above few comments provides some ideas for others on potential error root causes (i.e. Meteor, Node, and NPM versioning, and clearing app settings/source control connections) Thanks again for your work on this!

debug:   completed Azure authentication
info:    Updating Azure application settings
debug:   set environment variables
debug:   set Meteor settings
debug:   set Kudu deployment settings
debug:   set Node to v4.8.4
debug:   set NPM to v4.6.1
info:    Compiling application bundle
debug:   generate meteor build

WARNING: The output directory is under your source tree.
         Your generated files may get interpreted as source code!
         Consider building into a different directory instead
         meteor build ../output

debug:   add custom web config
debug:   create tarball
info:    Deploying bundle tarball
info:    Running server initialisation, polling for status...
debug:   Retrieving Kudu deployment log...
debug:   Command: bash script.sh
debug:   meteor-azure: Installing NVM
debug:     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
debug:                                    Dload  Upload   Total   Spent    Left  Speed
debug:
debug:     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
debug:   100   607    0   607    0     0    607      0 --:--:-- --:--:-- --:--:--  1618
debug:
debug:     8 1903k    8  168k    0     0   168k      0  0:00:11 --:--:--  0:00:11  168k
debug:   100 1903k  100 1903k    0     0  1903k      0  0:00:01  0:00:01 --:--:-- 4626k
debug:   Archive:  nvm-noinstall.zip
debug:     inflating: nvm/LICENSE
debug:     inflating: nvm/elevate.cmd
debug:     inflating: nvm/elevate.vbs
debug:     inflating: nvm/install.cmd
debug:     inflating: nvm/nvm.exe
debug:   meteor-azure: Now using NVM v1.1.4
debug:   meteor-azure: Setting Node version
debug:   Version 4.8.4 is already installed.
debug:   meteor-azure: Now using Node v4.8.4 (32-bit)
debug:   meteor-azure: Setting NPM version
debug:   D:\home\meteor-azure\nvm\v4.8.4\npm -> D:\home\meteor-azure\nvm\v4.8.4\node_modules\npm\bin\npm-cli.js
debug:   npm@4.6.1 D:\home\meteor-azure\nvm\v4.8.4\node_modules\npm
debug:   meteor-azure: Now using NPM v4.6.1
debug:   meteor-azure: Installing rimraf tool
debug:   D:\home\meteor-azure\nvm\v4.8.4\rimraf -> D:\home\meteor-azure\nvm\v4.8.4\node_modules\rimraf\bin.js
debug:   D:\home\meteor-azure\nvm\v4.8.4
debug:   `-- rimraf@2.6.2
debug:     `-- glob@7.1.2
debug:       +-- fs.realpath@1.0.0
debug:       +-- inflight@1.0.6
debug:       | +-- once@1.4.0  deduped
debug:       | `-- wrappy@1.0.2
debug:       +-- inherits@2.0.3
debug:       +-- minimatch@3.0.4
debug:       | `-- brace-expansion@1.1.8
debug:       |   +-- balanced-match@1.0.0
debug:       |   `-- concat-map@0.0.1
debug:       +-- once@1.4.0
debug:       | `-- wrappy@1.0.2  deduped
debug:       `-- path-is-absolute@1.0.1
debug:
debug:   meteor-azure: Unpacking bundle
debug:   meteor-azure: Setting Node runtime
debug:   meteor-azure: Installing NPM dependencies
debug:   /tmp/8d513efba32a88d/bundle/programs/server /tmp/8d513efba32a88d
debug:
debug:   > fibers@1.0.15 install D:\local\Temp\8d513efba32a88d\bundle\programs\server\node_modules\fibers
debug:   > node build.js || nodejs build.js
debug:
debug:   `win32-ia32-46` exists; testing
debug:   Binary is fine; exiting
debug:
debug:   > meteor-dev-bundle@0.0.0 install D:\local\Temp\8d513efba32a88d\bundle\programs\server
debug:   > node npm-rebuild.js
debug:
debug:   npm WARN meteor-dev-bundle@0.0.0 No description
debug:   meteor-dev-bundle@0.0.0 D:\local\Temp\8d513efba32a88d\bundle\programs\server
debug:   npm WARN meteor-dev-bundle@0.0.0 No repository field.
debug:   +-- amdefine@1.0.1
debug:   npm WARN meteor-dev-bundle@0.0.0 No license field.
debug:   +-- asap@2.0.6
debug:   +-- fibers@1.0.15
debug:   +-- meteor-promise@0.8.5
debug:   +-- promise@8.0.1
debug:   | `-- asap@2.0.6  deduped
debug:   +-- semver@5.3.0
debug:   +-- source-map@0.1.32
debug:   | `-- amdefine@1.0.1  deduped
debug:   +-- source-map-support@0.3.2
debug:   | `-- source-map@0.1.32  deduped
debug:   `-- underscore@1.5.2
debug:
debug:   /tmp/8d513efba32a88d
debug:   meteor-azure: Rebuilding NPM dependencies
debug:   /tmp/8d513efba32a88d/bundle/programs/server/npm /tmp/8d513efba32a88d
debug:   babel-runtime@6.18.0 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\babel-runtime
debug:   core-js@2.4.1 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\core-js
debug:   regenerator-runtime@0.9.6 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\regenerator-runtime
debug:   bluebird@2.11.0 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\bluebird
debug:   lodash.isplainobject@4.0.6 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\lodash.isplainobject
debug:   object-assign@4.1.1 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\object-assign
debug:   qs@2.4.2 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\qs
debug:   stripe@4.15.0 D:\local\Temp\8d513efba32a88d\bundle\programs\server\npm\node_modules\stripe
debug:   /tmp/8d513efba32a88d
debug:   meteor-azure: Syncing bundle
debug:   meteor-azure: Finished successfully
info:    Finished successfully
ramijarrar commented 7 years ago

@arshs

After beginning server initialization, and for the next 5-10 minutes, the OLD deployment is still up and running, which is good. Then, after about 10-20 minutes, if I browse to the website, (while it is "running server initialization/polling for status") I'll get a 502 IIS error. Hit Refresh...wait a minute or two...and the log dumps out the remaining debug statements you see below...and the website is working again!

This is the expected behavior for a regular deployment. When server initialization begins, work is being done in a temporary directory which doesn't affect the current version of the app. Once this is ready, the server has to go down for a few minutes to load in files from the new bundle (hence a 502 error). You can take a closer look at the full initialization script here if you're interested. Also, if you want zero-downtime during updates you'll need to configure a deployment slot in the Azure portal.

debug: Thread was being aborted. debug: Thread was being aborted. error: Failed to complete server initialisation

This is commonly caused by making a change in the Azure portal (such as editing an application setting) during a deployment. But feel free to open another issue if you think you're seeing this for any other reason.

ramijarrar commented 7 years ago

I'm going to close this for now as there doesn't really seem to be a common/identifiable issue. Please feel free to open a new thread for any further questions/comments or a specific problem you feel hasn't been resolved.

dimadev01 commented 6 years ago

Hi! Sorry for opening this thread again, but I'm getting this error. Below is the output

meteor-azure --settings settings-development.json -w web.config -d debug: check Meteor is installed debug: check for incompatible 'force-ssl' package debug: check current Meteor release >= 1.4 info: Validating settings file debug: check valid json exists debug: check data follows schema debug: dr-contact-lens-dev: configure kudu api info: Validating Kudu connection info: dr-contact-lens-dev: Authenticating with interactive login... To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code FMMHG6ZA3 to authenticate. debug: dr-contact-lens-dev: completed Azure authentication info: dr-contact-lens-dev: Updating Azure application settings debug: dr-contact-lens-dev: retrieve existing values debug: dr-contact-lens-dev: set environment variables debug: dr-contact-lens-dev: set Meteor settings debug: dr-contact-lens-dev: set Kudu deployment settings debug: dr-contact-lens-dev: set Node to v8.8.1 debug: dr-contact-lens-dev: set NPM to v5.4.2 debug: dr-contact-lens-dev: serialise values debug: dr-contact-lens-dev: push new settings info: Compiling application bundle debug: generate meteor build debug: add custom web config debug: checking for broken symlinks debug: create tarball info: dr-contact-lens-dev: Deploying bundle tarball info: dr-contact-lens-dev: Running server initialisation info: dr-contact-lens-dev: Polling server status... load: 2.10 cmd: node 20372 waiting 16.77u 2.64s debug: dr-contact-lens-dev: Retrieving Kudu deployment log... debug: Command: bash script.sh debug: meteor-azure: Now using NVM v1.1.4 debug: meteor-azure: Setting Node version debug: Version 8.8.1 is already installed. debug: meteor-azure: Now using Node v8.8.1 (32-bit) debug: meteor-azure: Now using NPM v5.4.2 debug: meteor-azure: Unpacking bundle debug: meteor-azure: Setting Node runtime debug: meteor-azure: Enabling IISNode logging debug: meteor-azure: Installing NPM dependencies debug: /tmp/8d55ac83e1946d6/bundle/programs/server /tmp/8d55ac83e1946d6 debug:
debug: > fibers@2.0.0 install D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\node_modules\fibers debug: > node build.js || nodejs build.js debug:
debug: win32-ia32-57 exists; testing debug: Binary is fine; exiting debug:
debug: > meteor-dev-bundle@0.0.0 install D:\local\Temp\8d55ac83e1946d6\bundle\programs\server debug: > node npm-rebuild.js debug:
debug: npm WARN saveError EPERM: operation not permitted, rename 'D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm-shrinkwrap.json.4002820371' -> 'D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm-shrinkwrap.json' debug: added 124 packages in 14.932s debug: npm WARN meteor-dev-bundle@0.0.0 No description debug: npm WARN meteor-dev-bundle@0.0.0 No repository field. debug: npm WARN meteor-dev-bundle@0.0.0 No license field. debug:
debug: /tmp/8d55ac83e1946d6 debug: meteor-azure: Rebuilding NPM dependencies debug: /tmp/8d55ac83e1946d6/bundle/programs/server/npm /tmp/8d55ac83e1946d6 debug:
debug: > bcrypt@0.8.7 install D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt debug: > node-gyp rebuild debug:
debug:
debug: D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt>if not defined npm_config_node_gyp (node "D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) debug: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. debug: D:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(400,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj] debug: blowfish.cc debug: bcrypt.cc debug: bcrypt_node.cc debug: win_delay_load_hook.cc debug: ..\src\blowfish.cc : fatal error C1902: Program database manager mismatch; please check your installation [D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj] debug: ..\src\bcrypt.cc : fatal error C1902: Program database manager mismatch; please check your installation [D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj] debug: ..\src\bcrypt_node.cc : fatal error C1902: Program database manager mismatch; please check your installation [D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj] debug: D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.cc : fatal error C1902: Program database manager mismatch; please check your installation [D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\build\bcrypt_lib.vcxproj] debug: gyp ERR! build error debug: gyp ERR! stack Error: msbuild failed with exit code: 1 debug: gyp ERR! stack at ChildProcess.onExit (D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) debug: gyp ERR! stack at emitTwo (events.js:125:13) debug: gyp ERR! stack at ChildProcess.emit (events.js:213:7) debug: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) debug: gyp ERR! System Windows_NT 10.0.14393 debug: gyp ERR! command "D:\home\meteor-azure\nvm\v8.8.1\node.exe" "D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" debug: gyp ERR! cwd D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt debug: gyp ERR! node -v v8.8.1 debug: gyp ERR! node-gyp -v v3.6.2 debug: gyp ERR! not ok debug: npm ERR! code ELIFECYCLE debug: npm ERR! errno 1 debug: npm ERR! bcrypt@0.8.7 install: node-gyp rebuild debug: npm ERR! Exit status 1 debug: npm ERR! debug: npm ERR! Failed at the bcrypt@0.8.7 install script. debug: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. debug:
debug: npm ERR! A complete log of this run can be found in: debug: npm ERR! D:\local\AppData\npm-cache_logs\2018-01-13T21_01_11_892Z-debug.log debug: meteor-azure: Could not rebuild NPM dependencies debug: npm WARN saveError EPERM: operation not permitted, rename 'D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm-shrinkwrap.json.4002820371' -> 'D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm-shrinkwrap.json'\r\nnpm WARN meteor-dev-bundle@0.0.0 No description\r\nnpm WARN meteor-dev-bundle@0.0.0 No repository field.\r\nnpm WARN meteor-dev-bundle@0.0.0 No license field.\r\n\r\ngyp ERR! build error \r\ngyp ERR! stack Error: msbuild failed with exit code: 1\r\ngyp ERR! stack at ChildProcess.onExit (D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)\r\ngyp ERR! stack at emitTwo (events.js:125:13)\r\ngyp ERR! stack at ChildProcess.emit (events.js:213:7)\r\ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)\r\ngyp ERR! System Windows_NT 10.0.14393\r\ngyp ERR! command "D:\home\meteor-azure\nvm\v8.8.1\node.exe" "D:\home\meteor-azure\nvm\v8.8.1\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"\r\ngyp ERR! cwd D:\local\Temp\8d55ac83e1946d6\bundle\programs\server\npm\node_modules\bcrypt\r\ngyp ERR! node -v v8.8.1\r\ngyp ERR! node-gyp -v v3.6.2\r\ngyp ERR! not ok \r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! bcrypt@0.8.7 install: node-gyp rebuild\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the bcrypt@0.8.7 install script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! D:\local\AppData\npm-cache_logs\2018-01-13T21_01_11_892Z-debug.log\r\nmeteor-azure: Could not rebuild NPM dependencies\r\nD:\Program Files (x86)\SiteExtensions\Kudu\70.10102.3204\bin\Scripts\starter.cmd bash script.sh error: dr-contact-lens-dev: Failed to complete server initialisation

Could you help me?

Thanks!

ramijarrar commented 6 years ago

@dimadev01 Your error does not relate to this thread. I've opened a new issue for you here.