I want to setup a custom app, Couchbase Server (a nosql database), on my cloudron server (followed this doc: https://docs.cloudron.io/packaging/tutorial/). I used this Dockerfile:
FROM couchbase:community-7.2.0
COPY CloudronManifest.json /CloudronManifest.json
RUN ln -s /app/data /opt/couchbase/var //persistent data
EXPOSE 8091-8096 11210-11211
CMD ["couchbase-server"] //start server
On my local machine building this docker image and running it is fine. I can reach the web UI on localhost:8091.
Installing the built image on my cloudron works until it is stuck in the "Starting" process. The relevant errors are:
- Feb 10 13:43:11box:shell reload spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/restartservice.sh nginx
- Feb 10 13:43:11box:shell reload (stderr): sudo: unable to resolve host 1001629-690: Name or service not known
- Feb 10 13:23:00=> Healtheck error: Error: connect ECONNREFUSED 172.18.16.138:8091
Does anybody has an idea how to debug and solve this problem? Many thanks!
Detailed Description of my approach:
//CloudronManifest.json
{
"id": "de.lfg.couchbaseserver",
"title": "couchbase server",
"author": "Dibbo-Mrinmoy Saha [email protected]",
"description": "database for the buecherteam",
"version": "1.0.0",
"healthCheckPath": "/",
"httpPort": 8091,
"addons": {
"localstorage": {} //enables write access to /app/data
},
"manifestVersion": 2
}
- I have used two versions of the dockerfile above - the difference lies in
CMD ["couchbase-server"]andCMD ["/opt/couchbase/bin/couchbase-server"] - I execute these commands to install the app on cloudron:
sudo docker build -t couchbase-server .sudo docker tag couchbase-server dibbo/couchbase-serversudo docker push dibbo/couchbase-servercloudron install --image dibbo/couchbase-server- For
CMD ["couchbase-server"]the Couchbase server has to be started by myself, but very strangely in this version you have in the logs the following before I have started couchbase myself:
Starting Couchbase Server -- Web UI available at http://:8091
Does this mean that couchbase has been started but then shut down?
- Whereas for
CMD ["/opt/couchbase/bin/couchbase-server"]you don't have the log above, although couchbase server is running when checking with/opt/couchbase/bin/couchbase-server --status - On both versions the ECONNREFUSED error appears and
netstat -tulpnreturns:
| Proto | Recv-Q | Send-Q | Local Address | Foreign Address | State | PID/Program name |
|---|---|---|---|---|---|---|
| tcp | 0 | 0 | 127.0.0.1:21200 | 0.0.0.0:* | LISTEN | 1/beam.smp |
| tcp | 0 | 0 | 0.0.0.0:4369 | 0.0.0.0:* | LISTEN | 20/epmd |
| tcp | 0 | 0 | 127.0.0.11:46071 | 0.0.0.0:* | LISTEN | - |
| tcp6 | 0 | 0 | :::4369 | :::* | LISTEN | 20/epmd |
| udp | 0 | 0 | 127.0.0.11:44475 | 0.0.0.0:* |
Only the epmd service of couchbase is running for some reason.
Thank you for your patience! Hope the extra information makes the problem clearer.