Agent threads/XMR is dead not updating status.json

Hello.
I want to use the xmr.
You have stumbled on the following error.
・(xibo-player log) “Agent threads/XMR is dead not updating status.json”
・("$php xmr.phar") “Failed to bind the ZMQ: No such device”

I checked all the writes here for both errors, but I couldn’t find a solution.

The following environment is used:
・cms -2.2 .1
・player-v2 (201)

I look forward to your comments.

You’ll have to make sure XMR is working on the CMS side before debugging the Player. How do you have it setup up? Is it Docker or a custom set up?

The message you’ve pasted there for ZMQ usually means XMR hasn’t been configured.

If you’re not using Docker, there is a intro doc for XMR here.

Thanks,
Dan

Thank you for your comment.

I don’t use Docker.

I have already read and set all the pages you indicated.
After that, I was looking around for the above error, but I couldn’t get any information.
(Many topic was closed before resolution.)

My current settings are as follows.
(Replaced localhost with 127.0.0.1.)

[config.json]
{
“listenOn”: “tcp:// 127.0.0.1: 50001”,
“pubOn”: [“tcp :// {my _ ip}: 9505”],
“debug”: true
}

[CMS]
xmr private address tcp:// 127.0.0.1: 50001
xmr public address tcp :// {my _ ip}: 9505

Currently, the following error appears in the “php xmr.phar” command.
“Failed to bind the ZMQ: Address already in use.”

Please let me know if you notice anything.

That would mean your tcp://{my _ ip}:9505 port cannot be bound to, because the port is already open and used by something else. You can try to find out what that other thing is, and stop it, or change the port number XMR tries to bind to.

To summarise… XMR sits there and publishes messages on the port you’ve configured as pubOn, and it can’t bind to that address you’ve given.

Thanks

Thank you.
I was mistaken.
The error is not listenOn but PubOn.

Here’s the full text of the error:.

*-------------------------------------------------------------------------------------------------
[root@ssp-xibo bin]# php xmr.phar
[2020-04-09 08:58:49] xmr.INFO: Starting up - listening for CMS on tcp://lo:50001. [] []
[2020-04-09 08:58:49] xmr.ERROR: Failed to bind the ZMQ: Address already in use [] []
[2020-04-09 08:58:49] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://lo:50001') #1 phar:///var/www/xibo221/vendor/xibosignage/xibo-xmr/bin/xmr.phar/vendor/react/zmq/src/React/ZMQ/SocketWrapper.php(114): call_user_func_array(Array, Array) #2 phar:///var/www/xibo221/vendor/xibosignage/xibo-xmr/bin/xmr.phar/index.php(64): React\ZMQ\SocketWrapper->__call('bind', Array) #3 /var/www/xibo221/vendor/xibosignage/xibo-xmr/bin/xmr.phar(10): require('phar:///var/www...') #4 {main} [] []
[root@ssp-xibo bin]# 
*-------------------------------------------------------------------------------------------------

([127.0.0.1] of listenOn has been changed to [lo] since the previous posting.)

I will try various things.
Thank you.

Hello.

After the above, I reviewed the settings.
The error that caused xmr to fail to start up was that httpd had access to these ports.
I thought it necessary to open up httpd’s port 50001 (listenOn) and port 9505 (pubOn), but it was not necessary.

After starting xmr, I performed the following three operations from the CMS to verify operation.

・CollectNow
・ScreenShot
・Changing a running schedule

There operations were performed immediately without waiting for the collection interval.
The points I want to ask are as follows.
(1)Is xmr working properly?
(2)The player status still shows the following error:. Am I missing something?
[ScheduleManagerThread] “Agent threads/XMR is dead not updating status.json”

Sorry for asking so many questions.
I look forward to hearing from you.

The xmr.phar log during operation is as follows:.


[root@ssp-xibo bin]# php xmr.phar
[2020-04-10 10:18:09] xmr.INFO: Starting up - listening for CMS on tcp://10.193.5.106:50001. [] []
[2020-04-10 10:18:09] xmr.INFO: Bind to tcp://10.193.5.106:9505 for Publish. [] []
[2020-04-10 10:18:09] xmr.DEBUG: Adding a queue processor for every 5 seconds [] []
・・・
[2020-04-10 10:53:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:54:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:54:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:55:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:55:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:56:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:56:36] xmr.INFO: {"channel":"13887c7be24e032453739418b079c0f3","message":"\/5\/nsImabTzMEuXAhAfb6sMG1VSzyF8OJk3X62hTNu6MjgXHZIdX7D70jheC74dRMj7y5ChNAc5wofO7LCZNU6ollytcjNZ\/vw==","key":"DADdWzxhU6LNqrl2TMpxCOelqswZ+QRZ3aVT3vMP5U2O8zi8nVRU0frX95yBoFr4sg4cl\/Dm10jnyQXJNpQkQ4z92SMuuJw7+Kh2bC9C3IFXs+GyFT7Q0d59orVQG4CPCr+UuA0UWzr\/hshB31xQ\/VNSFbvjf\/7Fb2lNmytfLtY=","qos":1} [] []
[2020-04-10 10:56:36] xmr.DEBUG: Queuing [] []
[2020-04-10 10:56:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:56:40] xmr.DEBUG: Queue Poll - work to be done. [] []
[2020-04-10 10:56:40] xmr.DEBUG: Popped 0 from the queue, new queue size 0 [] []
[2020-04-10 10:57:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:57:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:58:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:58:21] xmr.INFO: {"channel":"13887c7be24e032453739418b079c0f3","message":"bqs8YEgcv+34+j0uU2MMjE3a\/BuAr\/L2HF3d8f4epoEd4iiXAXQ4HwJXSXf25tt5tKV0AfJ0xufHHhioMypjoMDq33qyt7j97Q==","key":"EMdxD+B1h4O8U65KnQt7uUQHO7Rd0S241OLo\/5GNv2yInM6nFVZnnqewKwHc1FwVHuJA2XSQerTGB9o9pv8tA2Zb5nh7QyGwi4Ay9jjGR25J1W8wUWota\/LgYa4+igjP18YX5DL5jkwh+my7Ng6v28acoAdWV5xmZaUSdNLi\/Gw=","qos":10} [] []
[2020-04-10 10:58:21] xmr.DEBUG: Sending Immediately [] []
[2020-04-10 10:58:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:59:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 10:59:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 11:00:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 11:00:18] xmr.INFO: {"channel":"13887c7be24e032453739418b079c0f3","message":"gDSAu5rSEF386zw+VqTd2EQnbAvjp8Q3bnt0R\/+3FdyzJQWaQI2+GICjqrHHFta2d7Q0bhgA4xcYkr\/8fgMza22i8ojvT9F12A==","key":"CDU6hDyGzyFZRCAkcjQ56sedFo0jsa40OB0VkzRMKvTQFEoE1QL9ZBVZDfF3YYM51k\/7lmyREbWGSf5jhTI8Bg7NxVfCf0mBFBCE02XHHrEv0vnI0NI+T7vk70jjaNweETKPdXjCrSec\/MUOz1EKnU6\/yqtWCty2gnYW+Oqoq1I=","qos":1} [] []
[2020-04-10 11:00:18] xmr.DEBUG: Queuing [] []
[2020-04-10 11:00:20] xmr.DEBUG: Queue Poll - work to be done. [] []
[2020-04-10 11:00:20] xmr.DEBUG: Popped 0 from the queue, new queue size 0 [] []
[2020-04-10 11:00:39] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 11:01:09] xmr.DEBUG: Heartbeat... [] []
[2020-04-10 11:01:39] xmr.DEBUG: Heartbeat... [] []

The logs imply XMR is working correctly, you can see heartbeat messages every 30 seconds and the messages you sent going out also (the ones logged as INFO).

If you open the player information window, what do you see as the XMR status (above the error log grid)?

You should see the address you’ve entered as your pubOn listed there, and showing as connected. You should also see a last message date.

Hello. Dan.
Thank you for your reply.

The information you are saying is currently displayed.
(It was also displayed last time.)

Since the last report, we have configured xmr to start as a service of systemd.
(Previously, it was run directly from the command line.)

When I checked it today, there was no error.
I don’t know if this change is the cause.

It seems likely - if XMR stops on the server you would get a message indicating that XMR had stopped on the player.

It sounds to me like you have it solved :+1:

Thank you for your comment. Dan.

The error occurred again when I restarted the player this morning.
I checked the source and found a condition that caused this error.
It appears to occur when one of the following five threads does not exist.

https://github.com/xibosignage/xibo-windows/blob/master/XiboClient2/XiboClient2.Processor/Logic/Schedule.cs

/// <summary>
/// Are all the required agent threads alive?
/// </ summary>
/// <returns> </ returns>
private bool agentThreadsAlive ()
{
return _ registerAgentThread.IsAlive & & &
_ scheduleAndRfAgentThread. IsAlive & & &
_ logAgentThread.IsAlive & & &
_ libraryAgentThread.IsAlive & &
_ xmrSubscriberThread.IsAlive;
}

Is there any way I can confirm this?
I’m sorry for asking so many questions.

That is indeed when the message gets logged, but usually the culprit here is the XMR subscriber thread as the others are basically wait/poll threads for making API requests.

The XMR thread is the only one there making a permanent socket connection.

You’re looking in the wrong repository by the way, the code for your player version is here.

This is the XMR run loop:

Its not uncommon to get disconnects and errors in there, which is why all the logging is marked as either audit/info.

I suggest you lower your logging level in Display Settings and see if anything else gets logged.

1 Like

Thank you for your comment. Dan.

Now I know why xmr can be used when it has errors.

The console log screen of the player shows the information of all the logs, so even if there is no problem now, it shows the errors in the past. I see.

I will try to change the log level as needed.

Thank you.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.