From ed1d75e2e508a579c7de66f5968bd479ec92e487 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Thu, 7 Jul 2022 15:57:19 -0400 Subject: [PATCH 1/2] updating composes --- compose/docker-compose.reference.yml | 1 + compose/docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/compose/docker-compose.reference.yml b/compose/docker-compose.reference.yml index eaec4c5d..b9ffd2b1 100644 --- a/compose/docker-compose.reference.yml +++ b/compose/docker-compose.reference.yml @@ -37,6 +37,7 @@ services: DATABASE: "sqlite" # Database to use - sqlite, postgres, or rqlite NODE_ID: "netmaker-server-1" # used for HA - identifies this server vs other servers MQ_HOST: "mq" # the address of the mq server. If running from docker compose it will be "mq". Otherwise, need to input address. If using "host networking", it will find and detect the IP of the mq container. + MQ_SERVER_PORT: "1883" # the reachable port of MQ by the server - change if internal MQ port changes (or use external port if MQ is not on the same machine) MQ_PORT: "443" # the reachable port of MQ - change if external MQ port changes (port on proxy, not necessarily the one exposed in docker-compose) HOST_NETWORK: "off" # whether or not host networking is turned on. Only turn on if configured for host networking (see docker-compose.hostnetwork.yml). Will set host-level settings like iptables. VERBOSITY: "1" # logging verbosity level - 1, 2, or 3 diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index c57cd20d..104caa3c 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -34,6 +34,7 @@ services: NODE_ID: "netmaker-server-1" MQ_HOST: "mq" MQ_PORT: "443" + MQ_SERVER_PORT: "1883" HOST_NETWORK: "off" VERBOSITY: "1" MANAGE_IPTABLES: "on" From 25003310243e115502ad52d97ee7c76201d8f5ad Mon Sep 17 00:00:00 2001 From: afeiszli Date: Thu, 7 Jul 2022 16:16:56 -0400 Subject: [PATCH 2/2] mod log --- netclient/functions/mqpublish.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netclient/functions/mqpublish.go b/netclient/functions/mqpublish.go index d5933f9d..9b49de2b 100644 --- a/netclient/functions/mqpublish.go +++ b/netclient/functions/mqpublish.go @@ -136,7 +136,7 @@ func publish(nodeCfg *config.ClientConfig, dest string, msg []byte, qos byte) er } if token := client.Publish(dest, qos, false, encrypted); !token.WaitTimeout(30*time.Second) || token.Error() != nil { - logger.Log(0, "could not connect to broker at "+nodeCfg.Server.Server+":8883") + logger.Log(0, "could not connect to broker at "+nodeCfg.Server.Server+":"+nodeCfg.Server.MQPort) var err error if token.Error() == nil { err = errors.New("connection timeout")