Oracle Database exists but error seen when referencing it - linux

During installation of spacewalk using instructions from https://docs.oracle.com/cd/E92593_01/E90682/html/swk22-svr-install.html we require
We require to use a database. So using dbca i created an Oracle database called orcl.ie.oracle.com
However this seems to either not see it or not connect. Not sure why - see below.
spacewalk-setup --external-oracle
* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection for Oracle backend.
Global Database Name or SID (requires tnsnames.ora)? orcl.ie.oracle.com
Database hostname [localhost]?
Database (listener) port [1521]?
*** Database connection error: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)
Global Database Name or SID (requires tnsnames.ora)?
From feedback, here is output of lsnctl stat
[root#dub-mgrfarm113 dbhome_1]# pwd
/opt/oracle/product/19c/dbhome_1
[root#dub-mgrfarm113 dbhome_1]# echo $ORACLE_HOME
/opt/oracle/product/19c/dbhome_1/
[root#dub-mgrfarm113 dbhome_1]# echo $PATH
[oracle#dub-mgrfarm113 oracle]$ ./product/19c/dbhome_1/bin/lsnrctl stat
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 14-NOV-2019 11:16:45
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Message 1053 not found; No message file for product=network, facility=TNSTNS-12541: Message 12541 not found; No message file for product=network, facility=TNS
TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
TNS-00511: Message 511 not found; No message file for product=network, facility=TNS
Linux Error: 111: Connection refused

can you post what the following command gives on your server:
lsnrctl stat
(started connected as the user who owns the oracle installation, and after initializing your env to use the database installation, i.e. correct ORACLE_HOME and PATH)
UPDATE (Using this as I cannot yet comment on posts):
You show the ORACLE_HOME var from root, then you execute lsnrctl as 'oracle'. The fact that you had to use the full path to start lsnrctl indicates that your env is not properly set).
Please connect as 'oracle', then do (and enter the db name when asked for):
. oraenv
then run the lsnrctl command

Related

RAD Server Lite does not install on Linux

When installing Delphi RAD Server Lite on Linux CentOS 7 (RH 7 like), I get an error:
[FireDAC][Phys][IB]-314. Cannot load vendor library [libgds.so or libibtogo.so]
Steps taken :
Installed Delphi 11.2 on Windows 10 machine --> OK
Configured PAServer for Linux CentOS 7 -- > OK
Copied EMS files
from C:\Program Files (x86)\Embarcadero\Studio\22.0\EMSServer
to Linux server and run sudo ./ems_install --> OK
Copied Interbase IBToGo files from
C:\Users\Public\Documents\Embarcadero\Interbase\redist\InterBase2020\linux64_togo to Linux server /usr/lib/ems/ --> OK
Downloaded RAD Server Lite license from
https://reg.embarcadero.com/srs6/promotion.jsp?promoId=572 --> OK
Copied license file to Linux server /usr/lib/ems/interbase/license --> OK
Started EMS server, first time run for setup, in Linux server
sudo ./EMSDevServerCommand -setup ===> FAILED !!
After confirming the questions, the final result was an error message and EMSServer was not installed properly, see the results of ./EMSDevServerCommand :
>start
EMS server configuration file not found. Run the configuration wizard?(y)
Set up Options
Server Instance ()?
DB file name (emsserver.ib)?
DB file directory (/usr/lib/ems)?
Sample data(y)
Console User (consoleuser)?
Console Password (consolepass)?
----------------------------
Set up Options
Server Instance: <default>
DB file name: emsserver.ib
DB file directory: /usr/lib/ems
Sample data: True
Console User: consoleuser
Console Password: consolepass
DB file: /usr/lib/ems/emsserver.ib
Configuration file: /etc/ems/emsserver.ini
----------------------------
- Continue with these options?(y)
- An error occurred when trying to load your InterBase license. Verify that you have entered
valid connection parameters for the new database. Also verify that the Interbase server
instance is running. [FireDAC][Phys][IB]-314. Cannot load vendor library [libgds.so or
libibtogo.so]. Hint: check it is in the PATH or application EXE directories, and has x64
bitness.
I had the same problem. I have done the following and it has been solved:
cd /etc/ld.so.conf.d/
sudo nano interbase.conf
add the line --> /opt/interbase/lib
sudo ldconfig

No passwd entry for user 'mssql' sqlsrv on Linux

I use the mcr.microsoft.com/mssql/server:2017 docker container to run a mssql server. I tried to change the collation like this:
echo "SQL_Latin1_General_CP1_CI_AS" | /opt/mssql/bin/mssql-conf set-collation
Unfortunately I get this error:
No passwd entry for user 'mssql'
How is it possible to fix this error?
I created a new user with useradd mssql, but now I get this error if I run the command:
sqlservr: Unable to open /var/opt/mssql/.system/instance_id: File: pal.cpp:566 [Status: 0xC0000022 Access Denied errno = 0xD(13) Permission denied]
/opt/mssql/bin/sqlservr: PAL initialization failed. Error: 101
It looks the latest mcr.microsoft.com/mssql/server fix such issue, if you insist on the old, next could be the procedure to fix all user/permission issue:
cake#cake:~/20211012$ docker run --rm -it mcr.microsoft.com/mssql/server:2017-latest /bin/bash
SQL Server 2019 will run as non-root by default.
This container is running as user root.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
root#4fd0bdf1d21c:/# useradd mssql
root#4fd0bdf1d21c:/# mkdir -p /var/opt/mssql
root#4fd0bdf1d21c:/# chmod -R 777 /var/opt/mssql
root#4fd0bdf1d21c:/# echo "SQL_Latin1_General_CP1_CI_AS" | /opt/mssql/bin/mssql-conf set-collation
Enter the collation: Configuring SQL Server...
The SQL Server End-User License Agreement (EULA) must be accepted before SQL
Server can start. The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388.
You can accept the EULA by specifying the --accept-eula command line option,
setting the ACCEPT_EULA environment variable, or using the mssql-conf tool.

error running run file in centOS - bad display

I have a task to install Oracle 11g on a centOS 8 using VM (i'm new to linux / oracle).
I downloaded the Oracle files and unzipped them, then I tried to ./runInstaller but I get an error and this is the full terminal with error:
login as: admin
admin#192.168.163.129's password:
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Thu May 21 09:26:48 2020 from 192.168.163.1
[admin#oracledb ~]$ cd Downloads
[admin#oracledb Downloads]$ cd database
[admin#oracledb database]$ ls
doc linux.x64_11gR2_database_1of2 response runInstaller stage
install linux.x64_11gR2_database_2of2 rpm sshsetup welcome.html
[admin#oracledb database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 2027 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1759 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Continue? (y/n) [n] y
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-05-21_09-43-58AM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% <full path to xclock.. see below>
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for xclock: /usr/X11R6/bin/xclock
[admin#oracledb database]$
I am using putty and Xming but I still get this error.
Make sure your putty session is connecting with "x-11 port forwarding"
Be sure after you set this that you scroll back up to 'Session' and then 'save'

Not able to connect postgresql with odoo

I configured odoo in aws ec2 and connecting Postgresql from rds when I run the command ./odoo-bin --config=/etc/odoo.conf and try to access from a browser, I'm getting the following error:
ERROR odoo_db odoo.modules.loading: Database odoo_db not initialized, you can force it with `-i base`
File "/opt/odoo/odoo/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'ir.http' - - -
and also I'm getting this error as well:
STATEMENT: SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR odoo_db odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR: relation "ir_module_module" does not exist
In command line run:
./odoo-bin --addons-path=addons --database=odoo --db_user=odoo --db_password=odoo --db_host=localhost --db_port=5432 -i INIT
explicitly give db name, user and password, "-i INIT" option initialises the odoo database
The first glance issue is though the DB has created in Postgres but it has not the required odoo related setup records i.e. base setup. You can verify by directly accessing the DB and see the number of tables or browsing some tables.
It happens sometimes that you create the DB [specifically giving similar DB names as you have already created before and deleted later [its dropped from PG but still has traces in session or DB location path], it will not get initialized properly.
Solution:
Create sample DB with different name initial 4 characters different completely and check
Initialize the DB from odoo.conf file add db_name = < Your DB Name > {for experiment purpose put completely different name} and restart odoo services and check
Hope it will help. Njoy troubleshooting!
First do what #FaisalAnsari says in here (what I reference below):
*
Go to RDS and create a database in PostgreSQL and configure the
server.conf file as the given below.
;This is the password that allows database operations:
;admin_passwd = admin
db_host = rds_endpoint (after creating database you will get
rds_endpoint)
db_port = False
db_user = "user name which is created by you to the database"
db_password = "password which is created"
;addons_path =
/home/deadpool/workspace/odoo_13_community/custom_addons,
/home/deadpool/workspace/odoo_13_community/custom_addons
Then go to the command line and do the following.
Stop your odoo instance
~$ service odoo stop
Enable command line for the user odoo
~$ chsh -s /bin/bash odoo
execute odoo from command line as user odoo
~$ runuser -l odoo -c "odoo -i base -d YourRDSDatabase --db_host YourAmazonRDSHost.Address.rds.amazonaws.com -r YourRDSDatabaseUserName -w YourRDSDatabasePassword --stop-after-init"
After the initialization finished, start odoo service
~$ service odoo start
Troubleshooting :
if odoo doesn't start correctly make sure that the database user in your RDS instance have privileges at least on the database you are using.
~$ psql --host=YourAmazonRDSHost.Address.rds.amazonaws.com --port=5432 --username=YourRDSDatabaseUserName --password --dbname=YourRDSDatabase
and when you are inside postgresql type the following:
~$ grant all privileges on database YourRDSDatabase to YourRDSDatabaseUserName;
~$ \q
and try again from step 3.
Hope that Helps!!

error running `sqlplus` as user `oracle`

Im trying to run sqlplus from user oracle in linux, but i only get the following error.
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[ sqlplus ] completed with error code: 1
I have tried to run ./oracle_env.sh as user oracle and have tried it as user root as-well, but when I run the sqlplus / as sysdba command logged in as user oracle I get the above message.
Did I miss something, am I on completely the wrong track?
Here is a full output that I used/got.
`su - oracle
cd /u01/app/oracle/product/11.2.0/xe/bin
./oracle_env.sh
sqlplus / as sysdba`
If /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh sets your ORACLE_HOME, and ORACLE_SID environment variables, you need to "source" it invoking it in the current environment) using the "dot" prefix:
. ./oracle_env.sh
In any case, looks like your environment variables (including LD_LIBRARY_PATH) may not be set correctly.

Resources