[英]Parse server error “Protocol not supported”
I've been migrating datas for two days now, everything is ok in AWS - I used a Bitnami MEAN machine, it was only a very small app. 我已经迁移了两天的数据,在AWS中一切正常-我使用的是Bitnami MEAN机器,那只是一个很小的应用程序。 FYI, I'm moving from Heroku + Parse, set up also nginx on AWS to run more than one nodejs app. 仅供参考,我从Heroku + Parse迁移,还在AWS上设置了nginx以运行多个nodejs应用程序。 I had to downgrade the default mongodb installation due to incompatibility with Parse (WHY?) 由于与Parse不兼容,我不得不降级默认的mongodb安装(为什么?)
So, straight to the problem: installed node.js parse server, configured like they show on git 因此,直接解决问题:安装了node.js解析服务器,其配置如它们在git上所示
var api = new ParseServer({
databaseURI: 'mongodb://127.0.0.1:27017/database',
cloud: './cloud/main.js',
appId: 'my-app-id',
masterKey: 'my-master-key'
});
but when I try to execute any query I got 但是当我尝试执行任何查询时
Error: Protocol not supported.
at send (/opt/bitnami/apps/bellboy-admin/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:299:15)
at dispatch (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/RESTController.js:137:11)
at Object.ajax (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/RESTController.js:139:5)
at ParsePromise.<anonymous> (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/RESTController.js:208:29)
at ParsePromise.wrappedResolvedCallback (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/ParsePromise.js:135:41)
at /opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/ParsePromise.js:196:35
at runLater (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/ParsePromise.js:180:12)
at ParsePromise.then (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/ParsePromise.js:195:9)
at Object.request (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/RESTController.js:201:8)
at Object.find (/opt/bitnami/apps/bellboy-admin/node_modules/parse-server/node_modules/parse/lib/node/ParseQuery.js:1141:27)
I tried almost everything, any ideas from you? 我几乎尝试了所有事情,您有什么想法吗?
Did you install the dependencies for ParseServer? 您是否安装了ParseServer的依赖项? More specifically, is the MondoDB NodeJS drive installed? 更具体地说,是否安装了MondoDB NodeJS驱动器?
npm install mongodb
If it helps, I have a tutorial that explains how the ParseServer should be setup, providing you have MongoDB and NodeJS already installed to the correct versions. 如果有帮助, 我将提供一个教程 ,解释如何设置ParseServer,前提是您已经安装了正确版本的MongoDB和NodeJS。
Solved 解决了
I guessed it was something involving the http/https protocols between my node app and parse server so I just added the http:// before the address of Parse.serverURL 我猜想这是我的节点应用程序与解析服务器之间涉及http / https协议的事情,因此我只是在Parse.serverURL地址之前添加了http://。
Parse.initialize('my-id','unused');
Parse.serverURL = 'http://localhost:3030/parse';
Maybe it goes by default on https when not specified. 如果未指定,默认情况下它会在https上显示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.