New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
7028 views

Setting fixed port for Orbix Naming service

We are  using Orbix Iona 6.3 server configured using itconfigure. Recently we migrated our clients to different eviornments where we have many firewall constraints due to which only a few set of ports are open.

So the problem is that the Naming Service  listens on a random port each time it is started. Is there any way to use fixed ports for naming service.

orbix_ns_on_fixed_port 
0 Likes
16 Replies
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hey Anup,

If your Naming Service (NS) is starting on a random port then it must be indirect persistent, which means that the port of the locator is stored in the IORs. This would be 3075 by default. Requests go to the locator for the initial connection establishment and are then redirected to the NS. All subsequent requests go directly to the NS. The benefit of this approach is that the NS can be started on demand as needed and does not require ports to be reserved for it. However, as you have seen the ports assigned are random.

You have a couple of options here. You can reconfigure your domain to start the NS standalone at domain start-up on a persistent port and repopulate the contexts in the NS. If you do this you can simply configure the port that the NS listens on at that time. However, you do need to check how easily you can rebuild the context tree. The benefit of this would be you only need to make the port of the NS available through the firewall.

If you want to keep your current setup and make the Locator's port (3075) and the port of the NS available then you need to update your configuration and have the NS always listen on a persistent port. The config for this is:

plugins:naming:iiop:port

By default this is set to 0, which means pick a random port. Note you will need to ensure no other process takes this port or else your NS will not be able to start.

Finally don't forget that the services registered in the NS will also need their ports available through the firewall.

Hope that helps!

Martin

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Martin,

     Which configuration file do we need to set this value.

In my domains directory ,I can see two cfg files

<domain>.cfg

and another cfr-<domain>.cfg

Also is this the way to set it

plugins:naming:iiop:port = "55234"

I tried to set the value as above in bothe above cfg files but still itnaming is listening to a different port.

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Martin,

        I set the port using below itadmin command

itadmin variable modify -scope iona_services.naming.omisX -type string -value 55425 plugins:naming:iiop:port

but still client is getting a different port other than the one I set ,After analyzing the itnaming process I could see naming service is listening to 6 other ports apart from the port which I set. and server is giving  one of those ports.

Is there any way to set at least the range of ports  for the naming service.

Thanks a lot for your time.

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi Anup,

How are you distributing the IOR to the clients you may also need to update the new IOR for the NS in the configuration plugins:NameService:initial_reference.

You can find the IOR you should update this with by doing an itadmin ns resolve

This will return the IOR for the root context. You can double check with iordump that this is updated with the new port.

Regards,

Martin

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Sorry that config is initial_references:NameService:reference, I was working from memory when I typed it earlier.

0 Likes
Highlighted
Absent Member.
Absent Member.

I did itadmin ns resolve .

old and new IOR are still the same. also both are giving the same  port for NamingContext

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Are you certain your NS is starting using -ORBname iona_services.naming.omisX ?

Check your start_<domain>_services script to be sure of this.

I assume you have restarted your NS? You need to do this to get it to pick up any new configuration.

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Martin,

           We are not invoking NS inside the domain script. I can see NS service comming up when client call is made to server.

Thanks

Anup

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi Anup,

Are you certain that the NS was restarted after you made this change? What is the exact Service Pack of Orbix that you are on? The latest is Service Pack 7.

I tested this on my side and it is working fine for me.

Regards,

Martin

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Martin,

           I am using Iona 6.3.3. I modified the ports used by naming using itadmin

itadmin variable modify -scope iona_services.naming.omis277 -type string -value "53000:53100" policies:iiop:server_address_mode_policy:port_range

THen I restarted the iona services and I could see NS comming in the range of 53000-53100 ......

BUT now i am in different issue....when i started my application ...it is started in different port outside my range.

so now when client is trying to connect to server ,it is failing creation of  naming context by saing it is not able to connect to my application port.

what could be the possible issue.

Thanks for your time.

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi Anup,

The -scope argument that you pass in matches the -ORBname parameter passed to any Orbix application. In this case you will only set the port_range for the NS and not for any of your other Orbix applications. If you want you can set this at the global scope by not passing in the -scope argument to the itadmin variable command. This will then set it for all applications not just the NS.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.