I'm not an expert at docker and linux systems. I want to install a RStudio Server for my ubuntu machine.
When I run the following code on my terminal, rstudio server works on 8787 port. However, rstudio server shows me a login page.
docker run --rm -ti -p 8787:8787 rocker/rstudio
Default username is "rstudio" and after docker run, as you can see on the terminal it gives us a password for login page.
"The password is set to ohSooroh9ohg4Iet"
enter image description here
I enter my username as "rstudio" and password as "ohSooroh9ohg4Iet" correctly, but the server cannot connect to R ression. I couldn't find a solution for this problem.
enter image description here
enter image description here
Thanks for your help.
Related
How to recreate my problem
Creating the MonetDB Container
I have this setup (using windows with Docker Desktop).
Create the official monetdb docker container with the follwing command:
docker run -v $HOME/Desktop/monetdbtest:/monetdbtest -e 'MONET_DATABASE=docker' -e 'MONETDB_PASSWORD=docker' -p 50000:50000 -d topaztechnology/monetdb:latest
explanation what the command does:
creates a monetdb container with a database called 'docker' and applies the password 'docker' to the default user called 'monetdb'. It also mounts my directory monetdbtest/ into the container.
Testing the container with DBeaver
I test the connection using DBeaver with the following credentials:
JDBC URL: jdbc:monetdb://localhost:50000/docker
host: localhost
port: 50000
Database/schema: docker
username: monetdb
password: docker
this works fine, i am able to connect and can exequte sql queries with dbeaver.
Using mclient within the container to send queries
I enter the container as root with the following command:
docker exec -u root -t -i nostalgic_hodgkin /bin/bash
(replace nostalgic_hodgkin with your randomly generated container name)
2.
I navigate to my mounted directory
cd monetdbtest
then I test the connection with mclient:
mclient -h localhost -p 50000 -d docker
I get asked for user and password, so for user I enter
monetdb and for password I enter docker. It works and I am in the mclient shell, able to execute SQL queries.
3.
Since I don't want to always enter username and password I create a .monetdb file in the monetdbtest/ directory. It looks like this:
user=monetdb
password=docker
Now I should be able to use the mclient command without entering user information. So I type this command:
mclient -h localhost -p 50000 -d docker
However I get the message:
'nvalidCredentialsException:checkCredentials:invalid credentials for user 'monetdb
I did everything according to the mclient manual. Maybe I missed something?
You may need to export the environment variable DOTMONETDBFILE with value /monetdbtest/.monetdb. See the man page for mclient, especially the paragraph before the OPTIONS heading.
I have downloaded the Apache Kylin docker image from their site, I use the following command to run the image and it exits with code 139:
docker run -d -m 8G -p 7070:7070 -p 8088:8088 -p 50070:50070 -p 8032:8032 -p 8042:8042 -p 16010:16010 apachekylin/apache-kylin-standalone:3.1.0
It shows port 16010 has an issue but nothing in the logs
Please advise, Thanks in advance
I am one of the contributor of Kylin project, and I saw your question in mailing list. I didn't use windows as my dev machine(I use Mac OS), but I have a pc(win10) for gaming.
I installed WSL2, and latest docker desktop, and pull and start kylin container. And container existed with code 139.
So, I search and find the link : https://dev.to/damith/docker-desktop-container-crash-with-exit-code-139-on-windows-wsl-fix-438#:~:text=Issue%20%3A%20Docker%20Container%20exits%20on%20Docker%20desktop,the%20kernel%20config%20to%20run%20older%20base%20images.
So, I follow the link, add [wsl2] kernelCommandLine = vsyscall=emulate in C://users/[your user name]/.wslconfig . After, start and build Kylin container success.
I have two machines,
machine A: system ubuntu 20.04 (DISPLAY :0)
machine B: system windows 10
in machine A, I create a docker container with the following command:
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v $(pwd):/home/walid/notebooks opencv bash
the docker container has Visual Studio Code installed and OpenCV, I run the following command to go in the container bash:
docker exec -it $containerId bash
inside the container, I go into the folder notebooks and run the following commands:
code . # to launch the visual studio code
result; the visual studio code opens
python read.py # to open a video capture with OpenCV
result; good the video capture opens
now int the machine B; I use the Remote Desktop Connection to machine B, when I go inside the container to open Visual Studio Code nothings happing doesn't open, when I try python read.py I get an error could not connect to display :10.0
I figure out where I was doing it wrong:
(base) adminsst#admins:~$ xhost
access control enabled, only authorized clients can connect
SI:localuser:adminsst
(base) adminsst#admins:~$ sudo su
root#admins:/home/adminsst# xhost
No protocol specified
xhost: unable to open display ":10.0"
whene I was runing the container in the sudo su it doesn't work, but when I sudo docker run .... it works.
but now when I login to another user in the server (machine A) and do the same think it doesn't work anymore and I will get the same error could not connect to display :11.0
SOLUTION 1
here's the solution I did and it works for me:
first if you run the following command in the new user you will get:
walid#admins:~$ xhost
access control enabled, only authorized clients can connect
now run the this one again to have this result:
walid#admins:~$ xhost +local:
non-network local connections being added to access control list
to launch the GUI app you need to pass the new DISPLAY to the container because it will had been changed every time you login to solve this problem just run the following command:
walid#admins:~$ sudo docker exec -it -e DISPLAY=$DISPLAY open bash
that's all now you will be able to launch the GUI app without any problem, but still every time you login you should exect the following command xhost +local: before starting the container, if someone has a solution for that please let me know
SOLUTION 2
see the following url here
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId`
docker start $containerId
there more useful solutions
--------
Another thing I have faced, that even when I do the above steps, sometimes doesn't work, I simply change the display ID in the docker container to the same as Local machine ID by the following;
first figure out the local machine display ID by
echo $DISPLAY
then in the docker container do the following
$DISPLAY=:ID
I'm trying to get started with PANDA RE, a framework developed by MIT Lincoln Lab for Reverse Engineering. Their website says that beginners should try the tool through docker first. Therefore, I pulled their image and got it to run with the command docker run -p 5900:5900 --rm pandare/panda panda-system-i386. The log says VNC server running on 127.0.0.1:5900.
However, if I use Remmina to connect via VNC, it says "VNC server closed connection."
Any tips on fixing this?
If it helps, docker container ls prints 0.0.0.0:5900->5900/tcp for this container
If you run the --help you will get
The default display is equivalent to
"-vnc localhost:0,to=99,id=default"
So, in order to get the panda to listen to 0.0.0.0 you will need to run it with
docker run -p 5900:5900 -ti --rm pandare/panda panda-system-i386 -vnc 0.0.0.0:0,to=99,id=default
enter image description here
I have built a docker image of IBM WAS 9 Base for Windows. My image is named as was9_new. After the image is successfully built, I use docker run command as follows :
docker run --name was_test -h was_test -p 9043:9043 -p 9443:9443 -d was9_new
It returns as output a container ID, and then exits
After that when I try to open the admin console -
https://localhost:9043/ibm/console/login.do?action=secure
I get an error
This site cannot be reached
localhost refused to connect
Is it because after the docker run command outputs a container id, it exits?
Or something else needs to be done to make the admin console work.
I have referred to instructions here - https://hub.docker.com/r/ibmcom/websphere-traditional/
The only difference is, I have built my own image for windows
Printing the container ID and returning to the shell is normal behavior because you specified -d which runs the container in the background. You should be able to see your container with docker ps.
How long after startup did you wait to try to access the admin console? WAS Base can take several minutes to start up depending on system load and other factors, but docker printing the ID only means the container was created, not that it has finished initializing.
Check that 9043 is the adminhost_secure port, or try using just http:// instead of https:// in the admin console URL.
Can you enter the container with docker exec -it was_test bash, and attempt to access the URL from within the container? wget https://localhost:9043/ibm/console. If you get a message about not trusting the certificate, the server is accepting connections, but for some reason docker isn't forwarding your browser's requests into the container.
These steps should help you narrow down whether it is WAS, or docker, that is not cooperating.