I have a Java application that is creating a DIIOP connection to a Domino server which is part of a cluster. I am using the following call to create the session:Session session = NotesFactory.createSession(host, uid, pwd);
I am using the IP of a specific server in the cluster to create the session. The session is created successfully, however when I get the name of the server that the session is connected to using: session.getServerName(), it gives me the name of one of the other Domino servers in the cluster. This causes major issues in production.
Does DIIOP behave differently in a cluster environment, or under what conditions would I get a session from another server when I explicitly create a session to a specific IP?
Take a look at the information in this article for background on how createSession works: IBM Developer lotus/library/ls-Java_access_pt1
One of the ways I can see this happening is through the server document settings/notes.ini settings.
Use the command “tell diiop show config” and look for the setting labeled “Public Host Name/Address:”.
This address or dns name is where diiop on that server will advertise that it can be contacted. If this is the cluster’s address or dns name then this would be the reason why you’re actually connecting to a different server than you expected.
This behavior is a feature or a problem depending on your needs, but it certainly can be controlled. If this is in fact what’s happening you can change the following setting in your server document to the server’s own dns name or ip address:
Steve,Thank for your response. I have downloaded and read the Java Access to Domino Objects documents, and I have checked the server document settings. Everything I’ve checked looks good, the server ip address / host name and the dns lookup. But I am still wrestling with this problem. I still get a session from a different Domino server in the cluster to the one I am connecting to.
Are there any other conditions under when this might happen. Or is there a way to force the Domino server to only provide a session to itself? You mentioned in your post that there are notes.ini settings for DIIOP. Any that could affect the behaviour I am getting?
Sorry to hear you’re still having trouble with this. The only way to “force the connection back to itself” is to make sure each server advertises their unique ip address or hostname. This information is stored in diiop_ior.txt and it’s used by the client application to find the domino server. Is it possible that your application has cached this file somewhere and it is not seeing the changes?
The configuration setting labelled “Public Host Name/Address” is the how diiop will advertise itself, and it’s controlled via the server document and the notes.ini parameter diiop_ior_host.
Steve,Many thanks for the follow up response. From my understanding there are three way to tell the DIIOP task which Hostname/IP Address it should advertise:
Setting the Host name/Address field in the Internet Protocols - DIIOP tab in the Server Document
Setting the “Host names or addresses mapped to this site” setting, if Internet Site documents are being used
Setting the DIIOP_IOR_HOST parameter in the notes.ini file.
If I set the DIIOP_IOR_HOST parameter in the notes.ini file does this override the other two settings?
One of the issues I am dealing with is that I am working at resolving this problem in a production cluster so I have to be very selective about what I try! So, if the DIIOP_IOR_HOST setting overrides everything else then I would start with that.
diiop_ior_host does not override any of the internet site settings. If you do use internet sites, then the only option is to change the site documents.
I did not mention internet sites before, but if you do use them, then you’ll need to look at each site’s setting for the hostname/address that will be advertised. Each site has it’s own setting for how it advertises itself.