Thursday, May 14, 2015

Oracle Reports Server showing 'REP-56040: Server rep_server_name2 already exists in the network'

Not really a DBA thing in my opinion, but when you're sat in the seat anything that's broken and has the word 'Oracle' in it eventually gets sent to you.

So it was with this. A user was unable to log into a Reports server, and the admin was getting the message

REP-56040: Server rep_server_name2 already exists in the network

I had a poke around Google and found a couple of things.

First, the admin was sure that there wasn't another Reports server running with this name - it was tied to the host name and there was only one of those.

So, log on to the reports server host.

Checking the status:

$ ./opmnctl status

Processes in Instance: site.rep_server_name_host
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
LogLoader          | logloaderd         |     N/A | Down
dcm-daemon         | dcm-daemon         |   25442 | Alive
OC4J               | home               |   25152 | Alive
OC4J               | OC4J_Portal        |   25153 | Alive
OC4J               | OC4J_BI_Forms      |   25155 | Alive
WebCache           | WebCache           |   25144 | Alive
WebCache           | WebCacheAdmin      |   25145 | Alive
HTTP_Server        | HTTP_Server        |   25146 | Alive
Discoverer         | ServicesStatus     |   25147 | Alive
Discoverer         | PreferenceServer   |   25148 | Alive
wireless           | performance_server |   25174 | Alive
wireless           | messaging_server   |   25175 | Alive
wireless           | OC4J_Wireless      |   25176 | Alive
DSA                | DSA                |     N/A | Down
rep_server_name1   | ReportsServer      |   25231 | Alive

rep_server_name2   | ReportsServer      |   25345 | Alive

So it thinks it's running here.

Next place to look was the logs. The log files (for my install, yours may be different) were in the $ORACLE_HOME/opmn/logs folder on the host.

There were 2 Reports servers running on the host, which allowed me to compare them to see if there was a difference. Turns out there was.

This was from the working log:

15/05/06 05:54:02 Start process
--------

--------
15/05/06 15:37:19 Stop process
--------

--------
15/05/06 15:49:23 Start process
--------


This was from the broken one:

15/05/06 15:49:23 Start process
--------

--------
15/05/06 15:49:31 Start process
--------

--------
15/05/06 15:49:39 Start process
--------


Hmm - no stop process.

I then found a command that shows the servers that are running:

$rwdiag.sh -find rep_server_name2

Broadcast mechanism used to locate servers
------------------------------------------
Channel address = 123.4.5.6
Channel port    = 1234

'rep_server_name2' found in the network

Time taken - 55 milliseconds

Name = rep_server_name2 :Type = server : Host = rep_server_name_host


So, this shows that the Reports server is only running on the one host (and so the 'already exists in the network' is a red herring).

So, the next thing I tried was to stop just this Server:

$ cd $ORACLE_HOME/opmn/bin

$ ./opmnctl stopproc ias-component=rep_server_name2
opmnctl: stopping opmn managed processes...
================================================================================
opmn id=rep_server_name_host:6201
    no processes matched this request


Ah. OPMN thinks it's not running. Let's check.

$ ps -ef | grep rep_server_name2
  oracle 27093 24539   0 16:15:27 pts/2       0:00 grep rep_server_name2
  oracle 15311 15310   0   May 05 ?           4:13 /usr1/app/oracle/product/OraHome_2/bin/rwserver server=rep_server_name2 batch=yes uid


OK, so there is a process running. Let's kill it.

$ kill 15311

$ ps -ef | grep rep_server_name2
oracle 27131 24539   0 16:16:04 pts/2       0:00 grep  rep_server_name2

Gone.

Check the status again

$ ./opmnctl status

Processes in Instance: site.rep_server_name_host
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
LogLoader          | logloaderd         |     N/A | Down
dcm-daemon         | dcm-daemon         |   25442 | Alive
OC4J               | home               |   25152 | Alive
OC4J               | OC4J_Portal        |   25153 | Alive
OC4J               | OC4J_BI_Forms      |   25155 | Alive
WebCache           | WebCache           |   25144 | Alive
WebCache           | WebCacheAdmin      |   25145 | Alive
HTTP_Server        | HTTP_Server        |   25146 | Alive
Discoverer         | ServicesStatus     |   25147 | Alive
Discoverer         | PreferenceServer   |   25148 | Alive
wireless           | performance_server |   25174 | Alive
wireless           | messaging_server   |   25175 | Alive
wireless           | OC4J_Wireless      |   25176 | Alive
DSA                | DSA                |     N/A | Down
rep_server_name1   | ReportsServer      |   25231 | Alive

rep_server_name2   | ReportsServer      |   N/A   | Down
OK, now it's really gone.

Try restarting it

./opmnctl startproc ias-component=rep_server_name2

Check the status

$ ./opmnctl status

Processes in Instance: site.rep_server_name_host
-------------------+--------------------+---------+---------
ias-component      | process-type       |     pid | status
-------------------+--------------------+---------+---------
LogLoader          | logloaderd         |     N/A | Down
dcm-daemon         | dcm-daemon         |   25442 | Alive
OC4J               | home               |   25152 | Alive
OC4J               | OC4J_Portal        |   25153 | Alive
OC4J               | OC4J_BI_Forms      |   25155 | Alive
WebCache           | WebCache           |   25144 | Alive
WebCache           | WebCacheAdmin      |   25145 | Alive
HTTP_Server        | HTTP_Server        |   25146 | Alive
Discoverer         | ServicesStatus     |   25147 | Alive
Discoverer         | PreferenceServer   |   25148 | Alive
wireless           | performance_server |   25174 | Alive
wireless           | messaging_server   |   25175 | Alive
wireless           | OC4J_Wireless      |   25176 | Alive
DSA                | DSA                |     N/A | Down
rep_server_name1   | ReportsServer      |   25231 | Alive

rep_server_name2   | ReportsServer      |   27345 | Alive
OK, looks good.

The admin tested, and it was now working again.

So, we don't know why it got itself stuck, but the solution was pretty straight-forward once we'd figured out that it wasn't stopping properly.

No comments:

Post a Comment