Hi,
In my CentOS 8 Linux system (romlp900a). I have installed Docker, Docker Swarm, Portainer and traefik in the system. Confirmed Portainer is working fine.
Followed the recommendation instructions from https://docs.lamp.digital/9550a87b186f4f3db60e1858f4c2f346 to deploy traefik.yml
and lamp.yml
I do not have SSL certificate installed on the system. We do not have separate DNS for database or API Server now. I just wanted to test locally before I request for separate DNS for database and API Server and SSL certificate installed.
For security purpose I am using xxx - for database, XXXXXX - for PUSH API key here.
Here is my lamp.yml
version: â3.7â
services:
server:
image: bidmcdigitalpsychiatry/lamp-server:latest
environment:
HTTPS: âoffâ
ROOT_KEY: âfd804de0e9fb5bec33e888ad27c0ede41d39ff8e520c8a38fd8515618064ce24â
CDB: âhttp://admin:xxx@database:5984/â
PUSH_API_GATEWAY: âhttps://app-gateway.lamp.digital/â
PUSH_API_KEY: âXXXXXXâ
networks:
- public
deploy:
mode: replicated
labels:
traefik.enable: âtrueâ
traefik.http.routers.lamp_server.entryPoints: âwebsecureâ
traefik.http.routers.lamp_server.rule: âHost(romlp900a
)â
traefik.http.routers.lamp_server.tls.certresolver: âdefaultâ
traefik.http.services.lamp_server.loadbalancer.server.port: 3000
placement:
constraints:
- node.role == manager
database:
image: apache/couchdb:latest
volumes:
- /data/couchdb:/opt/couchdb/data
networks:
- public
environment:
COUCHDB_USER: âadminâ
COUCHDB_PASSWORD: âxxxâ
deploy:
mode: replicated
labels:
traefik.enable: âtrueâ
traefik.http.routers.lamp_database.entryPoints: âwebsecureâ
traefik.http.routers.lamp_database.rule: âHost(romlp900a
)â
traefik.http.routers.lamp_database.tls.certresolver: âdefaultâ
traefik.http.services.lamp_database.loadbalancer.server.port: 5984
placement:
constraints:
- node.role == manager
networks:
public:
external: true
Once I deployed the lamp stack using portainer. I do not see any error or no log information in lamp_database service logs.
In the lamp_server service logs - i am getting
Initializing LAMP API serverâŚ
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(Use node --trace-warnings ...
to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 2)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 3)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 4)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 5)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 6)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 7)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 8)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 9)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 10)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 11)
(node:1) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
Our unix administrator has created following folders in the server
/data/couchdb
/opt/couchdb/data
Our unix administrator has enabled following ports in the server
6379, 4369, 5984, 9100, 8081, 3000
Do I need to enable any other ports?
I am also trying to test CouchDB (based on instructions - https://docs.lamp.digital/09c491e86ad8418c8a0cea9230b7f2e8), when I run
$curl -k https://admin:xxx@romlp900a/ â giving me Bad Gateway error. or 404 page not found error
while testing API Server
$curl -k https:/romlp900a/ â giving me Bad Gateway error. or 404 page not found error
I am testing above commands from the romlp900a CentOS Linux Box.
I do not have any other services/containers except portainer, traefik and lamp_server, lamp_database.
Please let me know what I am doing wrong here. Thanks for your help!