Changing default xmlrpc PORT causes CLI connections errors


I’ve changed the default 2633 port to 26633 in the /etc/oned.conf:
PORT = 26633

and accordingly – /etc/one/sunstone-server.conf:
:one_xmlrpc: http://localhost:26633/RPC2

so sunstone works, but there is an issue with CLI:

[oneadmin@one-srv-01 ~]$ onevm list
Connection refused - connect(2)

I assume it tries to connect to 2633 port.
Could you advise how to solve this problem?

Hello @gray380

You have to export the variable export ONE_XMLRPC=http://localhost:26633/RPC2


It helps but in the /var/log/one/sched.log still appear the following messages:

Fri Oct 11 15:48:28 2019 [Z0][SCHED][E]: Cannot contact oned: HTTP POST to URL 'http://localhost:2633/RPC2' failed. libcurl failed even to execute the HTTP transaction, explaining: Failed connect to localhost:2633; Connection refuse

You need to change the variable ONE_XMLRPC on /etc/one/sched.conf.

Thanks, I’ve missed it.
Does it restarted within ‘service opennebula restart’?

Yes, it should restart (systemctl restart opennebula)