Category: Question and Answers


This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Appsmith does not connect to external MongoDB, exited with code 132


I am trying to run Appsmith on a Pi4 with a custom MongoDB 5 instance but it fails to connect. The appsmithctl check-replica-set command tries to connect to instead of the MongoDB container, and there seems to be a timing issue. Setting the APPSMITH_MONGODB_URI directly in the docker-compose.yml file doesn't work, and depends_on doesn't help. Adding a healthcheck to the MongoDB container didn't solve the issue either.


The issue was with running Appsmith on a Pi4 and not being able to connect to an external MongoDB 5. The problem was caused by a core dumping mongo5 binary in the appsmithctl check-replica-set and the timing of the command.

One solution was to patch the official appsmith-ce image by modifying the script. However, the issue was actually caused by the fact that the appsmithctl commands don't pick values from the environment directly.

To solve the problem, the APPSMITH_MONGODB_URI should be set in stacks/configuration/docker.env instead of directly in the docker-compose.yml file. Additionally, a healthcheck should be added to the MongoDB container.

The final solution involved setting the MongoDB URI in docker.env, adding a healthcheck to the MongoDB container, and fixing the timing issue by starting MongoDB separately before starting Appsmith.