在Azure

时间:2017-12-13 12:14:24

标签: reactjs azure meteor passenger

我刚刚在本教程https://www.phusionpassenger.com/library/walkthroughs/deploy/meteor/aws/apache/oss/xenial/deploy_app.html

之后在Azure Ubuntu服务器上部署了我的应用程序

Localhost:node v6.9.4,Meteor 1.6.0.1 服务器:v6.12.2,Meteor 1.6.0.1

我已将绝对相同的文件推送到heroku并且它可以工作。我按照相同的步骤将一个不同的项目推送到Azure,它也有效。因此,Azure不喜欢这个项目中有一些特别的东西:(

在我的本地服务器上一切正常,但在服务器上它不起作用。在Apache /var/log/apache2/error.log中,我收到以下错误: 它可能是什么?

[ E 2017-12-13 11:48:02.9289 10769/Tb age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 3-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 0305fa70. Please see earlier logs for details about the error.
[ E 2017-12-13 11:48:02.9289 10769/Td age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 0305fa70. Please see earlier logs for details about the error.
App 27630 stdout: 
App 27630 stderr: Note: you are using a pure-JavaScript implementation of bcrypt.
App 27630 stderr: While this implementation will work correctly, it is known to be
App 27630 stderr: approximately three times slower than the native implementation.
App 27630 stderr: In order to use the native implementation instead, run
App 27630 stderr: 
App 27630 stderr:   meteor npm install --save bcrypt
App 27630 stderr: 
App 27630 stderr: in the root directory of your application.
App 27630 stdout: Shops collection was empty, adding shops from scratch...
App 27630 stderr: /var/www/onecherry/bundle/programs/server/node_modules/fibers/future.js:280
App 27630 stderr:                       throw(ex);
App 27630 stderr:                       ^
App 27630 stderr: 
App 27630 stderr: TypeError: Object.getOwnPropertyDescriptors is not a function
App 27630 stderr:     at insert (packages/mongo/collection.js:435:12)
App 27630 stderr:     at shops.js (imports/api/shops.js:10:11)
App 27630 stderr:     at fileEvaluate (packages/modules-runtime.js:343:9)
App 27630 stderr:     at require (packages/modules-runtime.js:238:16)
App 27630 stderr:     at main.js (server/main.js:1:208)
App 27630 stderr:     at fileEvaluate (packages/modules-runtime.js:343:9)
App 27630 stderr:     at require (packages/modules-runtime.js:238:16)
App 27630 stderr:     at /var/www/onecherry/bundle/programs/server/app/app.js:684:1
App 27630 stderr:     at infos.forEach.info (/var/www/onecherry/bundle/programs/server/boot.js:414:13)
App 27630 stderr:     at Array.forEach (native)
[ E 2017-12-13 11:49:15.3011 10769/Tr age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/onecherry/bundle: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger.
  Error ID: cc5e5c15
  Error details saved to: /tmp/passenger-error-DVtWtb.html
  Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
Shops collection was empty, adding shops from scratch...
/var/www/onecherry/bundle/programs/server/node_modules/fibers/future.js:280
                        throw(ex);
                        ^

TypeError: Object.getOwnPropertyDescriptors is not a function
    at insert (packages/mongo/collection.js:435:12)
    at shops.js (imports/api/shops.js:10:11)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at main.js (server/main.js:1:208)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at /var/www/onecherry/bundle/programs/server/app/app.js:684:1
    at infos.forEach.info (/var/www/onecherry/bundle/programs/server/boot.js:414:13)
    at Array.forEach (native)
</pre>

[ E 2017-12-13 11:49:15.3052 10769/T7 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is cc5e5c15. Please see earlier logs for details about the error.
App 27654 stdout: 
App 27654 stderr: Note: you are using a pure-JavaScript implementation of bcrypt.
App 27654 stderr: While this implementation will work correctly, it is known to be
App 27654 stderr: approximately three times slower than the native implementation.
App 27654 stderr: In order to use the native implementation instead, run
App 27654 stderr: 
App 27654 stderr:   meteor npm install --save bcrypt
App 27654 stderr: 
App 27654 stderr: in the root directory of your application.
App 27654 stdout: Shops collection was empty, adding shops from scratch...
App 27654 stderr: /var/www/onecherry/bundle/programs/server/node_modules/fibers/future.js:280
App 27654 stderr:                       throw(ex);
App 27654 stderr:                       ^
App 27654 stderr: 
App 27654 stderr: TypeError: Object.getOwnPropertyDescriptors is not a function
App 27654 stderr:     at insert (packages/mongo/collection.js:435:12)
App 27654 stderr:     at shops.js (imports/api/shops.js:10:11)
App 27654 stderr:     at fileEvaluate (packages/modules-runtime.js:343:9)
App 27654 stderr:     at require (packages/modules-runtime.js:238:16)
App 27654 stderr:     at main.js (server/main.js:1:208)
App 27654 stderr:     at fileEvaluate (packages/modules-runtime.js:343:9)
App 27654 stderr:     at require (packages/modules-runtime.js:238:16)
App 27654 stderr:     at /var/www/onecherry/bundle/programs/server/app/app.js:684:1
App 27654 stderr:     at infos.forEach.info (/var/www/onecherry/bundle/programs/server/boot.js:414:13)
App 27654 stderr:     at Array.forEach (native)
[ E 2017-12-13 11:49:17.4650 10769/Tu age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/onecherry/bundle: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger.
  Error ID: be5123f1
  Error details saved to: /tmp/passenger-error-BBAMEZ.html
  Message from application: An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
Shops collection was empty, adding shops from scratch...
/var/www/onecherry/bundle/programs/server/node_modules/fibers/future.js:280
                        throw(ex);
                        ^

TypeError: Object.getOwnPropertyDescriptors is not a function
    at insert (packages/mongo/collection.js:435:12)
    at shops.js (imports/api/shops.js:10:11)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at main.js (server/main.js:1:208)
    at fileEvaluate (packages/modules-runtime.js:343:9)
    at require (packages/modules-runtime.js:238:16)
    at /var/www/onecherry/bundle/programs/server/app/app.js:684:1
    at infos.forEach.info (/var/www/onecherry/bundle/programs/server/boot.js:414:13)
    at Array.forEach (native)
</pre>

[ E 2017-12-13 11:49:17.4693 10769/T9 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 2-2] Cannot checkout session because a spawning error occurred. The identifier of the error is be5123f1. Please see earlier logs for details about the error.

这是shops.js文件的内容

import {Meteor} from 'meteor/meteor';
import {Mongo} from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';

export const Shops = new Mongo.Collection('shops');

if (Meteor.isServer) {
  if (Shops.find().fetch().length == 0) {
    console.log('Shops collection was empty, adding shops from scratch...');
    Shops.insert({
      organisation: 'Shelter Scotland',
      address: "134 Nicolson St, Edinburgh EH8 9EH",
      openingHours: {
        'Mon': '10.00am - 5.45pm',
        'Tue': '10.00am - 5.45pm',
        'Wed': '10.00am - 5.45pm',
        'Thu': '10.00am - 5.45pm',
        'Fri': '10.00am - 5.45pm',
        'Sat': '10.00am - 5.45pm',
        'Sun': '11.00am - 4.00pm'
      },
      secretCode: 6543652765
    })
  } else {
    console.log('shops collection is not empty');
  }

  Meteor.publish('shopsPublication', function() { 
    return Shops.find({});
  });

}

1 个答案:

答案 0 :(得分:0)

我已经更新了服务器和我的应用程序的所有依赖项。现在一切正常!特别是npm和节点包。