Node Publish/Subscribe Communication Failure
Symptom
If log information such as "publiser Init failed" and "subscriber Init failed" is displayed in the terminal window, the node fails to send or receive messages.
Possible Causes
- The publishing and subscription nodes fail to be started.
- The types of messages to be published and subscribed to are inconsistent.
Solution
- Check whether the DataMaster and queue_schedule processes exist. If any of the processes does not exist, an exception occurs. Run the following command to check the processes. The processes may be restarted repeatedly. You can check whether the process ID changes for several times.
ps -ef | grep -E "DataMaster|queue_schedule"
- If the process is normal, the fault is rectified. No further action is required.
- If the process is abnormal, go to Step 2.
- Check whether the publishing and subscription nodes are successfully started. View the slog file to check whether the MD5 values are the same. If they are different, check whether the types of published and subscribed messages are the same.
- If the fault is rectified, no further action is required.
- If the fault persists, go to Step 3.
- Check whether a topic has multiple publishing ends. View the slog file. If "this topic has been registered by node" is displayed, the topic is repeatedly registered. Retain a publish node and stop processes on other publish nodes.
- If the fault is rectified, no further action is required.
- If the fault persists, go to Step 4.
- Check whether the value of queue size on the subscription end is correct. It is recommended that the value of queue size be 2 or greater. If the value of queue size is 1, no actual buffer is available.
- If the fault is rectified, no further action is required.
- If the fault persists, go to Step 5.
- Check whether the subscription failure is caused by incorrect group configuration. Note that the value of groupName in the OpenHiva::Init interface must be the same as that in the Subscribe interface.
Parent topic: OpenHiva FAQs