Oracle docker container not working properly on Mac M1 BigSur [duplicate] - oracle

This question already has answers here:
Oracle 12c docker setup on Apple M1
(6 answers)
Closed 10 months ago.
I was recently trying to create a docker container and connect it with my SQLDeveloper but I started facing some strange issues.
I downloaded the docker image using below pull request:
docker pull store/oracle/database-enterprise:12.2.0.1-slim
then I started the container from my docker-desktop using port 1521. The container started with a warning.
terminal message:
docker run -d -it -p 1521:1521 --name oracle store/oracle/database-enterprise:12.2.0.1-slim
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
5ea14c118397ce7ef2880786ac1fac061e8c92f9b09070edffe365653dcc03af
Now when I try connect to db using below command :
docker exec -it 5ea14c118397 bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
SQL> connect sys as sysdba;
Enter password:
ERROR:
ORA-12547: TNS:lost contact
it shows this message, PASSWORD I USE IS Oradoc_db1.
Now after seeing some suggestions I tried using the below command for connecting to sqlplus:
docker exec -it f888fa9d0247 bash -c "source /home/oracle/.bashrc; sqlplus / as sysdba"
SQL*Plus: Release 12.2.0.1.0 Production on Mon Sep 6 06:15:58 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
I also tried changing permissions of oracle file in $ORACLE_HOME as well for execution permissions as well but it didn't work.
Please help me out as I am stuck and don't know what to do.

There are two issues here:
Oracle Database is not supported on ARM processors, only Intel. See here: https://github.com/oracle/docker-images/issues/1814
Oracle Database Docker images are only supported with Oracle Linux 7 or Red Hat Enterprise Linux 7 as the host OS. See here: https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance
Oracle Database ... is supported for Oracle Linux 7 and Red Hat Enterprise Linux (RHEL) 7. For more details please see My Oracle Support note: Oracle Support for Database Running on Docker (Doc ID 2216342.1)
The referenced My Oracle Support Doc ID goes on to say that the database binaries in their Docker image are built specifically for Oracle Linux hosts, and will also work on Red Hat. That's it.
Linux being what it is (flexible), lots of people have gotten the images to run on other flavors like Ubuntu with a bit of creativity, but only on x86 processors and even then the results are not guaranteed by Oracle: you won't be able to get support or practical advice when (and it's always when, not if in IT) things don't work as expected. You might not even be able to tell when things aren't working as they should. This is a case where creativity is not particularly rewarded; if you want it to work and get meaningful help, my advice is to use the supported hardware architecture and operating system version. Anything else is a complete gamble.

I think i will answer my own question and its similar to the accepted answer.
As the oracle db is very large in size and is very complex to handle and maintain on different systems like mac and all, therefore, its recommended to use the docker mentioned system configurations for running the docker container on your system.
I have used MariaDB and have also tried MongoDB (NoSQL) instead of using oracle as these are very much light and don't need strict configurations to run and they ran in no time. I could easily connect both of them with SQLDeveloper(MariaDB) and MongoDB compass(MongoDB).
There are some custom oracle light weight versions as well but they are not very full proof to work on your system.

Related

Gitlab on Window with Docker

When I try to connect on gitlab on my browser, I received this error :
SSH-2.0-OpenSSH_8.2p1 Ubuntu0.2
Invalid SSH identification string
Can someone please help me?
Assuming you are using a GitLab Docker image, do note that Docker for Windows is not officially supported.
There are known issues with volume permissions, and potentially other unknown issues.
Annother approach would be to install GitLab in a WSL2 Linux session on your computer, and see if it answers better to SSH queries.

Timescaledb extension for postgresql V.13 Beta 3 (windows)

I am using PostgreSQL 13 Beta 3 on (windows.8/*64bit). I want to add timescaledb extension. My "postgresql.conf" directory is correct but every time i try to install the extension, I get a message which is attached.
I had also changed Environment Address to "C:\Program Files\PostgreSQL\13\bin" [The address of pg_config.exe", but nothing changed. Is there a possibility that i have to use from postgreSQL V.12 as mentioned in the installation instruction? enter image description here
Thank you in advance for your help and guide
You cannot to do it. Timescale doesn't support Postgres 13 yet. Postgres 13 was not releases yet - there only test releases are available.
PostgreSQL extensions should be compiled for specific Postgres major version. So you cannot to use timescale for Postgres 12 or Postgres 11 for Postgres 13.
It's not ready yet. It's expected on the upcoming TimescaleDB v2.0.1. Read more at their release notes: https://docs.timescale.com/latest/release-notes.

Windows Docker API issue for using GitLab-runner

While setting up a Windows CI pipeline from GitLab, I was going through the numerous issues related to the Windows gitlab-runner docker executor that is using an old API (1.18) which Docker no longer accepts.
The issue results in the following error messages when the Gitlab/CI tries to connect to the runner:
Running with gitlab-runner 11.2.0 (35e8515d) on Windows VS2017 x64 0825d1d7
Using Docker executor with image buildtools2017 ...
ERROR: Preparation failed: Error response from daemon: **client version 1.18 is too old.** Minimum supported API version is 1.24, please upgrade your client to a newer version (executor_docker.go:1148:0s)
The 'buildtools2017' docker image that is referred to is the Microsoft "official".
The image seems to be working and valid for the current (experimental) Docker version I'm using (18.06.1-ce-win74) and for the stable version as well.
The issue was described throughout the GitLab wiki. Andrew Leech (?) went so far as to fork and modify the runner so that it would connect properly, and kindly provided his scripts and comments in a blogpost. This seems to give some results:
C:\gitlab-runner>gitlab-runner.exe -v
Version: 10.8.0~beta.551.g67a6ccc7
Git revision: 67a6ccc7
Git branch: windows-container-executor
GO version: go1.9.4
Built: 2018-07-30T08:57:44+00:00
OS/Arch: windows/amd64
The GitLab wiki states that they're waiting until a more stable solution can be released. Currently it's been over one year of broken windows docker runners..
Andrew's blogpost and a link to his gitlab-runner.exe describes actually a different workaround using the PowerShell runner that then starts a Docker instance. All the token info is exposed, I'm not sure how to set it up, and it also seems to rely on an external image with older build tools.
It seems the docker runner now connects, but if I undestand correctly, the Gitlab-runner docker runner does not seem to agree on the 'build directory' that is used. The first Gitlab/CI scriptline in my repo is just an echo command, so the error is not about the ci script content, but I'm not sure what it IS about. If anyone with docker fu knows what is going on this would really help me.
Using Docker executor with image buildtools2017 ...
ERROR: Preparation failed: build directory needs to be absolute and non-root path
Cheers,

PuTTy "unknown option -o" when trying to connect

following the getting started guide I attempt to create & connect to a datalab vm instance with the command:
datalab create demo
but I get the following pop-up:
then, on ok-ing the error,
connection broken
Attempting to reconnect...
in the command prompt
Any idea how to have the keys generated a different way to allow me to connect?
As a workaround, you can try either running the datalab connect demo command from inside of Cloud Shell, or downgrading to version 153.0.0 of the Cloud SDK.
As for your error, this seems to be a newly introduced bug in the 154.0.0 release of the Cloud SDK.
Prior to that, running a command like gcloud compute ssh --ssh-flag=-o --ssh-flag=LogLevel=info demo would have resulted in the "-o LogLevel=info" flag being stripped out of the command prior to it running on Windows.
With the most recent release (154.0.0), however, those flags are now passed to the SSH command as-is. This causes an error on Windows, as the PuTTY CLI does not support the -o flag.
I've filed https://github.com/googledatalab/datalab/issues/1356 to track fixing this issue.
Sorry that you got hit by this.

import neo4j database from windows to ubuntu

I have created a neo4j database on my windows machine.
I have transferred the content of the database directory to my linux machine. This is because I have the community edition which does not support the backup functions.
mtt#mttPC:/var/lib/neo4j/data/log$ sudo service neo4j-service start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
WARNING! You are using an unsupported Java runtime.
* Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [21498]... waiting for server to be ready..... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
The file messages.log in the database directory says nothing.
Any idea? Are the windows and linux neo4js compatible? Thank you.
Edit
I have made a fresh install of neo4j on my ubuntu machine.
Now I finally get some logs:
2014-05-16 20:01:10.958+0000 ERROR [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#25984c63' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#3d34dcb' was successfully initialized, but failed to start. Please see attached cause exception.: 'neostore' has a store version number that we cannot upgrade from. Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.2'.
2014-05-16 20:01:10.958+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
I should be related to this but I am not sure how to proceed. Is the issue related to the fact that when I copied the database, I just stopped neo4j on my windows machine from the neo4j window?
There is no reason why a Neo4j database should not be transferable between operating systems. Can you please provide the output of data/log/console.log? First thought is that you may have permission issues. The files should be read/write for the user the Neo4j process will run as.

Resources