I am trying to run CUBA Platform in Docker. The server starts OK, but when I try to access it I get a pretty straightforward error - ‘Remote connection is not permitted’
The solution posted in the below thread does not help
What do you exactly mean by “run CUBA Platform in Docker”. Do you mean the generated war file inside a tomcat, or do you mean the studio installation? Where do you get the error message, in the log file of the docker container or the web browser?
Hello Mario!
Actually both in browser and the server log.
I downloaded binaries for Linux [url=https://www.cuba-platform.com/download]High productivity application development platform and ran the startup script with /bin/studio -nogui
Jetty started OK, however, when I went to localhost:8111 i get this error message. This happens because CUBA runs in a Docker container and the request comes from a host network.
The same happens, if I run CUBA in a remote VM (say, Digital Ocean or Amazon) and access $IP:8111
How can I allow remote connections?
Hi,
i just tried the tip by Konstantin. It worked for me (OSX, user: mario, config.xml: /Users/mario/.haulmont/studio/config.xml).
When you tried, to change the config.xml and i didn’t work, I would guess it has to do with Docker. By default processes in the container run as root user. That means, that if you didn’t change the running user in your Dockerfile, you have to put the config.xml at /root/.haulmont/studio/config.xml (i tried it with ubuntu docker container).
Can you show the Dockerfile that you used to create the container, or did you just created it interactively?
Bye,
Mario
Hi,
Instead of setting up studio.xml, you can try to enable remote connections by providing the following Java system property as a command line argument:
$ studio -Dstudio.connection.remote.enable=true
Or better specify this property in the STUDIO_OPTS environment variable (see studio shell script for details).
By the way, could you tell us why do you want to run Studio in a container? Is it for collaborative work or just for convenient use by a single developer?
OK, -Dstudio.connection.remote.enable=true as an argument to the script did not work. Adding -Dstudio.connection.remote.enable=true to JAVA_OPTS in studio script worked. Environment variable also did the trick. And I did not try the xml solution, since ENV is totally OK.