Author |
Message
|
WBI_user |
Posted: Fri Jun 26, 2015 12:12 pm Post subject: Any easy way to get all the ports used by the broker |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
People always ask me what are the ports used by the all the EGs of my running broker.
I can use the
mqsireportproperties MYBROKER -e MYEG01 -o HTTPSConnector -a | grep explicitlySetPortNumber
to get the ports used by the EG.
But I have 50+ EGs in my development environment.
I have to first do a mqsilist MYBROKER to get the name of all the 50+ EGs and issue the mqsireportproperties against each EG.
I was wondering if there is any easier way to get the info I want beside writing a shell script to run the commands like I describe. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jun 26, 2015 12:23 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can configure the EGs to each use a fixed port.
Then they won't change when you start up the EGs.
And you don't have to inquire of the EG what it's port is.
You just consult the document that says "this eg WILL USE this port". |
|
Back to top |
|
 |
zpat |
Posted: Sat Jun 27, 2015 3:54 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Dynamic ports are somewhat hard to manage.
Definitely best to fix them for known requirements, and keep the dynamic range for anything else.
Occasionally I check if anything is using one of the dynamic range and arrange to get that a fixed port.
You could give every EG a port of course, if you have enough spare ones.
I suppose that makes sense now that the unreliable http protocols are becoming more popular than the reliable MQ ones. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Jun 27, 2015 5:38 am Post subject: Re: Any easy way to get all the ports used by the broker |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
WBI_user wrote: |
People always ask me what are the ports used by the all the EGs of my running broker.
I can use the
mqsireportproperties MYBROKER -e MYEG01 -o HTTPSConnector -a | grep explicitlySetPortNumber
to get the ports used by the EG.
But I have 50+ EGs in my development environment.
I have to first do a mqsilist MYBROKER to get the name of all the 50+ EGs and issue the mqsireportproperties against each EG.
I was wondering if there is any easier way to get the info I want beside writing a shell script to run the commands like I describe. |
So script up the informatino gathering. A bit of sed/awk and you should be able to interpret the EG names from an MQSILIST output.#
Create a document with all the ports and then you only have to keep it updated when things change. Put it on some sort of document store (yes even Sharepoint can do this) then no one need ask you ever again.
Then you can return to your real job. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
ruimadaleno |
Posted: Sat Jun 27, 2015 7:18 am Post subject: |
|
|
Master
Joined: 08 May 2014 Posts: 274
|
In our environment we have a policy in place:
Every development team gets an execution group in Development environment. http Port and debug port is set by admin team (in the moment of eg creation) and this info is kept in a well know document. Development teams are also informed on the ports of the execution group they are allowed to use. (we call these execution groups the "staging" execution groups - For unit testing, debugging and other activities that can lead to unavailabilities in broker environments)
There are also a set of execution groups (we called the "applications" execution groups) The ports for these eg are defined in creation time and they do not change over time. The ports are published in a document (previously mentioned).
so , our execution groups/environments are something like:
Broker DEV
staging eg's (one for each dev team)
applications eg's
Broker QUA
applications eg's (same port number for every environment, no staging eg's)
Broker PROD
applications eg's (same port number for every environment, no staging eg's) _________________ Best regards
Rui Madaleno |
|
Back to top |
|
 |
WBI_user |
Posted: Mon Jun 29, 2015 5:00 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Thanks for the replies. I'll get a script going. Our Dev environment is very "free" in a way that developer can create their own EG and assign or change port# as long as they got confirmation from Network support that the port is not in use. That's why my original "static list" is never up to date. I need to provide answer when a email request comes. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 29, 2015 5:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
WBI_user wrote: |
Thanks for the replies. I'll get a script going. Our Dev environment is very "free" in a way that developer can create their own EG and assign or change port# as long as they got confirmation from Network support that the port is not in use. That's why my original "static list" is never up to date. I need to provide answer when a email request comes. |
Give them a fixed set of ports they can use. Ensure that each new EG uses the next port from that list - not "any port they want".
Or every time you get asked for this list, forward the request to the entire team of developers and ask them to provide the data. |
|
Back to top |
|
 |
|