Remote connection is not permitted

Hi,

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

Can someone please guide me on this?

Hi,

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?

Bye,
Mario

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

I run all processes as a user. I’ll try the suggested fix and add confix.xml to /root/.haulmont/studio/

Thanks for your prompt replies!

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?

Thanks for the tip.

I am trying to run it in Eclipse Che GitHub - eclipse/che: The Kubernetes-Native IDE for Developer Teams

Great! The integration with Eclipse Che is in our roadmap, so please share your experience!

Will do!

I think Open IDE will be my next question. But I will ask it after I successfully launch the server and can access it in the browser.

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.

Thanks for your help!

Question - where can I grab samples that you use? Smth like that - https://github.com/Haulmont/platform-sample-library

Is this example good enough? :slight_smile:

Good question, could you post it as a separate topic?