Services and Port numbers
Posted in 2016
User asked if multiple service names could point to the same port for one Informix instance across multiple locations. Initial responses suggested it was possible, but when attempted, Informix failed to bind multiple services to the same port (1531), generating network binding errors. The resolution was to assign different ports to each service (e.g., 1531 and 1541), which eliminated the warnings.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Networking & sqlhosts Configuration, Platform-Specific Issues
Our company is now located in two cities (and a DR site)and application developers would like to distinguish where the apps are connecting from and/or to. Potentially our servers could be in three locations- CHI, WTN or AUS. I'd like to add new services to /etc/services, sqlhosts and to DEBSERVERALIASES. System: HP-UX 11.31. ia64, Informix 11.70.FC7 Q. Can two services point to the same port number if they point to the same instance? We have an instance 'SD' and a service 'nike_SDTCP' associated with port 1527/tcp Can I add a WTN_SDTCP, AUS_SDTCP and CHI_SDTCP all associated with 1527/tcp (in etc/services) pointing to the instance 'SD'. Also, is this good practice? Thank you.
If all of the sevice names point to the same port number then they are just synonyms for each other. It is the port number that's important not the service name. Art On Feb 25, 2016 12:22 PM, "MURALI PAZHAYANNUR" <pmurali@ftportfolios.com> wrote: > Our company is now located in two cities (and a DR site)and application > developers would like to distinguish where the apps are connecting from > and/or > to. Potentially our servers could be in three locations- CHI, WTN or AUS. > I'd > like to add new services to /etc/services, sqlhosts and to > DEBSERVERALIASES. > > System: HP-UX 11.31. ia64, Informix 11.70.FC7 > > Q. Can two services point to the same port number if they point to the same > instance? > > We have an instance 'SD' and a service 'nike_SDTCP' associated with port > 1527/tcp Can I add a WTN_SDTCP, AUS_SDTCP and CHI_SDTCP all associated with > 1527/tcp (in etc/services) pointing to the instance 'SD'. > > Also, is this good practice? > > Thank you. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --047d7bea43fcea57b3052c9a2a04
If you want to do traffic monitoring then separate ports are useful Cheers Paul > If all of the sevice names point to the same port number then they are > just > synonyms for each other. It is the port number that's important not the > service name. > > Art > On Feb 25, 2016 12:22 PM, "MURALI PAZHAYANNUR" <pmurali@ftportfolios.com> > wrote: > >> Our company is now located in two cities (and a DR site)and application >> developers would like to distinguish where the apps are connecting from >> and/or >> to. Potentially our servers could be in three locations- CHI, WTN or >> AUS. >> I'd >> like to add new services to /etc/services, sqlhosts and to >> DEBSERVERALIASES. >> >> System: HP-UX 11.31. ia64, Informix 11.70.FC7 >> >> Q. Can two services point to the same port number if they point to the >> same >> instance? >> >> We have an instance 'SD' and a service 'nike_SDTCP' associated with port >> 1527/tcp Can I add a WTN_SDTCP, AUS_SDTCP and CHI_SDTCP all associated >> with >> 1527/tcp (in etc/services) pointing to the instance 'SD'. >> >> Also, is this good practice? >> >> Thank you. >> >> >> >> > ******************************************************************************* >> Forum Note: Use "Reply" to post a response in the discussion forum. >> >> > > --047d7bea43fcea57b3052c9a2a04 > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > -- Paul Watson Tel: +1 913-674-0360 Mob: +1 913-387-7529 Web: www.oninit.com Oninit® is a registered trademark of Oninit LLC Failure is not as frightening as regret. If you want to improve, be content to be thought foolish and stupid. What this country needs are more unemployed politicians
So, based on Art's response I had WTN_SBTCP added to /etc/service, sqlhosts, and onconfig. WTN_SBTCP and nike_SBTCP both used the same port number (1531) on the box. With this setup I tried to bring the instance up. The instance up, it came up but the online log had the following warning. Upon changing the WTN_SBTCP port to 1541, the log had no warning. This appears to go against what Art said I should be able to do (unless I misunderstood) Thanks. 11:41:22 IBM Informix Dynamic Server Version 12.10.FC6 Software Serial Number AAA# B000000 11:41:22 Assert Warning: Unable to bind to the port (1531) on the host (10.1.190.1 1) for the server (WTN_SBTCP). 11:41:22 IBM Informix Dynamic Server Version 12.10.FC6 11:41:22 Who: Session(12, informix@, 0, 0000000000000000) Thread(18, soctcplst, 0, 1) File: soc_be.c Line: 2522 11:41:22 stack trace for pid 2524 written to /backup/af.3fa3cc1 11:41:22 See Also: /backup/af.3fa3cc1 11:41:22 Unable to bind to the port (1531) on the host (10.1.190.11) for the serve r (WTN_SBTCP). 11:41:22 listener-thread@soc_be.c:2369: err = -25572: oserr = 2: errstr = : Networ k driver cannot bind a name to the port. System error = 2. 11:41:22 sql_listener: ASF_LISTEN failed 11:41:22 Attempting to bring listener thread down.
A service name is basically a fancy way of setting a port number. In the sqlhosts file, you can actually use a port number instead of a service name, which saves hacking the /etc/services file. When names are used, it is assumed that the number associated with the name is the same on both ends of the connection the port number is ultimately what matters. You could certainly have multiple service names associated with the same port number. It will work OK as the client-server connection requires that the combination of <client IP address, client port number, server IP address, server port number> is unique on the two machines. When it comes to connecting to a remote machine, the client's port number will usually be an ephemeral port number (not one associated with a service name). All that's basic IP network theory. I don't think you'll run into problems across the Informix servers with your proposed setup. Maybe some network people would be worried about multiple names for the same port (maybe I should be worried about it), but I'm not. There are only so many port numbers (it's a 16-bit unsigned number). On Thu, Feb 25, 2016 at 7:21 AM, MURALI PAZHAYANNUR < pmurali@ftportfolios.com> wrote: > Our company is now located in two cities (and a DR site)and application > developers would like to distinguish where the apps are connecting from > and/or > to. Potentially our servers could be in three locations- CHI, WTN or AUS. > I'd > like to add new services to /etc/services, sqlhosts and to > DEBSERVERALIASES. > > System: HP-UX 11.31. ia64, Informix 11.70.FC7 > > Q. Can two services point to the same port number if they point to the same > instance? > > We have an instance 'SD' and a service 'nike_SDTCP' associated with port > 1527/tcp Can I add a WTN_SDTCP, AUS_SDTCP and CHI_SDTCP all associated with > 1527/tcp (in etc/services) pointing to the instance 'SD'. > > Also, is this good practice? > > Thank you. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." --001a11c3db70e5af95052c9c6e26
Ypu did. If the port num is the same then the services are the same and you cannot define multiple aliases on the same port. Art On Feb 25, 2016 3:08 PM, "MURALI PAZHAYANNUR" <pmurali@ftportfolios.com> wrote: > So, based on Art's response I had WTN_SBTCP added to /etc/service, > sqlhosts, > and onconfig. WTN_SBTCP and nike_SBTCP both used the same port number > (1531) > on the box. With this setup I tried to bring the instance up. The instance > up, > it came up but the online log had the following warning. Upon changing the > WTN_SBTCP port to 1541, the log had no warning. > > This appears to go against what Art said I should be able to do (unless I > misunderstood) > > Thanks. > > 11:41:22 IBM Informix Dynamic Server Version 12.10.FC6 Software Serial > Number > AAA# > B000000 > 11:41:22 Assert Warning: Unable to bind to the port (1531) on the host > (10.1.190.1 > 1) for the server (WTN_SBTCP). > 11:41:22 IBM Informix Dynamic Server Version 12.10.FC6 > 11:41:22 Who: Session(12, informix@, 0, 0000000000000000) > > Thread(18, soctcplst, 0, 1) > > File: soc_be.c Line: 2522 > 11:41:22 stack trace for pid 2524 written to /backup/af.3fa3cc1 > 11:41:22 See Also: /backup/af.3fa3cc1 > 11:41:22 Unable to bind to the port (1531) on the host (10.1.190.11) for > the > serve > r (WTN_SBTCP). > 11:41:22 listener-thread@soc_be.c:2369: err = -25572: oserr = 2: errstr = > : > Networ > k driver cannot bind a name to the port. > System error = 2. > 11:41:22 sql_listener: ASF_LISTEN failed > 11:41:22 Attempting to bring listener thread down. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a11c3c7eeaa2ed9052c9d88b2
Related threads
- HELP- database won't start !!
- Network driver cannot bind a name to the port.
- Solaris 8, IDSWE 7.31, WARNING: Network Down
- Error 25572 using ESQL/Cobol
- Identically named instances, different hosts