TNS 12545, 00515 - NOT RUNNING tnslsnr - oracle

I have a linux server with oracle 10 g release 10.1.0.3.0 and an application based on oracle name NMS5ux.
I needed to change its net. settings(ip, D.G.W).
1- So when its oracle and NMS were up, i change net. settings by YAST, but i forget to update /etc/hosts file. May be the fault is that i change them when oracle is started not stoped and i have to update /etc/hosts file but didn't.
The NMS got locked.
2- To solve the condition i revert the changes to original setting by YAST again, but no sesns result, software is liked to be locked.
3- So i log out the application and stop oracle and NMS to get ride of condition.
4- Then i decide to start process, because i think that no problem, i changed back all of settings and i will restart the process. But till now oracle process not start up. I couldn't test NMS start up, because it based on oracle and depended on it.
Here i will send photo of faulty oracle start up process. For comparison i sent the photo of this process when it work correctly.
Refer to TNS 12545, 00515 it seems that it lost the host, but refer to tcp protocol connection it search host by name not ip, and i didn't change name. Off course some where it must take name to address resolution, i check all of tnsnames.ora , listner.ora , sqlnet.ora , non of them has ip address, just in listner.ora ‘HOST’ is introduce by name not ip. I think that resolution is take place in /etc/hosts that i didn't change it.
In report before some number about byte numbers
it show twi SQL line that seems ok, but in RUNNING part show that tnslsnr is NOT RUNNING, and finally show that oracle process check FAILED.
The important thing is that i set back Network settings to origin, so why system didn't go back to normal operation?
I appreciate any advises.

I have checked all of the *.ora files. There isn't any ip address information there.
I concluded that name to address resolution is take place in /etc/hosts file.(there isn't DNS server in our network). And i didn't update it when i change the ip settings. So may be the first hang of server could be normal, but i quickly return them back, so no change in ip address. But why oracle is became faulty till now?
Another question: is it so important to Shutdown oracle when we decide to change network settings?

I just need to change the Net. settings, and just did that change in my server and quickly i change them back to original settings. Means that no changes. But after that i cant start oracle process Any more
In report based on connection protocol ‘tcp’, it seems that HOST is introduce by name not ip, and i didnt nothing with host name.
Is it necessary to check listner.ora and tnsnames.ora that may be they were destroyed?!
I will check them.!
Finally it has been solved. I changed the ip using YAST, but control the /etc/hosts if needed edit manually. Every things went well,
Thanks a lot to EdStevens, his idea about name resolution subject is an important point to break the fault.

Related

What does Oracles 'alter system set local_listener' do exactly

Why I am curious:
I have always had issues when installing an Oracle Express Database. As in I have never had it work right the first time round. The next time I boot my computer after installing Oracle Express I consistently receive the common error:
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
I have managed to fix this issue using various methods however I have learned that the best method that works for me these days is to Reconfigure the Listener using SQL Plus. When the Listener fails SQL Plus is the only way I can connect to the OracleXE Server and after searching the Internet I'm not alone here.
The DDL that fixes this error - run from SQL Plus:
alter system set local_listener='(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))' scope=both;
The Question:
Why does re-configuring the Listener work? What does it do? I monitored my listener.ora file along with my TNSNames.ora file and they remain the same before and after I run the above code. So what did it do?
I read this entire Oracle LISTENER Documentation and I did not come out of it enlightened. Can anyone enlighten me?
Why does re-configuring the Listener work?
You are not reconfiguring the listener. That's why you don't see the listener configuration file change. You are changing the database configuration. The spfile is updated because the command you used had scope=both, which means the change is applied immediately - in memory - and written to that file, so it persists on database restart.
From the docs:
LOCAL_LISTENER specifies a network name that resolves to an address or address list of Oracle Net local listeners (that is, listeners that run on the same system as this instance).
and the default is:
(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1521)) where hostname is the network name of the local host.
See also the alter system REGISTER clause:
Specify REGISTER to instruct the PMON background process to register the instance with the listeners immediately. If you do not specify this clause, then registration of the instance does not occur until the next time PMON executes the discovery routine. As a result, clients may not be able to access the services for as long as 60 seconds after the listener is started.
So what this means is that when the database starts, and then periodically, it tries to register its service name(s) with the listener; and it gets the info about the listener from the local_listener parameter. (There's also a remote_listener for data guard, not relevant here.)
Because the default is hostname the PC name is used directly in that parameter, and that will often resolve to the PCs LAN IP address (which can change each reboot to add to the confusion, if the IP is assigned by DHCP), which could be stored instead. If you're lucky the hostname will resolve to the same as localhost, but that isn't the case for you.
So... the database looks up its init parameter, and as a result tries to register with a listener at say 192.168.1.2. But the listener has started on localhost so it is listening on 127.0.0.1. The DB fails to register its service name, as it can't reach a listener; though that is only apparent if you look in the alert log. If you run lsnrctl services it won't show anything.
When you change the init parameter you are telling the DB to try to register against a listener on localhost instead - and as that is where it is actually listening, registration now works, and the listener recognises the service name on subsequent connection attempts. (Your question refers to the error message about SID, which is different, and not solved by your change.) Running lsnrctl services will now show the service name too. But that is a runtime, dynamic thing via the registration - not a change to the permanent configuration of the listener.
It's possible to have the listener listen on more than one address. The main thing is that the listener.ora, tnsnames.ora (if you use TNS aliases) and init parameter use consistent host names or IP addresses, so they are all resolving to and referring to the same thing, whether that is localhost (only reachable from that PC), or a LAN address (reachable across the nwtwork) or both.
You can also have an entry in the tnsnames.ora for the listener itself, rather than just for DBs. You can then use that TNS alias as the local_listener target, instead of spelling put the address and port, possibly making it easier to change later if needed.

How to fetch data from oracle data base from another computer

I am trying to execute one simple desktop application in my system that is built upon java swing.
This application fetches the data from the oracle database which is present in computer A.
I did the development in computer A and built its jar and kept the jar in another system.
I have started all the services of oracle and created an ad hoc network between the two systems, but I am not able to execute the application from another computer. I googled a lot and did the mentioned changes. Still I am getting the same error of TNS listener.
IOException: The network adapter could not establish the connection.
finally I thought to put my code here. please look at the below code:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection =
DriverManager.getConnection("jdbc:oracle:thin:#//xxx.xxx.xxx.xxx:1521/XE"
,"system"
,"system" );
Please help me on this.
I have also tried modifying the tnsnames.ora file but was not helpful. can anybody please help me on this.
Check the listener.ora file - what is the IP address the service is binding to, i.e. what is the IP address specified in this file? If 127.0.0.1, that will explain why it works on Computer A but not B.
If this is the case you should fist stop teh listener service, backup the listener.ora, edit listener.ora, changing the IP address to the appropriate one for Computer A (accessible from Computer B), restart the listener, and retry.
Use tnsping to test the connection works, if you don't have TNS ping you can try "Telnet hostname port" (e.g. telnet computer-A 1521) and if it returns blank screen and flashing cursor on top left then the service is up.

Can't join into a cluster on marklogic

I'm working with marklogic database and I tried to create a cluster.
I already have a development key. The OS is the same in all the nodes (win 7 x64).
When you tried to add a node into the cluster, you need to type the host name or the IP adress. For some reason when I type de host name, marklogic sometimes can't find the node , but that doesn't matter, because with the IP, the connection is successfull.
The main problem is when continues trought the process. At the end when marklogic try to transfer cluster configuration information to the new host, the process never ends and finally a message like "No data received" appear in the web browser.
I know that this message doesnt mean that the process fails, because when I change for example the host name, the same message appear.
So, when I check the summary in the first node, the second node appears, so that means the node "joins" into the cluster, but I'm not able to start the admin interface and always the second node appears disconnected even if I restart the service.
Aditionally, I'm able to make a ping from any computer to another.
I tried to create another network, because in my school some ports are not allowed, furthermore I tried to use different development key and the same key in my nodes too,
and finally I already have all the services enabled, but the problem persist.
Any help or comments would be appreciated.
Make sure ports 7998 - 8003 are open on both computers for both inbound and outbound traffic and that you don't have a firewall (Windows firewall, or iptables) blocking these.
You can also start looking into the Logs/ErrorLog.txt file and see if something obvious shows up.
Stick to IP addresses for now as it seems your DNS isn't fully working.
Your error looks like a kind of networking connectivity problem between the hosts.
Also you might get more detailed, or atleast different, answers from the MarkLogic developer mailing list.
http://developer.marklogic.com/discuss
-David Lee
Make sure the host names in MarkLogic configuration match the DNS names at which the hosts can see each other. If those are unreliable, then simply use IP addresses as host names. Go to the Admin interface on both ends, lookup the host name, change the DNS name into IP name, try again.
Also look at DALDEI's suggestion about ports and firewalls, that could be interfering as well.
HTH!

Hostname Changed after eduroam install and setup

I just set up eduroam on my laptop and this morning when I fired up my terminal, I noticed that my hostname has been changed most probably by the eduroam set up to a new value. Any ideas why or how this happens?
You're going to get a new hostname every time you join a new network (at least potentially). The hostname identifies the computer and is therefore assigned by the network that you connect to. This usually happens as part of DHCP, where you get an IP address and routing information.
This is perfectly normal and nothing to worry about. If you absolutely need a certain hostname, talk to the network administrators.

What could be wrong: ping works fine but tnsping works intermittently

We have oracle 10g running on windows server 2003. A machine which runs an application using that database has as of a few weeks ago suddenly started having connectivity problems. Today we ran the automatic updates for windows server and the problem has only gotten worse. I realize this isn't enough information for anyone to diagnose the problem but perhaps you can get me pointed in the right direction with the following more specific scenario:
From this machine we can ping the server with absolutely no problem and, being physically close and on an intranet the return is very fast.
However, when we run tnsping I have seen 3 different results within a few minutes of each other.
tnsping returns just fine and in a reasonable amount of time
tnsping returns but only after a real long time (several seconds)
tnsping results in an ora-12560 protocol adapter error
At the same time I can tnsping the server from my machine with no problem.
Can anyone point me in the right direction?
I'd try to check the following:
do traceroute from the app server and from your machine check for anything abnormal
check tnsping from various other machine and try to identify a pattern
try a tcp/ip sniffer to see what is going on at both ends of the connection
get oracle support involved
To help eliminate DNS issues from the equation, specify the host's IP address in the TNSNAMES.ora file for your connection instead of a hostname. Are you using DHCP?
Have you eliminated hardware as the problem - have you tried a different NIC?
Before calling Oracle, I would create a trace file for a Fail case.
TNSPING.TRACE_LEVEL
Purpose
Use the parameter TNSPING.TRACE_LEVEL to turn TNSPING utility tracing on, at a specific level, or off.
Default
off
Values
* off: for no trace output
* user: for user trace information
* admin: for administration trace information
* support: for Oracle Support Services trace information
Example
TNSPING.TRACE_LEVEL=admin
Before involving oracle in this issue, get some help from your network administrator for the following test. First enable verbose logging on the database in the listener. Enable logging on the client via sqlnet. Go to the machine that is having trouble with tnsping, have the network administrator run a network tool to trace tcp packets from there. Perform the tnsping and see if what packet are being sent, what dns lookup are being made, what route is being taken. On the database see if the listener actually receives a ping from the client. If not then see where along the network to the database the problem is. Is it nameserver resolution? Is it a bad network cable, bad switch port, etc. Your network admin is your best friend for this problem. Do the same test via sqlplus with a simple connection and see what the client is logging.
Make sure there is no other machine on the network with the same IP address. A method would be unplug your machine from the network and see if you can still ping it. If you can then this is the problem.
If the server doesn't have a domain-name setup at a dns server, then add it's ip address and name to the host file on the server; this (the server not being able to find itself in dns) has been known to cause tns timeouts.

Resources