Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Find server which is servicing the request

User_19BPUNov 28 2016 — edited Dec 5 2016

Hi,

I have 5 Prod servers which are clustered, hence the request may go to any of the Prod servers based on the load balancing setup, there are cases we found that a particular service say customer service is up and running in server 1,2, 3 but it is down in server 4 & 5. In such case the if request hits either server 4 or 5 , the request is not processed and we are getting an error stating the customer service is down in the respective server logs in this case it is in server 4 logs. Now I want to send an email to respective user via Java application when the service is down in any one of the 5 servers for which the request is send? how I can use the java code to find the request is send to which server? and how I can get the server name/IP address which is not able to service the request because the respective customer service is down.

Thanks

Comments

[Deleted User]

Hi,

It's sad, and some people won't want to hear it...
But the pre-installation check is a disaster, totally inadequate and misleading.
Especially for computers running in a company network (domain, central administration) (central administration)


We can only hope that people will try harder for a 20XE...

I'm sorry, that doesn't help you, but I had to get rid of it one more time...

Regards

Andre

JJJameson

@andremi, based on my experience, it's hard to argue with your position.  That said, I'm still looking for a solution and welcome any comments or ideas.  Thanks!

Dude!

However, when I attempted to connect via SQL*Plus from a command line, I received an "ORA-12560: TNS:protocol adapter error."

You need to be more specific. Where are you connecting from? the same machine, another machine? How are you connecting, what is your connect string? Is your firewall configured? What is your TCP/IP configuration? Is the database up and running? How did you come up with the hostname in your listener configuration?

JJJameson

@Dude! Thanks for the response. Here are the answers to your questions, to be best of my ability:

This is all taking place on my laptop; there are no other machines involved. To connect, I followed the instructions in chapter 6 of the "Installation Guide for Microsoft Windows," specifically:

cd <oracle_home>\bin

sqlplus / as sysdba

Here's what that looks like on my laptop:

pastedImage_1.png

I initially assumed that the database would be up post-installation because of the order of instructions in the installation guide. As it turns out this error was just a symptom of the real problem, namely that the OracleXEService is missing. Because that service is missing, I can't bring the database up.

Network

The network is my private, secured home wireless network. I'm running Norton 360 on the laptop.

Under Wi-Fi Properties I have (among others) the following checked:

 "Client for Microsoft Networks"

 "File and Printer Sharing for Microsoft Networks"

I'm obtaining my IP address automatically.

DHCP is enabled.

NetBIOS is set to "Default"

The hostname in the listener configuration is the name of my laptop:

pastedImage_5.png

Thanks again for taking a look. If there's anything else I can share please advise.

-JJ

Dude!

The Oracle net listener is involved when you make a TCP/IP connection. TNS or tnsnames is similar to DNS to translate your connect string to an appropriate Oracle net listener service and host name. You can also try EZconnect (https://www.orafaq.com/wiki/EZCONNECT ) to connect to the database, hence bypassing tnsnames.

"sqlplus / as sysdba"

This connects to the the database using OS authentication and inter-process communication (IPC), also known as the Oracle Bequeath protocol, to connect to the database. No TCP/IP or network involved here.

I suppose the problem is that you do not have the ORACLE_SID variable setup or setup correctly, and/or use the wrong OS user account.

Dude!

The devicename is your Windows computer name that comes into play when you use Windows Networking.

What do you receive when you open a command prompt and type, e.g.;

ping tma-asus-laptop-uc4u601

Does this work?

L. Fernigrini

The problem is there is no XE Service for the DB, that probably means the XE installation did not finished OK...

JJJameson

@Dude!, the ping does return results, showing the "local link IPV6 Address" of my laptop:

Laptop ping.PNG

pastedImage_1.png

I did not set an ORACLE_SID, ORACLE_HOME, or TNS_ADMIN environmental variable as the installation instructions did not specify to do so. What would the "right" ORACLE_SID be?

Is it possible for me to connect to SQL*Plus without the OracleXEService? From what I've read, the database won't start without that service, so I've been assuming that my problem is that the service did not get installed during the installation process, not that I have some other connectivity issue. Is that a correct line of thinking or am I misunderstanding something?

JJJameson

@L. Fernigrini, that is my thought as well.  Unfortunately I've tried the install twice now, and both times it has reported that it succeeded (see image in my original post).  Is there perhaps something about my environment that's preventing the installation of that service?  I've looked through the installation logs but I don't see anything obvious.  However they are rather large and I may be missing something.  Any ideas on whether there is something specific I should be looking for?

Thanks!

Dude!

You should be able to connect using "sqlplus / as sysdba". Again, "/ as sysdba" uses OS authentication and works using IPC and does not use or need the Net Listener. However, you need an account with the right privileges that belongs to the OSDBA system group. Under Windows  this is the "ORA_DBA" system groups, which is hard-coded in the Oracle server binary.

https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinw/connecting-oracle-database-xe.html

You may not need ORACLE_SID under Windows, which starts the database using ORACLE.EXE and XE as a parameter.

The database does not need to be running to connect locally. You can start and stop the XE database using sqllplus.

https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinw/starting-and-stopping-oracle-database-xe.html#GUID-8…

Your installation screenshot shows "localhost", but no "localhost" is in your net listener. Your database isn't running, which would otherwise register a service with LISTENER.

Have you seen the following post about a Windows security patch that causes the TNS-12560 problem:

L. Fernigrini

I have both 18c XE and a 19c instance installed on my PC, and both of them appear on services:

pastedImage_0.png

Since you do not have the service, that is a sign that the installation process went wrong.

You will need to fix the install process (I do not know how to help with that) and then you should be able to connect with no issues :-).

JJJameson

@!Dude,

I did not realize that I do not need to be connected.to the database to get into SQL*Plus so thanks for highlighting that.  Still, the way I read the chapter 6 documentation is that I do not have to adjust any user properties or permissions; that Oracle will do that on installation.  When you say I need an account with the right privileges that belongs to the OSDBA system group, are you suggesting that I need to create a new user account and assign it to that group?  The only information I can find on the OSDBA group is specific to linux and AIX systems .  My installations have been done under my Microsoft user account, which is how I login to my machine.  That account is an administrator on my machine.

In both installation attempts I have right-clicked on the setup.exe file and "Run as administrator."  The post you referred to that mentions a windows patch doesn't provide any specifics on what that patch is.  In upgrading my laptop to Windows 10 Pro prior to the XE installation attempts I did update it to the latest version of Windows 10.  But without any further clarity on which patch and some corroborating evidence that there really is a problem I'm reluctant to start removing patches.

I see what you mean about the success banner referencing localhost, but no localhost being referenced in the listener.  However I'm not sure what action to take with regard to that, if any.  My belief is that the reason my database isn't running is because the OracleXEService does not exist.  Does that sound right?

I will attempt another uninstall/install cycle as soon as I can dedicate some time to it.  If there's anything you think I should change prior to the next install please spell out your recommended changes for me clearly so that I can implement them precisely and correctly.  I appreciate your input.

Thanks again.

JJJameson

@ L. Fernigrini, as I just indicated to @Dude! I will be attempting another install as soon as I get some time to dedicate to it.  I believe this whole thing comes down to a bad installation.  Thanks for your input.

JJJameson
Answer

@Dude!, @L. Fernigrini, and anyone else who's been watching this post (or who might come across it with a similar issue in the future),

After a couple more unsuccessful attempts to install Oracle XE I thought as a last-ditch effort I would try replacing the installation source file (OracleXE184_Win64.zip). I deleted the one I had downloaded last Friday, which I'd been using over and over, and downloaded a new one, this time using the new version of Microsoft Edge instead of Firefox, which I had used for the original download. The subsequent installation took a lot longer than all previous tries (in excess of 20 minutes), and when it was done, I had six Oracle services instead of just the two I'd had before:

Oracle Services.PNG

I'm able to logon to SQL*Plus without a problem now and at this point am positioned to proceed with my original project.

I did verify the original file (and the second one) against the sha256sum provided by Oracle, and both matched their key value. So...it's hard to say exactly what went wrong, but apparently there was something amiss in the original file. At any rate I'm considering this complete.

Thanks for all your help - I truly appreciate that you would choose to spend you valuable time to help me.

Marked as Answer by JJJameson · Jun 29 2020
L. Fernigrini

Glad to know that the issue is fixed! It is really strange, since the sha256 checksum matched.... but you never know!

Dude!

I did verify the original file (and the second one) against the sha256sum provided by Oracle, and both matched their key value.  So...it's hard to say exactly what went wrong, but apparently there was something amiss in the original file.

How can there possibly be something wrong when the checksum matches? If you also installed it the same way.... I guess it's mission impossible to find two identical MS Windows installations.

user603182

I know it's an old post, but I have exactly the same issue: OracleXEService is missing and never get installed, even if installation seems OK. It was all working untill I uninstalled it to change installation directory (hard disk space was limited): only recovery service and listener service get installed. It's about 2 days of frustrating tries, but without success. It seems that the uninstaller does not uninstall all required entries. How can I solve this issue?

User_H93H2

@brasioridens I think this is something @sdinesh needs to look into and fix this as many of us are facing the same issue with this version. #oracle please provide some insight on how to fix this issue.

JJJameson

@user603182, based on my experience, if you don't have all the services installed after your installation, you don't have a good installation, even if it seemed to complete without errors. In my case there was apparently something wrong with the zip file, even though it appeared sound. I used a different browser to download a new copy of the file. Using the new zip file I got a good installation and from that point forward didn't have any issues. Oracle did seem to leave bits and pieces of itself on my system after uninstalling, but I don't think that was really the problem, because even after cleaning them up manually I had the same problem until I got a good zip file.

user603182

I came across a solution, following Manish Sharma video on https://www.youtube.com/watch?v=V4mOL5o_o68
, but adding 2 point (without them it did not work for me). This is what I did:

  1. Uninstall Oracle 18c Express (Control Panel > Programs > Programs and Features > Press and hold (or right-click) on Oracle 18c Express app)
  2. Remove all Oracle 18c environment variables: Right-click on My Computer > Properties > Go to the Advanced system settings tab > Click the Environment Variables button. The Environment Variables dialog opens. Click on System variables > Path and delete the Oracle installation path , that you choose when you installed Oracle 18c Express, from the list (example c:\app\yourname\Oracle\...)
  3. Open windows registry (In the search box on the taskbar, type regedit, then select Registry Editor (Desktop app) from the results):
    From HKEY_LOCAL_MACHINE->System->CurrentControlSet->Services remove all entries starting with Oracle string
    From HKEY_LOCAL_MACHINE->Software remove Oracle folder (be carefull if you have other oracle product installed)
    Now ,in windows registry, click to "Computer" and search and remove all entries starting with ORADB18 (it requires a lot of time; this point was not suggested in the video above). If you find that all entries in the same node are related to ORADB18, delete the node itself (BE CAREFUL, at your own risk)
  4. Delete Oracle User/Groups: Press Windows + R, type lusrmgr.msc, press ENTER. If you have Windows 10 Home, lusrmgr app is limited. You have to download a file from the web, googling "lusrmgr windows 10 home". From the "Users" entry, delete the user you created when installing Oracle 18c (in express edition I did not find any new user created anyway). Now click on "Groups" entries and delete all groups starting with "ORA". Close lusrmgr.
  5. delete Oracle 18c installation folder you choose when installed ((example c:\app\yourname\Oracle\...)
  6. delete Oracle folder from c:\Program Files (be careful if you have other oracle products installed)
  7. Delete "Oracle - OraDB18Home1"folder from start groups from file explorer, typing
    %ProgramData%\Microsoft\Windows\Start Menu\Programs\
  8. RESTART the system
  9. clean registry with a registry cleaner software (I used ccleaner, free)
  10. RESTART the system and reinstall Oracle 18c express
User_RK8AE

Dude @jjjameson I am facing the exact same problem as yours, in my computer I have only two files(running) rather than having 6 files running in my computer.

JJJameson

@User_RK8AE I'm afraid all I can advise is to try what fixed the problem for me, which was to get a fresh/good Oracle install file. That was OracleXE184_Win64.zip for me, but that was a couple of years ago now.

1 - 22
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 2 2017
Added on Nov 28 2016
4 comments
219 views