torstai 6. joulukuuta 2012
Part 8. Creating listener with Netca
Creating listener with netca command.
(note: I accidentally deleted this page in blogger and there seems to be no way to recover deleted pages so I had to re-create it again...)
The netca command is installed to the bin directory where the db software is. In my environment it is at:
You need to be as user oracle and at the root directory run the command:
This will set necessary environment variables for you.
I ran netca command and got a fairly strange error message.
[oracle@localhost database]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/bin/
[oracle@localhost bin]$ ./netca
Oracle Net Services Configuration:
# An unexpected error has been detected by HotSpot Virtual Machine:
# SIGSEGV (0xb) at pc=0x00002aaab70349f1, pid=12779, tid=47281788116640
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_17-b03 mixed mode)
# Problematic frame:
# C [libclntsh.so.11.1+0x62a9f1] snlinGetAddrInfo+0x1b1
# An error report file with more information is saved as hs_err_pid12779.log
# If you would like to submit a bug report, please visit:
./netca: line 178: 12779 Aborted $JRE $JRE_OPTIONS -classpath $CLASSPATH oracle.net.ca.NetCA $*
Finally after googling around I solved the problem. It seemed that my machine that I got from a premade image had no hostname. Don’t really know why not, but I added hostname to file in /etc/sysconfig/network
And I added it to the /etc/hosts file. I called my machine soaserver.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost soaserver.localdomain soaserver
::1 localhost6.localdomain6 localhost6
After these changes I needed to reboot for them to take effect.
#reboot After this netca worked and created the listener process for me
I had at some point a typing error for the server name in /etc/hosts. This resulted in a cryptic message where netca told that the port 1521 is already in use and listener will not work. When the hostname was corrected, everything worked perfectly.