Christian and Andy,

thank you for the response. I tried to use the "-d" option when starting the server, like this:

server = new BaseXServer("-p"+SERVERPORT, "-e"+EVENTPORT, "-n" + host, "-d");

but I wasn't able to get any information (actually, for some reason I had to change DEBUG to true inside the .basex file). In the "catalina.out" file, the same "java.net.ConnectException: Connection refused" exception appears. For some reason, the connection is refused when I try to stop the server (but the connection works when trying to execute other commands). In the BaseX log, nothing different appears. It also happens when I try to do the following:

BaseXServer.stop(SERVERPORT, EVENTPORT);

Anyway, in the BaseX log, there are lines such as:

19:35:43.118 127.12.249.129:33012 admin REQUEST INFO
19:35:43.865 127.12.249.129:33012 admin OK 810.3 ms
19:35:57.304 127.12.249.129:33083 admin REQUEST INFO
19:35:58.072 127.12.249.129:33083 admin OK 768.67 ms

127.12.249.129 is the internal Openshift IP. The numbers 33012, 33083 are arbitrary port numbers? The Openshift available port numbers range from 15000 to 35530.

thank you in advance.