Port numbers and brokers

Posted by gamberoni on 27-Jan-2011 10:19

I'm looking at an "interesting" issue that came up while I was on holiday.

The database server - a Solaris 10 server - supports both live and non-live database environments, with each "environment" containing between four and eleven databases.  Until very recently I had set a specific port range for all of the database brokers - live and non-live - and they all shared the same pool of numbers.  At some point - while I was on holiday - the number of brokers that were started equalled the number of ports and when a "new" broker process was required for a database it failed - spectacularly - fortunately it was a non-live system. The user got the error "BROKER: Could not spawn a server. (1890)" and the database environment hung and needed each database to be stopped and restarted!

So far, so good.  When I came back from holiday, I reconfigured the non-live databases to use a separate pool of ports so that we should never run out for live or non-live.  I was then asked if I could reproduce the error that had occurred when I was away.  Naturally, I didn't want to do anything that might impact the Live databases so I tried to setup a similar scenario using a small port range and configured the broker properties so that more brokers could be started than there were ports available.

Sorry for the rather long setup, here's the interesting bit. After I'd started the database server processes and started logging in users, I expected each broker to have it's own port.  When the environment was almost at it's limit and a new login session wouldn't be able to start enough brokers to log a user in some strange things started to show in the database log.  Some of the brokers were using / trying to use the same port number, and the user session was getting the combination "Disconnected from server because database name was incorrect (700)" and "** Server rejected login. (432)" message.

So, here's the questions: one - does each broker have it's own port or is "sharing" of port numbers allowed?  And two, does anybody know how to reliably get the (1890) message, without impacting / breaking any of the live environments!

All Replies

Posted by ChUIMonster on 27-Jan-2011 10:42

Are you talking about a pool of ports established  by -minport and -maxport?

Those ports are for the client/server connections that the broker sets up.

The broker itself gets it's port from -S.  So you should be using a distinct -S port# for each broker that you start.

Or have I just misundertood you?

Posted by gamberoni on 27-Jan-2011 10:47

Yes - sorry not enough information.  The port pools are setup with the -minport and -maxport parameters.  So, the ports that are being shared are in this -minport to -maxport range.

Posted by Thomas Mercer-Hursh on 27-Jan-2011 12:10

Maybe I'm conservative, but overlapping minport-maxport ranges for multiple databases sounds like a recipe for trouble.

Posted by gamberoni on 28-Jan-2011 07:31

Absolutely, and it's mortifying to have to admit to making such a basic error!

This thread is closed