Arduino MQTT doen't subcribe unless i restart mqtt server

Hmm, I would try turning on debug messages on the MQTT broker/server side to see if it is rejecting connections and why.