Sunday, August 17, 2008

Error creating new OC4J instance: Invalid protocol or port range.

This is an attempt to install the SOA Suite, using Oracle AS 10.1.3.4 on HP-UX using the Enterprise Deployment Guide; the complete error message is:

Error creating new OC4J instance: create oc4j instance fails: Invalid protocol or port range. There is no OHS installed on the Oracle Home. So new OC4J instance can not use ajp protocol. Please use the -protocol and -httpPort option on the command to create OC4J.

As an alternative, I tried from the command prompt, running the createinstance command from $ORACLE_HOME/bin. To no relief.
Of course, google came up empty, as did metalink; however, I found a workaround that seems to work (This is install is not quite ready, yet):

cd $ORACLE_HOME/bin
./createinstance -instanceName oc4j_soa -groupName soa_group -httpPort 8435 -protocol http
./createinstance -instanceName oc4j_esbdt -groupName esbdt_group -httpPort 8435 -protocol http
Then, edit opmn.xml (in $ORACLE_HOME/opmn/conf/) and change

<port id="default-web-site" range="8435" protocol="http"/>
into:
<port id="default-web-site" range="12501-12600" protocol="ajp"/>

Do this for both instances just created (oc4j_soa and oc4j_esbdt).
And just as a side note: create these in lower case, as there's a patch (PERL script, actually), that checks for a lower case oc4j_soa!

Next, opmnctl reload and start, and we're in business. The EDG (linked in the title) states that an AJP port should be picked, but defining a range makes the Application Server choosing the next free port.

3 comments:

Reinhard said...

I got aware about this blog post by chance.

This bug had been fixed just recently. Oracle customers can download a patch that fixes this problem on the Oracle support portal "Metalink" respectively "My Oracle Support".

Patch 7387622 -CREATION OF OC4J INSTANCE FAILS AFTER INSTALLATION OF PATCH SET 10.1.3.4

Frank said...

Reinhard,
Thanks for the update - I'll certainly look into this patch and report back. May take a while, though, as I have other projects to attend to (like redecorating a bathroom)

ABC PQR said...

Thanks Reinhard .... This was a much needed update.