pioreactor icon indicating copy to clipboard operation
pioreactor copied to clipboard

start up jobs not publishing to mqtt if hostname = `pioreactor`

Open CamDavidsonPilon opened this issue 2 years ago • 1 comments

After getting #425 working, I noticed that the activity dot was grey. Logs showed that monitor had started, and I could send commands, but MQTT was not being populated by the monitor job (pio mqtt was absent of monitor fields).

Why could this occur? Some observations:

  • the MQTT server is local to the leader, so it's not a network issue.
  • UI to monitor was working (identify worked, as did starting jobs), so that MQTT connection existing, so it's just publishing problems.
  • rebooting didn't fix the problem.
  • hostname is pioreactor, is that a problem?
  • killing monitor, and then running it manually from the command line worked.
  • Looks like mqtt_to_db_streaming isn't publishing either... I see no x_in_past_minute events

CamDavidsonPilon avatar Oct 01 '23 23:10 CamDavidsonPilon

Attempt 1: change the hostname. I used hostnamectl set-hostname leader and confirmed I changed it with hostname, printing leader. I rebooted. Jobs failed after reboot, since I forgot to update the details in the config.ini.

Yup, that fixed it. Data was in mqtt, UI worked, etc.

I wonder if this is a local access point problem? Or an avahi problem?

CamDavidsonPilon avatar Oct 02 '23 00:10 CamDavidsonPilon