planetmint / planetmint-go

Go implementation of Planetmint
2 stars 0 forks source link

mqtt monitor starts before 1317 is ready which leads to error messages #435

Closed jmastr closed 1 week ago

jmastr commented 3 months ago
Aug 12 07:05:11 ip-10-21-27-161 systemd[1]: Started Planetmint.
Aug 12 07:05:23 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:23 [app] [Monitor] elements: 1
Aug 12 07:05:23 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:23 [app] [Monitor] create new client
Aug 12 07:05:23 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:23 [app] [Monitor] Starting clean-up process
Aug 12 07:05:26 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:26 [app] [Monitor] established connection
Aug 12 07:05:26 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:26 [app] [Monitor] subscribed to tele/# channels
Aug 12 07:05:40 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:05:40 [app] [Monitor] cannot connect to server: Get "http://localhost:1317/planetmint/machine/address/plmnt1jpgdg9mzh9f6cuku47ugqrgr3tnmc09u9zlwz3": dial tcp 127.0.0.1:1317: connect: connection refused
Aug 12 07:06:07 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:06:07 [app] [Monitor] cannot connect to server: Get "http://localhost:1317/planetmint/machine/address/plmnt1z3f38elc3ycm54037csr2yfznv5pm5tlx6rw2z": dial tcp 127.0.0.1:1317: connect: connection refused
Aug 12 07:06:13 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:06:13 [app] [Monitor] cannot connect to server: Get "http://localhost:1317/planetmint/machine/address/plmnt1zgr97js94lw74am5m3frjhy8kp66khwv9q8wtf": dial tcp 127.0.0.1:1317: connect: connection refused
Aug 12 07:06:17 ip-10-21-27-161 planetmint-god[61855]: 7:06AM INF starting node with ABCI Tendermint in-process module=server
Aug 12 07:06:19 ip-10-21-27-161 planetmint-god[61855]: 2024/08/12 07:06:19 [app] [Monitor] cannot connect to server: Get "http://localhost:1317/planetmint/machine/address/plmnt1hjlel50gjv8lcsv6ajhm30mmpy0gh8eak9shfw": dial tcp 127.0.0.1:1317: connect: connection refused
Aug 12 07:06:24 ip-10-21-27-161 planetmint-god[61855]: 7:06AM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"

further more on a rollback the mqtt monitor also start which does not make sense at all.

proposal: refactor the mqtt monitor into a separate serve.

eckelj commented 3 months ago

The monitor is essential to the PoP and thus should stay within the planetmint service. I don't know if the service is the issue. The monitoring loop acts before the API is ready. The API availability can be verified and the monitoring loop can be started thereafter. Or the registration of participants is only enabled if the API is up.

jmastr commented 3 months ago

Ok. Then please wait until the API is ready and serving

GR3G0RYO commented 1 month ago

@jmastr could you reduce the amount of repetitive error logging.

jmastr commented 1 week ago

one thing I noticed is that the mqtt monitor does not use the appLogger