Thursday, 21 February 2008

SoaSuite in VMWare

I work with VMWare for some years now and I do all my Oracle installations in a VMWare Image. I only have the necessary tools on my Host-OS (which is Ubuntu Linux for a few months now), but I keep my Host-OS clean from larger installations.

I used to work with a jDeveloper in the VM that also contains my SoaSuite installation, but today I tried to connect from a jDeveloper on my Host OS to a SoaSuite in a VM. Somehow it did not work. After struggling with it for some time, I found on a forum the solution.

Although I did not have firewalls on my Host or on my Guest OS (hmmm. apparently I have a security-to-do on my Host) I kept on getting a connection error in my jDeveloper on testing the connection. So it should be something on ip-filtering. And it was. Apparently opmn only accepts connections from localhost. You can however specify another ip-address that it should accept, or leave it open for every ip-address. This is done by editing the opmn.xml.
In there you'll find the tag notification-server, within that element you'll have to add a ipaddr-element:

That is:
ipaddr remote="" request=""

This got me a little further. But since there is a connection then somehow jDeveloper is going to setup an RMI connection with OC4J. And that fails because it tries to connect with the servername within the VM. Since this VM is a clone, this servername is some generic one that I do not have in my host-file. So the connection still fails.

There are few things I tried to solve this.

Apache Servername
In Apache the old servername is also set. Go to Apache/Apache/conf and edit httpd.conf. Search for the setting ServerName and change the servername. In http connections Apache will do url-rewrites with this servername.
I also edited the ias.properities in /config. There you have setting "VirtualHostName". I changed that one.
But that did not do the trick.
There is also a setting IASname. Since I'm renaming my AS, I changed that one too.

In the/Apache/Apache/conf there is also a file called ohstarget.xml. It contains a attribute "HTTPMachine" that contains the hostname. But changing that also did not solve my problem.
Also it had a attribute "AssocTargetInstance" with the application servername. Changed that one too, conform the

Since I'm changing my AS also, I also have to change the ias-name in the opmn.xml.

In /bpel/system/config you'll find collaxa-config.xml. In this configuration you'll also find some occurences of the host name. These are particularly important because they're used to rewrite urls from bpel in HA configurations. But also in our case.

Sever's hostname
One thing I had left: the name of the host itself. I changed that one (in Linux you can do this in the network-settings; in Windows you have to change it in the system properties.) After that you have to reboot (or restart the networkservices, rebooting is easier).

If you have your database on the same server then you should change your listener.ora. You'll probably find it in /network/admin. Change the hostname there, otherwise your tns-listener won't start.

I found that there was still one problem with ESB. When you deploy a routing service, it get's a wsdl with an import. In this import "localhost.localdomain" as an url is inserted. When you try create a partnerlink in BPEL Designer on the wsdl, it will not be able to load and interpret it.

The solution is as often very simple. I looked into about every config-file in the Oracle_home. This did not help me much since the problem was in the database.
Open with an query tool (sqlplus, sqldeveloper, pl/sqldeveloper, toad) the database user oraesb. It contains a table called "ESB_PARAMETER". Contains parameters and one of them is "DT_OC4J_HOST". Change the value of it from "localhost.localdomain" (or whatever the original host name was) to your new host name.

After that you apparently had to re-register your esb-services, since with me it did not change the wsdl's right away. I deleted them first and then re registered them again. Then I was able to create a BPEL PM Partnerlink on it.

I renamed my whole Soasuite Application server and it works! And I can connect to it from outside my VM.

No comments :