Debugging of Oracle ERP Applications are dangerous to do on production servers. Thus, Oracle testing environments are pretty important for system administrator work. A separate clone Oracle database server with Oracle ERP Application running is a must for worry free debugging and testing. At work RedHat Enterprise Linux kernel version 2.4.9-e.62 host both the Oracle Database and Oracle ERP Application. Recently, we’ve copied the Oracle database and ERP Application from a Linux box to a virtual container for testing.
The copy process using rsync went smooth. We’re confident that everything would work perfectly fine as it’s a clone of the production system. After changing some basic things like hostname, listener.ora and tnsnames.ora file; I was surprised to encounter the message Oracle TNS-12541: TNS:no listener and TNS-12560: TNS:protocol adapter error when running the listener. TNSPING returns also the no listener error.
I am pretty sure to cover the basic configuration and to make things complicated is the Linux Error: 111: Connection refused. I did several check on hostname, iptables and other related stuff, but could not find the solution. Comparing the files between production and clone have shown the problem. The cause is not even close with network connectivity, but with Oracle failing to create temporary files.
In the cloning process the copying of Linux /var/ folder was skipped as the system usually recreates the entries during start. Well, anyway, the error was traced to the missing Oracle temporary file folder /var/tmp/.Oracle. I am not sure what is the connection here, but creating the /var/tmp/.Oracle folder with the Oracle system user right have solved the issue of TNS-12541: TNS:no listener and TNS-12560: TNS:protocol adapter error.