error credentials on gvenzl/oracle-xe ARM colima docker - oracle

I'm trying to run an Oracle database on mac m1Pro ARM, so far, here are the steps i did :
Uninstalled colima and docker:
brew uninstall colima docker
Uninstalled docker desktop and deleted all files related.
Installed colima and docker :
brew install colima docker
Ran this command to execute colima :
colima start --arch x86_64 --memory 4
Executed the docker run :
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=azerty gvenzl/oracle-xe
Checked if my container was running :
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ffc237bc009 gvenzl/oracle-xe "container-entrypoin…" 4 seconds ago Up 1 second 0.0.0.0:1521->1521/tcp, :::1521->1521/tcp intelligent_williams
used the integrated commands as mentioned here in "Database users" part :
base : docker exec container name|id createAppUser your_app_user your_app_user_password [your target PDB]
I first tried that :
docker exec 8ffc237bc009 createAppUser oracle azerty XE
But the SID XE wasn't recognized by the listener, then I did that
(default target is said to be XEPDB1)
docker exec 8ffc237bc009 createAppUser oracle azerty
so far it returned that :
Session altered.
User created.
Grant succeeded.
I was pretty confident there, so I ran into DataGrip and did that:
Then this error happend:
At first I thought it was because of SID XEPDB1 so I just replaced it with XE and this error got to me, at this point I knew it was responding:
Now I can't figure it out because I checked if I was misstyping in caps or anything, tried multiple times to cmd+C and cmd+v to make sur, still wrong logons. if anyone has a clue, I'm up for it. if there is anything wrong with what I did, I would love to know !

AS Olga M answered in the comment of my post, the fix was to replace the URL string:
jdbc:oracle:thin:#localhost:1521:XEPDB1
or
jdbc:oracle:thin:#localhost:1521:XE
to 👇:
jdbc:oracle:thin:#localhost:1521/XEPDB1
hope my process helps ✅.
Thanks again Olga M !

Related

how to solve the extited code 139, for run the image cloudera/quickstart, in docker with WSL2 Ubuntu?

I'm using WSL2 with Ubuntu 20.04 distribution, and I was trying create a container in Docker with the Following command:
docker run --hostname=quickstart.cloudera --privileged=true -it -v $PWD:/src --publish-all=true -p 8888:8888 -p 8080:8080 -p 7180:7180 cloudera/quickstart /usr/bin/docker-quickstart
when I run this command, a download started with a weight of about 4.4 GB, (i think that is because because was the first time that I run this container), whe the download was over, I used the following command to check the containers docker ps -a and the status for the container is Exited (139) 6 minutes ago, when check my image list
REPOSITORY TAG IMAGE ID CREATED SIZE
uracilo/hadoop latest 902e5bb989ad 8 months ago 727MB
cloudera/quickstart latest 4239cd2958c6 4 years ago 6.34GB
I think that the image was created successfully, but when I try to run the first command, I keep gettind the Exited (139) in the status and I can't use the container
Apparently the exit code 139 refers to some problem with the system or the hardware, maybe the RAM, but I'm not sure. and I don't know if this problem is because I'm using wsl or my 8GB in ram
not enough to run the image
is there any way to run this image successfully?
You need to create a file named .wslconfig under %userprofile% folder on your Windows and copy the following lines into that file
[wsl2]
kernelCommandLine = vsyscall=emulate
Then just restart your Docker engine.
I fixed this by changing the Docker engine from WSL2 back-end to Hyper-V
https://community.cloudera.com/t5/Support-Questions/docker-exited-with-139-when-running-cloudera-quickstart/td-p/298586

How to use oracle11g on Docker?

just now, i reinstall OSX on my macbook. Then i install Docker Desktop.
Because i want to use oracle database. But i encountered this logs.
Database is not installed. Installing...
Installation files not found. Unzip installation files into mounted(/install) folder
at first, i install SQL Developer. and in Terminal, i install jaspeen/oracle-11g by docker.
then, i run docker image.
$ docker run -d -p 59160:22 -p 59161:1521 jaspeen/oracle-11g
then, i typed
$ docker ps -l
but container's status is 'Exited (1) 16 seconds ago'
12750f964708 jaspeen/oracle-11g "/assets/entrypoint.…" 17 seconds ago Exited (1) 16 seconds ago busy_dewdney
if i have to install oracle database in ORACLE homepage?
I had the same issue and solved it by:
downloading "Linux x86-64" from https://www.oracle.com/database/technologies/oracle-database-software-downloads.htm
unzip both files into the same folder. In the end, you will have one single "database" folder where you had just unzip both files.
(just for the sake of the example you gave) move this folder (the "database" folder) into the "install_folder" folder
execute docker run --privileged --name oracle11g -p 1521:1521 -v path/to/your/install_folder:/install jaspeen/oracle-11g . The idea here is that the value you set for the "path/to/your/install_folder" to be the location of the folder that contains the "database" folder. In your case is it the "install_folder" folder. That -v flag is actually mounting your "install_folder" into docker container at "/install" location.
It will take a while until the process ends. It should first output the following:
Database is not installed. Installing...
Installing Oracle Database 11g
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 50321 MB Passed
Checking swap space: must be greater than 150 MB. Actual 856 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-03-30_08-00-03PM. Please wait ...
When you can connect to it with credentials below, then it is up&running:
username/password: SYS/oracle
SID: orcl
Note: I had tried more than one release from Oracle's download site until I found the lucky one. For example, in one situation the console just exited without any reason. When I typed docker ps, it showed that container exited with status 255 (which I did not find helpful).
I also found inspiration from here: https://programmer.group/install-oracle-11g-using-docker.html
Download database installation files from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index-092322.html and unpack them to install_folder. Run container and it will install oracle and create database:
docker run --privileged --name oracle11g -p 1521:1521 -v :/install jaspeen/oracle-11g

Docker Postgres with windows share

I migrated from Linux to Windows and tried to setup a postgres container with a mounted directory (copied from my Linux install) containing the database.
This does not work.
Windows mounts are always owned by root
Postgres does not run under root
How to get this unholy combination to work?
You don't provide much details so it is difficult to tell what actually went wrong. However there is a known issue with Postgres setup on Windows Docker using a windows mount for database data files. In that case, running docker logs will show something along the following lines
waiting for server to start....FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
HINT: The server must be started by the user that owns the data directory.
stopped waiting
pg_ctl: could not start server
Unfortunately there is no way to overcome this issue so you cannot use Windows mount, see Postgres Data has wrong ownership. You may use docker volumes in order to make database data indipendent from docker postgres container, using the following commands
docker create -v /var/lib/postgresql/data --name PostgresData alpine
docker run -p 5432:5432 --name yourPostgres -e POSTGRES_PASSWORD=yourPassword -d --volumes-from PostgresData postgres
You may find a more thoroughful explanation at Setup Postgresql on Windows with Docker

Docker on Win10 - is it possible to have multiple terminals?

I am new to Docker - installed DockerToolbox on Win10. And managed to run some basic docker examples. But I cannot seem to figure out how to access same container from multiple command line windows.
Quick online search suggested finding container ID (e.g. 2c7e29b9b666) via
docker ps
then running (I presume in new command window)
docker exec -it 2c7e29b9b666 bash
but that does not work in Win10.
Error message received is:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Edit: in the first window I started docker machine via:
docker-machine create --driver virtualbox tombox
and I can see 'tombox' in second window if I do:
docker-machine ls
Do I need to somehow reference 'tombox' when running docker commands in second window?

Connecting to Oracle instance running on Docker

I spent more than two days on this and I ran out of ideas and I really hope someone here will be able to help.
I am running docker on my Linux Fedora laptop.
[julian#julian-hp ~]$ docker -v
Docker version 18.06.1-ce, build e68fc7a
I loaded an oracle 12c image from another laptop (running Linux Ubuntu) and ran it using the following command:
docker run --name oracle_12c_201 -p 1521:1521 -p 5500:5500
-v /opt/dev/data/oracle/o12c_201_u02/:/opt/oracle/oradata
-e ORACLE_PWD=admin 12a359cd0528
The container gets created and is displayed as healthy when running docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
544917a88b6b 12a359cd0528 "/bin/sh -c '/bin/ba…" 2 days ago Up 2 days (healthy) 0.0.0.0:1521->1521/tcp, 0.0.0.0:5500->5500/tcp oracle_12c_201
However when I try to login to my running instance I am getting ORA-01017: Invalid username/password; logon denied message
All of the HOW TOs I found on the internet say that if you do not specify a password when you create the container using docker run the the SYS password will be displayed under this line:
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN:
There is not such a line in my logs. Note I deleted the container using all possible permutations such following internet articles such as -e "ORACLE_PWD=admin" or not specifying a password at running docker run using sudo nothing worked.
When trying to change the password using below:
docker exec oracle_12c_201 ./setPassword.sh admin
It fails with the following error mesage:
OCI runtime exec failed: exec failed: container_linux.go:348: starting container
process caused "exec: \"./setPassword.sh\": stat ./setPassword.sh:
no such file or directory": unknown
I ran out of ideas. I can see from the logs that the database is up and running but it is useless as long as I cannot connect to it. Note that the same image runs OK and I can connect to it without any problems on my other laptop running Linux Ubuntu. Unfortunately I no longer have the commands that I used to install oracle on that machine.
Thank you in advance for your help.

Resources