XMR problems with XMR using Docker with remote database


#1

We are using XIBO 1.8.11 but its seems that in our environment XMR is not working.

We see

"Player action refused by XMR (connected but XMR returned false) " in logs everytime that try to reconfigure XMR.

We haven’t been able to gather any screenshot or fire automatic layout update.

Any other log that we could use?

log.pdf (48.5 KB)

We do not get an error on player neither on “config screen profile” save action.

Thank you in advance


#2

The error you have means that the CMS can’t connect to the XMR server.

Please post the docker-compose configuration you’re using for this.


#3

version: “2.1”

services:
cms-xmr:
image: xibosignage/xibo-xmr:release-0.7
ports:
- “9505:9505”
restart: always
env_file: config.env
mem_limit: 256m
cms-web:
image: xibosignage/xibo-cms:release-1.8.11
volumes:
- “./shared/cms/custom:/var/www/cms/custom”
- “./shared/backup:/var/www/backup”
- “./shared/cms/web/theme/custom:/var/www/cms/web/theme/custom”
- “./shared/cms/library:/var/www/cms/library”
- “./shared/cms/web/userscripts:/var/www/cms/web/userscripts”
restart: always
links:
- cms-xmr:50001
environment:
- XMR_HOST=cms-xmr
ports:
- “8081:80”
env_file: config.env
mem_limit: 2g

(I also noted that CMS log shows that there is a component that can’t access external images uploaded on a web site… not sure if related)

(port change to 8081 has been done to start docker with an already existing apache install, we also use an external mysql, to avoid extra resource consumption and reuse current backup strategy.)


#4

I also tried to telnet cms-xmr 50001 and something responded.


#5

I’ve cloned to a testing environment, and this is the problem I got when I try to rekey XMR.

Registro de XMR inválido
#0 /var/www/cms/lib/Controller/Display.php(1005): Xibo\Service\PlayerActionService->sendAction(Array, Object(Xibo\XMR\RekeyAction))
#1 [internal function]: Xibo\Controller\Display->edit(‘73’)
#2 /var/www/cms/vendor/akrabat/rka-slim-controller/RKA/Slim.php(79): call_user_func_array(Array, Array)
#3 [internal function]: RKA\Slim->RKA{closure}(‘73’)
#4 /var/www/cms/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#5 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1355): Slim\Route->dispatch()
#6 /var/www/cms/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#7 /var/www/cms/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#8 /var/www/cms/lib/Middleware/Actions.php(160): Slim\Middleware\MethodOverride->call()
#9 /var/www/cms/lib/Middleware/Theme.php(36): Xibo\Middleware\Actions->call()
#10 /var/www/cms/lib/Middleware/WebAuthentication.php(131): Xibo\Middleware\Theme->call()
#11 /var/www/cms/lib/Middleware/CsrfGuard.php(63): Xibo\Middleware\WebAuthentication->call()
#12 /var/www/cms/lib/Middleware/State.php(122): Xibo\Middleware\CsrfGuard->call()
#13 /var/www/cms/lib/Middleware/Storage.php(47): Xibo\Middleware\State->call()
#14 /var/www/cms/lib/Middleware/Xmr.php(37): Xibo\Middleware\Storage->call()
#15 /var/www/cms/vendor/slim/slim/Slim/Slim.php(1300): Xibo\Middleware\Xmr->call()
#16 /var/www/cms/web/index.php(124): Slim\Slim->run()
#17 {main}


#6

Should the docker image have internet access? Would that be a cause to XMR not working?


#7

Is there any other log to look for info?


#8

So the docker-compose config looks sensible.

Please can you double check that you can telnet from the cms container to the xmr container on port 50001?

If you can, then XMR should be working.

The XMR container needs access to the network that your Players are connected to, exposing only port 9505, and you should have configured the CMS in the Settings page to give the players that address in the format

tcp://cms.example.org:9505 
tcp://192.168.0.20:9505

#9

Telnet test:

docker exec -it xibo_cms-web_1 bash
bash-4.3# telnet cms-xmr 50001




^]%

Console escape. Commands are:

 l	go to line mode
 c	go to character mode
 z	suspend telnet
 e	exit telnet
e
bash-4.3# 
bash-4.3# telnet cms-xmr 50002
telnet: can't connect to remote host (172.18.0.3): Connection refused

I can reach db from XMR (XX replacing information just in case):
~ $ telnet XXXXXXXX:3306
_
5.5.XX-0ubuntu0.14.XXXXXXXXXXXXXXX#*VUmysql_native_password

Is there any table with messages not send from CMS? Or it is just an status on players?


#10

I have put the log in debug mode, this is what I get when I command a player to re-register XMR.

47812 4ceb383 2018-12-14 11:43 CONSOLE GET ERROR / Unable to Process Queue of Player actions due to 9 of 9 player actions failed
347810 4ceb383 2018-12-14 11:43 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347800 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347799 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347798 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347797 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347796 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347785 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347784 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347773 4ceb383 2018-12-14 11:42 CONSOLE GET ERROR / Player action refused by XMR (connected but XMR returned false).
347766 4ceb383 2018-12-14 11:42 CONSOLE GET DEBUG / Player Action Service is looking to send 9 actions
347765 4ceb383 2018-12-14 11:42 CONSOLE GET DEBUG / Process queue of 34 display actions
347764 4ceb383 2018-12-14 11:42 CONSOLE GET DEBUG / Process queue of 34 display notifications

#11

XMR doesn’t need to see the database.

Can you connect to your database and check what value you have for the following:

select setting,value from setting where setting like 'XMR%';

My guess is your XMR private address is wrong there. Setting that is a manual step if the database was external to Docker and not imported by it.

If it isn’t the required value, you can set it by running the following taken from the switch to Docker guide:

UPDATE `setting` SET `value`="/var/www/cms/library/", userSee=0, userChange=0 WHERE `setting`="LIBRARY_LOCATION";
UPDATE `setting` SET `value`="tcp://cms-xmr:50001", userSee=0, userChange=0 WHERE `setting`="XMR_ADDRESS";
UPDATE `setting` SET `value`="Apache" WHERE `setting`="SENDFILE_MODE";

Once that has been run, go to the Settings page in the CMS and click the Save button (making no changes) to clear the settings cache.


#12

WOW! I just was looking at

And you just answer the same. I’m doing the change right now.


#13

I only had to change the XMR_ADDRESS setting from xibo-cms-xmr to cms-xmr. I’m testting right know but the first one already collected some screenshots.


#14

You’ll want to make the other changes I listed for a Docker-based install for performance reasons too.