XMR or Ubuntu 15 kicking ZMQ socket bind errors

Hi, i have 1.8 CMS custom install running fine on a godaddy VMS ubuntu 15 and now im trying to get XMR up.
response is:

# php /var/www/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar
[2017-04-09 10:17:14] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-09 10:17:14] xmr.ERROR: Failed to bind the ZMQ: No such device [] []
[2017-04-09 10:17:14] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://localhost...') #1 phar:///var/www/html/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/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar/index.php(56): React\ZMQ\SocketWrapper->__call('bind', Array) #3 phar:///var/www/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar/index.php(56): React\ZMQ\SocketWrapper->bind('tcp://localhost...') #4 /var/www/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar(10): require('phar:///var/www...') #5 {main} [] []

I have ZMQ installed (I think. as it had check in CMS install)
installed xmr with composer as in documentation in github
have config.json

{
  "listenOn": "tcp://localhost:50001",
  "pubOn": ["tcp://localhost:9505", "tcp://localhost:50002"],
  "debug": true
}

LOG output

[2017-04-07 22:02:54] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-07 22:17:59] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-07 22:17:59] xmr.ERROR: Failed to bind the ZMQ: No such device [] []
[2017-04-07 22:17:59] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://localhost...') #1 /var/www/html/vendor/react/zmq/src/React/ZMQ/SocketWrapper.php(114): $
[2017-04-07 22:31:22] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-07 22:31:22] xmr.ERROR: Failed to bind the ZMQ: No such device [] []
[2017-04-07 22:31:22] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://localhost...') #1 phar:///var/www/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar/vendor/$
[2017-04-09 09:35:13] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-09 09:35:13] xmr.ERROR: Failed to bind the ZMQ: No such device [] []
[2017-04-09 09:35:13] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://localhost...') #1 /var/www/html/vendor/xibosignage/vendor/react/zmq/src/React/ZMQ/Socke$
[2017-04-09 10:17:14] xmr.INFO: Starting up - listening for CMS on tcp://localhost:50001. [] []
[2017-04-09 10:17:14] xmr.ERROR: Failed to bind the ZMQ: No such device [] []
[2017-04-09 10:17:14] xmr.ERROR: #0 [internal function]: ZMQSocket->bind('tcp://localhost...') #1 phar:///var/www/html/vendor/xibosignage/xibo-xmr/bin/xmr.phar/vendor/$

and it doesn’t appear to be running in netstat

any clues?

Ok it looks like it’s running.
modified config.json to following

{
  "listenOn": "tcp://lo:50001",
  "pubOn": ["tcp://198.12.154.219:9505", "tcp://lo:50002"],
  "debug": true
}

You can test if XMR works by trying to request a screenshot from 1.8 display connected to your 1.8 CMS.

yes it looks like it’s working. just have to figure out how to make a service of it. upstart has been deconed systemd is the new thing 8-(

If you do manage that, we’d love to have that info in the documentation or respoitory.

OK heres how to make it a system program and run on start
first
just because im lazy and don’t feel like adding sudo all the time
#sudo su
#cd /etc/systemd/system
then
#nano xmr.service
add:

[Unit]
Description = making network connection up
After = network.target
[Service]
ExecStart = /var/www/html/vendor/bin/xmrrun.sh
[Install]
WantedBy = multi-user.target

hit ctl-o then ctl-x
now
#systemctl enable xmr.service

you should see “Created system link from” blah blah blah

#cd /var/www/html/vendor/bin

#nano xmrrun.sh
#!/bin/bash
sudo /usr/bin/php /var/www/html/vendor/bin/xmr.phar

ctl-o
ctl-x

now set that file executable with
#chmod +x xmrrun.sh

now test your sh file with
#./xmrrun.sh
should run your xmr
ctl-x out

then start your service
#systemctl start xmr.service

test with netstat

#netstat -atun

you should see the active ports now

and finally reboot with
#reboot

when the system comes back up check with netstat

#netstat -atun
if all your ports are up you are SET
xmr is running as a service

Have Fun!!

2 Likes

Sorry i missed a character in cut paste

it needs to be
“#!/bin/bash”
without quotes
it won’t let you type a pound without quotes in the forum

1 Like