我的流星应用程序有问题。我的应用程序在 localhost 中运行良好,但是当我部署它并尝试使用 Accounts.createUser 创建用户或尝试使用 Meteor.loginWithPassword 登录时,浏览器控制台会打印 502 bad gateway 并且应用程序会中断。我也尝试过从服务器方法调用 Accounts.createUser 并且仍然相同。该应用程序加载数据库正常,我尝试调用其他方法,它们工作正常,我可以在浏览器控制台内的数据库中插入、更新和删除任何内容,唯一不起作用的是创建用户并登录。
我已经尝试了所有想到的东西,更改 MUP 配置文件、协议、更改服务器端口、nginx 配置、服务器防火墙和其他东西,但到目前为止没有任何效果。奇怪的是,我有另一个应用程序,它使用相同的数据库,在同一台服务器上,只是不同的端口,我以相同的方式部署它。
流星版本是 1.8.1
MUP 用于部署。
服务器是 Ubuntu 18.04,nginx 托管在 DigitalOcean 上。
编辑:
状态:
=> Servers
- backdashboard.smartshopping.network: Ubuntu 18.04
=> Docker Status
- backdashboard.smartshopping.network: 18.09.3 Running
=> Meteor Status
- backdashboard.smartshopping.network: running
Created at 2019-06-17T07:49:06.464653605Z
Restarted 2 times
ENV:
- ROOT_URL=http://backdashboard.smartshopping.network
- DISABLE_WEBSOCKETS=true
- MONGO_URL=mongodb://Admin:password@backdashboard.smartshopping.network:27017/myDB?autoReconnect=true&connectTimeout=60000&authSource=admin
- PORT=80
- METEOR_SETTINGS={"public":{}}
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- METEORD_DIR=/opt/meteord
- NODE_VERSION=8.4.0
Published Ports:
- 80/tcp => 4000
App running at http://backdashboard.smartshopping.network:80
- Available in app's docker container: true
- Available on server: true
- Available on local computer: true
mup 日志:
[backdashboard.smartshopping.network]=> Starting meteor app on port:80
[backdashboard.smartshopping.network]node: symbol lookup error: /built_app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE
[backdashboard.smartshopping.network]=> Starting meteor app on port:80
[backdashboard.smartshopping.network]node: symbol lookup error: /built_app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE
[backdashboard.smartshopping.network]=> Starting meteor app on port:80