Shmem problem installing Oracle 12 C on Ubuntu 18.04


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Shmem problem installing Oracle 12 C on Ubuntu 18.04
# 8  
Old 10-01-2018
Hi guys,

I feel you missed the very beginning of my post, perhaps I was not precise enough.

The Software-installer finished. So did the Network Configuration Assistant. Next step is trying to create a database, and here is where I encounter the problem.

ORACLE gui installer tries to bundle everything together, but I gave up on this approach after 1st time and instead installed all _but_ the database, and this was fine.

So when I'm ready to create a database I either start the database creation assistant ./dbca or start sqlplus and try to do it via cli. Firts case freezes after clicking "create database" with message "copying database files", 2nd freezes when I start an instance without mounting a database in order to create one.. (it freezes after SQL> STARTUP NOMOUNT; or rather seems to be doing something forever).

I will try with matching SGA and let you know how it goes.
# 9  
Old 10-01-2018
Quote:
Originally Posted by Marika
Hi,
  • The GUI installer (DBCA) freezes at 2% at "Copying database files.."
Copying database files is not the same as "creating a database".

Is the error above which you posted the precise error / behavior or not?
# 10  
Old 10-01-2018
Quote:
Originally Posted by Peasant
Oracle tends to compile and link, so that could take a while on laptop.
Actually it only links: Oracle has a system user and this user (and its group, more precisely their UID/GID) is linked into the executable when the Oracle binaries are created. This is why you have to do a "relink" when you change that system user with

Code:
cd /$ORACLE_HOME/bin ; ./relink as_installed

You find the binaries under $ORACLE_HOME/install.

Notice that the relinking can cause troubles on some systems with memory constraints. You can patch the mentioned relink-script (its a simple shell-script) in this case. I can't remember what exactly i did ((IIRC it was something about temporary files, but i am not sure about what exactly) but i remember having to do that once and it was quite simple once i found the script itself.

@Neo: when the database (that is: the DB-files, not the DB-software, to be precise the database-instance) is created there are a lot of files copied (empty database files, redo-logs, catalogue files and what not) and i suppose this is what Marika is talking about - not the software (binaries) installation.

@Marika:
Quote:
My settings:

.bashrc

Code:
# Oracle Settings
export TMP=tmp
export TMPDIR=$TMP

This is definitely wrong! It should be:
Code:
# Oracle Settings
export TMP=/tmp

I am not sure how Ubuntu does it, but might it be that /tmp is a "virtual filesystem" and in fact a part of RAM? If so: do yourself a favour, create a real filesystem on disk, mount that under /tmp and make sure it is big enough. Oracle creates some amount of temporary files and it might be that the space is simply too small or (if it is a virtual filesystem) its utilisation puts too much constraints on the RAM.

I hope this helps.

bakunin

Last edited by bakunin; 10-01-2018 at 07:53 AM..
These 2 Users Gave Thanks to bakunin For This Post:
# 11  
Old 10-01-2018
Thanks, i cannot believe i missed that TMP variable export Smilie

But the installer would not run with that kind of definition for sure.
Or would it ?
It would be strange for software not to check if the tmp is actually a directory, among other things.

Would could work (in theory) with that kind of definition, is that if user executed the installer while a tmp directory existed in his current working directory.

It has been some time since i clicked one of those OUI installers tho...

Regards
Peasant.
# 12  
Old 10-07-2018
Hi,

finally go to try again, corrected .bashrc (export TMP=/tmp), set SGA to 8000508 KB to equal swap and PGA to 2GB.

First I tried reinstalling Oracle software completely and starting from scratch. I ran the graphic installer and at the end (at point of database creation), DBCA froze as per usual until I killed the process. Logs:

/oracle/cfgtoollogs/dbca/mgdb7/mgdb7.log

Code:
[ 2018-10-06 22:35:41.646 CEST ] Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 2%
[ 2018-10-06 22:35:46.156 CEST ] ORA-27104: system-defined limits for shared memory was misconfigured
DBCA_PROGRESS : 3%
[ 2018-10-06 22:35:46.156 CEST ] ORA-01034: ORACLE not available
[ 2018-10-06 22:35:47.188 CEST ] ORA-01034: ORACLE not available
[ 2018-10-06 22:35:47.190 CEST ] ORA-01034: ORACLE not available
[ 2018-10-06 22:35:52.346 CEST ] DBCA_PROGRESS : DBCA Operation failed.

/oracle/oraInventory/logs/installActions2018-10-06_10-24-49PM.log

Code:
...
INFO: Read: Copying database files
INFO: Copying database files
WARNING: Skipping line: Copying database files
INFO: Read: 1% complete
WARNING: Skipping line: 1% complete
INFO: Waiting for completion of background operations
...
WARNING: [WARNING] [INS-32091] Software installation was successful. But some configuration assistants failed, were cancelled or skipped.
   ACTION: Refer to the logs or contact Oracle Support Services.
INFO: Advice is WITHDRAW

After googling "ORA-27104: system-defined limits for shared memory was misconfigured" I tried fiddling with shmall and shmmax, but the result is the same: I start ./dbca and the installer stops at 2% and never finishes.

/oracle/cfgtoollogs/dbca/mgdb7$ gedit trace.log_2018-10-07_06-24-46-PM

Code:
...
[Thread-297] [ 2018-10-07 18:48:47.366 CEST ] [OsUtilsBase.copyFile:1582]  **write of file at destination complete...
[Thread-297] [ 2018-10-07 18:48:47.376 CEST ] [OsUtilsBase.copyFile:1617]  **file copy status:= true
[Thread-297] [ 2018-10-07 18:48:47.376 CEST ] [CloneRmanRestoreStep.executeImpl:376]  set _enable_pluggable_database to true
[Thread-297] [ 2018-10-07 18:48:47.378 CEST ] [BasicStep.execute:269]  Executing Step : RMAN_RESTORE_FROM_OFFLINE_BACKUP, Try count: 1
[Thread-297] [ 2018-10-07 18:48:47.379 CEST ] [BasicStep.configureSettings:383]  messageHandler being set=null
[Thread-297] [ 2018-10-07 18:48:47.379 CEST ] [Host.getRMANConnectionInfo:1239]  Connect to Instance mgdb7

/oracle/cfgtoollogs/dbca/mgdb7/DBDetails.log

Code:
...
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0

---------

Advice?

------ Post updated at 05:35 PM ------

And finally I can post links, so here are the complete logs: Dropbox - logs.7z + Screenshots Dropbox - screenshots.7z

Last edited by Marika; 10-07-2018 at 02:41 PM..
# 13  
Old 10-08-2018
Quote:
Originally Posted by Marika
Advice?
At the danger of disappointing you: not yet. This looks like an interesting problem (in other words: you did nothing obvious wrong but it still doesn't work, so some culprit must exist but we don't know what it is) and it is time for serious debugging,

First, i googled the problem too and everywhere shared memory was mentioned. Have you had a look at the shared memory segments? You can do that with the ipcs command. See the man page for details. If a process crashes it happens that shared memory segments allocated by that process remain allocated but are in fact unusable. In such a case you need to manually remove them (otherwise your memory is made smaller effectively) or reboot, which also gets rid of them.

I also found this link which seems to be quite similar to your problem. Did you increase shared memory in the way the guy suggested? I also found this link effectively saying the same thing.

Another thing i remembered: Oracle has 2 settings: SGA_TARGET and SGA_MAXSIZE. You need to set both of them.

I hope this helps.

bakunin
# 14  
Old 10-08-2018
Hi bakunin,

many thanks for your reply!

Ad. shmall & shmax

The first link you mention - yes, I tried it, and a few other combinations of shmall & shmax, still not quite sure what is correct. Tested values:

Calculated by script from here:

Code:
kernel.shmmax = 8367513600
kernel.shmall = 2042850

Calculated by hand as instructed here:

Code:
kernel.shmmax = 8367519744
kernel.shmall = 1634281

Tried also this:

Code:
kernel.shmmax = 17179869184
kernel.shmall = 4194304

Following your link:

Code:
kernel.shmall = 9272480

Tried Oracle:

Code:
kernel.shmmax = MemTotal 16342812 kB * 1024 = 16735039488 bytes
kernel.shmall = MemTotal 16342812 kB * 1024 * 0,4 / 4096 (page size) = 10214258 pages (???)

this didn't seem right, so I used this for shmall (assuming I wat to give 8GB):

Code:
kernel.shmall = 8 * 1024 * 1024 * 1024 ) / 4096 = 2097152 pages

Every source gives me another recommendation, none worked so far.

SGA_TARGET & SGA_MAX_SIZE

I was setting SGA target (to match swap of 8000508 kB), during installation process in DBCA , I can see in the logs that this was picked up:

Code:
--------------------------------------------------------------------------------
Initialization Parameters
--------------------------------------------------------------------------------

- audit_file_dest : {ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump
- audit_trail : db
- compatible : 12.2.0
- control_files : ("{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl", "{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control02.ctl")
- db_block_size : 8192 BYTES
- db_name : mgdb7
- diagnostic_dest : {ORACLE_BASE}
- dispatchers : (PROTOCOL=TCP) (SERVICE=mgdb7XDB)
- local_listener : LISTENER_MGDB7
- nls_language : POLISH
- nls_territory : POLAND
- open_cursors : 300
- pga_aggregate_target : 2 GB
- processes : 640
- remote_login_passwordfile : EXCLUSIVE
- sga_target : 7812 MB
- undo_tablespace : UNDOTBS1

As for SGA_MAX_SIZE, according to this page it's for 10g only. But this time I did try setting MEMORY_MAX_TARGET, which was 0 by default.

During this attempt:
=============

kernel.shmmax = 16735039488
kernel.shmall = 2097152

001.png
002.png
003.png
004.png

So I check memory:

Code:
oracle@hyperbook-N650DU:/oracle/product/12/db_1/bin$ ipcs --human

------ Message Queues --------
key        msqid      owner      perms      size         messages    

------ Shared Memory Segments --------
key        shmid      owner      perms      size       nattch     status      
0x00000000 262144     oracle     600          128M     2          dest         
0x00000000 360449     oracle     600          512K     2          dest         
0x00000000 1114114    oracle     600          8,4M     2                       
0x00000000 491523     oracle     600          512K     2          dest         
0x00000000 524292     oracle     600          512K     2          dest         
0x00000000 557061     oracle     600          512K     2          dest         
0x00000000 1081350    oracle     600         82,8K     2          dest         
0x00000000 1146887    oracle     600          7,6G     1                       
0x00000000 1179656    oracle     600          7,6M     1                       
0x391430c8 1212425    oracle     600           36K     1                       

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x9d5ea68c 98304      oracle     600        161       
0x9d5ea68d 131073     oracle     600        161       
0x9d5ea68e 163842     oracle     600        161       
0x9d5ea68f 196611     oracle     600        161       
0x9d5ea690 229380     oracle     600        161

Code:
oracle@hyperbook-N650DU:/oracle/product/12/db_1/bin$ free --mega
              total        used        free      shared  buff/cache   available
Mem:          16342        1595       12378         750        2368       13690
Swap:          8000           0        8000

Code:
oracle@hyperbook-N650DU:/oracle/product/12/db_1/bin$ cat /proc/meminfo
MemTotal:       16342812 kB
MemFree:        12371256 kB
MemAvailable:   13683224 kB
Buffers:          125812 kB
Cached:          2148640 kB
SwapCached:            0 kB
Active:          1724356 kB
Inactive:        1865320 kB
Active(anon):    1316344 kB
Inactive(anon):   754572 kB
Active(file):     408012 kB
Inactive(file):  1110748 kB
Unevictable:          16 kB
Mlocked:              16 kB
SwapTotal:       8000508 kB
SwapFree:        8000508 kB
Dirty:               100 kB
Writeback:             0 kB
AnonPages:       1315248 kB
Mapped:           807964 kB
Shmem:            755696 kB
Slab:             224248 kB
SReclaimable:      99952 kB
SUnreclaim:       124296 kB
KernelStack:       11888 kB
PageTables:        45148 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    16171912 kB
Committed_AS:   14328444 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      237476 kB
DirectMap2M:     4923392 kB
DirectMap1G:    11534336 kB

Logs not very helpful:

/oracle/cfgtoollogs/dbca/trace.log_2018-10-08_01-28-13-PM

/oracle/cfgtoollogs/dbca/mgdb7/trace.log_2018-10-08_01-28-13-PM

-----

Can you help interpret these results? Is Oracle getting the 8GB of memory or not?

Many thanks for any effort Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Ubuntu / PERL ]Problem installing WWW::Mechanize mod

Hello everyone, I've got some problem intalling a perl module. The installation is well done as you can see below. gueg@ux31:~$ sudo apt-get install libwww-mechanize-perl Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état...... (4 Replies)
Discussion started by: tot94
4 Replies

2. Ubuntu

Downloading and installing (new to Ubuntu OS)

I've done a whole days work of researching how to install a program on ubuntu.. so first I downloaded python.. unpackaged it from .tar.xz now its just python-3.4.2 then I navigated to the dir in terminal.. then ran the ./configure make make test sudo make install commands which took like 10 minutes... (2 Replies)
Discussion started by: Marniwild
2 Replies

3. Solaris

Problem Installing Oracle 8i

System Model and Spec Sun Enterprise 420R Processor Speed: 450 MHz (4 processors) Installed RAM: 4 GB Os: Solaris 8 Sparc I successfully installed standard oracle 8i setup on our database server specs above but after installation was competed and it went to creating database I got the... (2 Replies)
Discussion started by: Wpgn
2 Replies

4. Ubuntu

Installing latest Ubuntu on my desktop

I wish to install the latest ubuntu on my desktop. How do I go about doing this ? Also how do I create the superuser or admin once the installation is done ? (3 Replies)
Discussion started by: sundaresh
3 Replies

5. Ubuntu

Installing Ubuntu

Hi all- I'm getting ready to install Ubuntu onto my Sony Vaio laptop and had a few questions for which I have not yet found the answer. 1)Should I partition my hdd myself (including a swap partition) in Windows or should I do this when installing Ubuntu? When I do partition, since I have over... (2 Replies)
Discussion started by: Gatsby
2 Replies

6. Ubuntu

Grub rescue problem after installing ubuntu 10.04 amd64 after i386

Hi all, I have Windows XP dual boot with Ubuntu 8.10 on my system. I brought in a portable HDD on which I installed Ubuntu 10.04 32-bit. The grub boot loader was installed along with this and to boot windows, I've had to plug in the HDD (with lucid install) everytime. It had been working fine.... (0 Replies)
Discussion started by: morningSunshine
0 Replies

7. Ubuntu

Installation issue while installing ubuntu

Hi All As i m trying to install ubuntu on my virtual PC where h/w confg is as 5GB didk n 512 mb RAm. after selecting mode option, and after pressing F6 after that screen shows some msg. And not goes to next step. What is the problem n wht i shall do?? Please provide me solution (3 Replies)
Discussion started by: sunray
3 Replies

8. Windows & DOS: Issues & Discussions

Installing Ubuntu in the same partition as Vista

Hi , I hav a laptop with Vista, i need to install Ubuntu along with vista on it. But the problem is tht i donot hav a hard drive partition. though i have abt 70 gb of free space. the only other partition is "recovery" one, so i cnt play with it how shld i perform the installation ?? (4 Replies)
Discussion started by: akshay61286
4 Replies

9. Ubuntu

installing hula on ubuntu

i trying to install hula onto my ubuntu but it seems to be not working. i follow through every instructions which i found from the net but is still not working. As i have already install allthe necessary dependency! Below are all the dependency i have install: debhelper (>= 4.0.0),... (0 Replies)
Discussion started by: thms_sum
0 Replies
Login or Register to Ask a Question