Cloud code 141 error in Parse server

Keywords: Parse - AWS - Technical issue - Other
bnsupport ID: 96e845bd-9b19-bce6-3ab0-642696bd793f
Description:
I added cloud code to my parse server using this guide
https://docs.bitnami.com/bch/apps/parse/configuration/add-custom-cloud-code/

But after cloud folder location in config.json, and starting parse server, I get “HTTP 503 Service Unavailable” error

But as soon as I remove this “cloud”: “/opt/bitnami/cloud/main.js”, server starts to work.

But my cloud code still gives error(141 error code).

Please help me to solve it.

Hi @maxakash5,

Thanks for using Bitnami. According to the bnsupport bundle, there are some services that aren’t running in your server. Do you know why? Did you modify any configuration?

-----------------------------------
Get the ctlscript status
-----------------------------------
Running: ./ctlscript.sh status
In: /opt/bitnami

Output:

mongodb not running
apache not running
parse-dashboard already running
parse already running

Can you try to start them manually?

sudo /opt/bitnami/ctlscript.sh start

Unfortunately, the bnsupport bundle didn’t get the Apache log. Can you run the next commands and share the output with us?

apachectl -t

sudo tail -n 5 /opt/bitnami/apache/logs/error_log

mongodb and apache are now running.

I have attached the output of commands you asked me to run

the main issue is as soon as I add "cloud": "/opt/bitnami/cloud/main.js", in the config.json , and restart my parse server, I get HTTP 503 Service Unavailable error

Hi @maxakash5,

Thanks for the info. I don’t see any error in the Parse log file, but can you check it on your end? Did you modify the cloud main.js script? Does it have the right permissions? Please run the next commands and share the output

sudo ls -lart /opt/bitnami/parse
sudo ls -lart /opt/bitnami/cloud

Here is the output.

Even after creating main.js file in /opt/bitnami/cloud and then adding "cloud": "/opt/bitnami/cloud/main.js", gives me 503 service unavailable error.

Screenshot 2021-05-08 at 7.00.21 PM

Can you tell me what is the default location to add cloud code so that I don’t have to edit config.json file?

here is my parse-dashboard log

Error handling request: ParseError: Invalid function: "updateDownloads"
at handleCloudFunction (/opt/bitnami/parse/node_modules/parse-server/lib/Routers/FunctionsRouter.js:134:13)
at /opt/bitnami/parse/node_modules/parse-server/lib/PromiseRouter.js:175:7
at Layer.handle [as handle_request] (/opt/bitnami/parse/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/bitnami/parse/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/opt/bitnami/parse/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/bitnami/parse/node_modules/express/lib/router/layer.js:95:5)
at /opt/bitnami/parse/node_modules/express/lib/router/index.js:281:22
at param (/opt/bitnami/parse/node_modules/express/lib/router/index.js:354:14)
at param (/opt/bitnami/parse/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/opt/bitnami/parse/node_modules/express/lib/router/index.js:410:3) {

code: 141
}

Hi @maxakash5,

Can you tell me the output of this command:

sudo ls -lart /opt/bitnami/parse

Regards,
michiel

I found the solution. There was something wrong with my code.
Thanks for your help.

Hi @maxakash5,

Thanks for the info. I’m glad you fixed your issue! We will close this thread as solved. Please do not hesitate to open a new one with any other questions you may have.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.