none
[Node.js][Web Apps] Issue during deployment to Azure - fatal error C1902: Program database manager mismatch; RRS feed

  • Question

  • Having an issue while deploying my express application to azure. I've declared version 5.01 in my package.json file, which azure uses to install the package itself. I've tried rolling back versions and deploying the package files directly, but nothing has solved the issue. Also worth noting that since the package does not install, the directory D:\home\site\wwwroot\node_modules\java never actually gets created. There for I can't investigate any of the files in that folder. The error text is below:

    Command: "D:\home\site\deployments\tools\deploy.cmd"

    Handling node.js deployment.

    KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'

    Copying file: 'package.json'

    The package.json file does not specify node.js engine version constraints.

    The node.js application will run with the default node.js version 4.1.2.

    Selected npm version 3.3.6

    java@5.0.1 install D:\home\site\wwwroot\node_modules\java

    node-gyp rebuild

    D:\home\site\wwwroot\node_modules\java>if not defined npm_config_node_gyp (node "c:\Program Files (x86)\npm\3.3.6\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )

    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

    java.cpp

    javaObject.cpp

    javaScope.cpp

    methodCallBaton.cpp

    ..\src\javaScope.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    nodeJavaBridge.cpp

    ..\src\java.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    utils.cpp

    ..\src\javaObject.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    ..\src\methodCallBaton.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    ..\src\nodeJavaBridge.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    ..\src\utils.cpp : fatal error C1902: Program database manager mismatch; please check your installation [D:\home\site\wwwroot\node_modules\java\build\nodejavabridge_bindings.vcxproj]

    gyp ERR! build error

    gyp ERR! stack Error: msbuild failed with exit code: 1

    gyp ERR! stack at ChildProcess.onExit (c:\Program Files (x86)\npm\3.3.6\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)

    gyp ERR! stack at emitTwo (events.js:87:13)

    gyp ERR! stack at ChildProcess.emit (events.js:172:7)

    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

    gyp ERR! System Windows_NT 6.2.9200

    gyp ERR! command "D:\Program Files (x86)\nodejs\4.1.2\node.exe" "c:\Program Files (x86)\npm\3.3.6\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"

    gyp ERR! cwd D:\home\site\wwwroot\node_modules\java

    gyp ERR! node -v v4.1.2

    gyp ERR! node-gyp -v v3.0.3

    gyp ERR! not ok

    npm ERR! Windows_NT 6.2.9200

    npm ERR! argv "D:\Program Files (x86)\nodejs\4.1.2\node.exe" "D:\Program Files (x86)\npm\3.3.6\node_modules\npm\bin\npm-cli.js" "install" "--production"

    npm ERR! node v4.1.2

    npm ERR! npm v3.3.6

    npm ERR! code ELIFECYCLE

    npm ERR! java@5.0.1 install: node-gyp rebuild

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the java@5.0.1 install script 'node-gyp rebuild'.

    npm ERR! This is most likely a problem with the java package,

    npm ERR! not with npm itself.

    npm ERR! Tell the author that this fails on your system:

    npm ERR! node-gyp rebuild

    npm ERR! You can get their info via:

    npm ERR! npm owner ls java

    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:

    npm ERR! D:\home\site\wwwroot\npm-debug.log

    Failed exitCode=1, command="D:\Program Files (x86)\nodejs\4.1.2\node.exe" "D:\Program Files (x86)\npm\3.3.6\node_modules\npm\bin\npm-cli.js" install --production

    An error has occurred during web site deployment.



    Monday, February 8, 2016 3:44 PM

Answers

  • Hi,

    It seems that your Azure node webapp requires some native modules need to be compiled by Python or node-gyp usually at the deploying time, but Azure webapp not support all native modules and might fail at compiling those with very specific prerequisites.

    However, you can try to refer to the section "Native Modules" of the doc Using Node.js Modules with Azure applications.

    There are two workarounds proved successful with almost all native modules available today:

    •  Run npm install on a Windows machine that has all the native module's prerequisites installed. Then, deploy the created node_modules folder as part of the application to Azure Websites.
    • Azure Websites can be configured to execute custom bash or shell scripts during deployment, giving you the opportunity to execute custom commands and precisely configure the way npm install is being run. For a video showing how to do this, see Custom Website Deployment Scripts with Kudu.

    Best Regards.

    Wednesday, February 10, 2016 6:33 AM
    Moderator

All replies

  • Hi Dipin,

    Thanks for this. I'm not however using Visual Studio to deploy or manage this codebase. The closest I use is the Mac's Visual Studio Code text editor.

    The issue only occurs after pushing the codebase to git, which then automatically deploys it to Azure, where Azure has trouble building the project.  

    I can attempt to send you a copy of the deployment logs from kudu via email if neccessary

    Thanks

    Tuesday, February 9, 2016 3:30 PM
  • Hi,

    It seems that your Azure node webapp requires some native modules need to be compiled by Python or node-gyp usually at the deploying time, but Azure webapp not support all native modules and might fail at compiling those with very specific prerequisites.

    However, you can try to refer to the section "Native Modules" of the doc Using Node.js Modules with Azure applications.

    There are two workarounds proved successful with almost all native modules available today:

    •  Run npm install on a Windows machine that has all the native module's prerequisites installed. Then, deploy the created node_modules folder as part of the application to Azure Websites.
    • Azure Websites can be configured to execute custom bash or shell scripts during deployment, giving you the opportunity to execute custom commands and precisely configure the way npm install is being run. For a video showing how to do this, see Custom Website Deployment Scripts with Kudu.

    Best Regards.

    Wednesday, February 10, 2016 6:33 AM
    Moderator
  • Thanks Peter. This mostly worked for me quite well. I was able to rebuild the project using a windows machine and successfully tested this locally. I also successfully deployed this to azure with the deployment completing successfully. I was able to confirm that I was no longer getting my initial error via the deployment logs.

    However, I am now having trouble loading the page via the browser. Instead I just get a  blank white screen. I traced the logs using "azure site logs tail webappname" while requesting the page via the browser and was able to see that the below errors appear when tying to load the page:

    Tue Feb 16 2016 21:25:25 GMT+0000 (Coordinated Universal Time): Unaught exception: Error: The specified module could not be found.

    D:\home\site\wwwroot\node_modules\java\build\Release\nodejavabridge_bindings.node

        at Error (native)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\lib\nodeJavaBridge.js:10:16)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\index.js:2:18)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

    Application has thrown an uncaught exception and is terminated:

    Error: The specified module could not be found.

    D:\home\site\wwwroot\node_modules\java\build\Release\nodejavabridge_bindings.node

        at Error (native)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\lib\nodeJavaBridge.js:10:16)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\index.js:2:18)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

    Tue Feb 16 2016 21:25:41 GMT+0000 (Coordinated Universal Time): Unaught exception: Error: The specified module could not be found.

    D:\home\site\wwwroot\node_modules\java\build\Release\nodejavabridge_bindings.node

        at Error (native)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\lib\nodeJavaBridge.js:10:16)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\index.js:2:18)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

    Application has thrown an uncaught exception and is terminated:

    Error: The specified module could not be found.

    D:\home\site\wwwroot\node_modules\java\build\Release\nodejavabridge_bindings.node

        at Error (native)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\lib\nodeJavaBridge.js:10:16)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

        at Function.Module._load (module.js:310:12)

        at Module.require (module.js:365:17)

        at require (module.js:384:17)

        at Object.<anonymous> (D:\home\site\wwwroot\node_modules\java\index.js:2:18)

        at Module._compile (module.js:434:26)

        at Object.Module._extensions..js (module.js:452:10)

        at Module.load (module.js:355:32)

     

    Please also note that I checked using kudu to see that the module folder was indeed successfully deployed to the server. Can you please advise?

    Kind Regards,

    Craig

    Tuesday, February 16, 2016 11:30 PM
  • Hi,

     It seems to be missing for some dependent node modules. I need more time for researching the node modules `java`.

    There might be some time delay. Appreciate your patience.

    Friday, February 19, 2016 10:31 AM
    Moderator