Author |
Message
|
anil kumar |
Posted: Wed Oct 10, 2018 5:42 am Post subject: Multi Instance QM for Messaging using the REST API IBM MQ |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Hi All,
I don't know if it is the correct discussion forum to post about new Messaging using the REST API in IBM MQ
we are using IBM MQ Version: 9.0.4.0 with multi-instance queue managers.
we are trying the new REST API feature provided with IBM MQ.
we are using the strmqweb command to start the web server and we are provided with URL's like this
Code: |
https://localhost:9443/ibmmq/rest/v1/
https://localhost:9443/ibmmq/console/ |
we are using the https://localhost:9443/ibmmq/rest/v1/messaging/qmgr/QM1/queue/Q1/message with http post method to put messages into Queue and we are able to put messages into Queue without any issues
and the same way we are calling the HTTP DELETE method to get the messages from the queue.
all this setup works fine when we have only one queue manager but we have queue managers configured with Multi-instance when QM in server A goes down then QM in server B will become an active instance of the queue manager.
I'm little puzzled here about the rest API, I am able to see the web folder in both primary and standby server.
how do I work with the messaging REST API with Multi-instance queue manager?
any limitation, possible factors to consider anything please throw some lights |
|
Back to top |
|
 |
anil kumar |
Posted: Thu Oct 25, 2018 6:29 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
just found how to covert the mqweb as window service, but still unable to find out how to use it for the multi-instance broker. |
|
Back to top |
|
 |
blorro |
Posted: Tue Feb 19, 2019 6:34 am Post subject: |
|
|
 Acolyte
Joined: 09 Jan 2014 Posts: 57 Location: Sweden
|
anil kumar wrote: |
just found how to covert the mqweb as window service, but still unable to find out how to use it for the multi-instance broker. |
How did you cover running mqweb as a windows service ?
I think it might be challenging using multi-instance Queuemanagers in an active/passive setting since you cannot run two queue managers with the same name.
You would have to define the same queues on both queue managers, and do a retry on secondary queue manager if the first one running has gone *down*.
Certainly doable but not too pretty of a solution really.
I'd make sure that the first queue manager would have as much availablity as possible.
Have you checked why the first one goes down, or do you plan to take it down for servicing only and offload messaging to the secondary one ?
You can only have one primary queuemanager per server as far as i know, so multi-tenancy comes with it's challenges. _________________ "Anything is possible, all the time." |
|
Back to top |
|
 |
anil kumar |
Posted: Wed Feb 20, 2019 3:32 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
i have used WLP commands to start the mqweb.bat file as a windows service the link to that is
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_setup_new_server_winserv.html
Use the following command to start the server:
server startWinService serverName [options]
in our case the command would be Use the following command to start the server:
Code: |
server registerWinService mqweb
server startWinService mqweb
|
note that we need to run this command in admin mode and location to run this command is mqinstallationdir/ibm/mq/web/bin
you will get some errors related to log '' folder issue then open the server.bat and check this statement
Code: |
!WLP_INSTALL_DIR!\bin\tools\win\prunsrv.exe //IS//%SERVER_NAME% --Startup=manual --DisplayName="%SERVER_NAME%" --Description="IBM WebSphere Liberty Profile" ++DependsOn=Tcpip --LogPath="%WLP_INSTALL_DIR%\usr\servers\%SERVER_NAME%\logs" --StdOutput=auto --StdError=auto --StartMode=exe --StartPath="%WLP_INSTALL_DIR%" --StartImage="%WLP_INSTALL_DIR%\bin\server.bat" ++StartParams=start#%SERVER_NAME% --StopMode=exe --StopPath="%WLP_INSTALL_DIR%" --StopImage="%WLP_INSTALL_DIR%\bin\server.bat" ++StopParams=stop#%SERVER_NAME% |
create log manually and run the commands as mentioned using above URL you can find service named mqweb in your windows services .
Code: |
just found how to covert the mqweb as window service, but still unable to find out how to use it for the multi-instance broker. |
i'm sorry on the above statement i was supposed to type multi instance queue managers here not broker .
i presume you already know about multi instance queue mangers but just in case for others URL to mult instance queue manger concept
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.con.doc/q018140_.htm
is your question related to Multi instance queue mangers? concept if yes we use configuration as mentioned in the infocenter. |
|
Back to top |
|
 |
anil kumar |
Posted: Wed Feb 20, 2019 3:35 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
are you using MQ web in live ? How are the results can you please share any of your experiences or issues or problems using MQ Web and MQ Rest |
|
Back to top |
|
 |
blorro |
Posted: Tue Mar 05, 2019 5:32 am Post subject: |
|
|
 Acolyte
Joined: 09 Jan 2014 Posts: 57 Location: Sweden
|
Thanks for the help configuring mqweb as a window service.
Still having issues though, since it behaves differently depending on if i start mqweb from "services" or if i just key "strmqweb" from command line.
The "strmqweb" works fine, but running it as a windows service does not work.
Trying to pinpoint why, without success.
Log states :
[ERROR ] CWWKE0701E: [com.ibm.ws.security.registry.internal.UserRegistryServiceImpl(53)] The setUserRegistry method has thrown an exception Bundle:com.ibm.ws.security.registry(id=81) java.lang.UnsatisfiedLinkError: com/ibm/mq/rest/auth/osauth/v1/MQLocalAuthenticationV1.getRealmMethod()Ljava/lang/String;
at com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1.getRealm(MQLocalAuthenticationV1.java:400)
at [internal classes]
We are not running this in production yet, hopefully will be able to do so in the near future. Only Sandbox/Development at the moment. _________________ "Anything is possible, all the time." |
|
Back to top |
|
 |
blorro |
Posted: Wed Mar 06, 2019 2:46 am Post subject: |
|
|
 Acolyte
Joined: 09 Jan 2014 Posts: 57 Location: Sweden
|
Actually ended up setting the 'strmqweb' as a scheduled task, run at startup.
Not sure why the Liberty server did not work, could not find any useful pointers either to have it run as i wanted. _________________ "Anything is possible, all the time." |
|
Back to top |
|
 |
anil kumar |
Posted: Mon Mar 11, 2019 1:10 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
blorro wrote: |
Thanks for the help configuring mqweb as a window service.
Still having issues though, since it behaves differently depending on if i start mqweb from "services" or if i just key "strmqweb" from command line.
The "strmqweb" works fine, but running it as a windows service does not work.
Trying to pinpoint why, without success.
Log states :
[ERROR ] CWWKE0701E: [com.ibm.ws.security.registry.internal.UserRegistryServiceImpl(53)] The setUserRegistry method has thrown an exception Bundle:com.ibm.ws.security.registry(id=81) java.lang.UnsatisfiedLinkError: com/ibm/mq/rest/auth/osauth/v1/MQLocalAuthenticationV1.getRealmMethod()Ljava/lang/String;
at com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1.getRealm(MQLocalAuthenticationV1.java:400)
at [internal classes]
We are not running this in production yet, hopefully will be able to do so in the near future. Only Sandbox/Development at the moment. |
Hi Boloro,
It was working for me both windows service and strmqweb as batch script program for basic registry while using below
Code: |
<featureManager>
<feature>appSecurity-2.0</feature>
<feature>basicAuthenticationMQ-1.0</feature>
</featureManager>
|
But i too faced the same issue in doing window service when using, local os authentication registry file that has below features.
Code: |
<featureManager>
<feature>appSecurity-2.0</feature>
<feature>localOSAuthenticationMQ-1.0</feature>
<feature>basicAuthenticationMQ-1.0</feature>
</featureManager>
|
i have debugged the error is with environment variables if you can check your log files in the location web\installations\yourinstalltion\servers\mqweb\logs\messages
while running as strmqweb :
Code: |
[3/11/19 14:32:34:191 IST] 0000001a com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 I MQWB3007I: Native security library E:\ibm\mq\bin64\amqzfuf1.dll was successfully loaded.
[3/11/19 14:32:34:194 IST] 0000001a com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 I MQWB3009I: The MQLocalAuthentication feature is starting...
[3/11/19 14:32:34:195 IST] 0000001d com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 I MQWB3011I: The MQLocalAuthentication feature is updating configuration... |
but the error is throwing for local os service registry as below running as windows service
Code: |
[3/11/19 14:34:39:906 IST] 00000019 com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 A MQWB3006A: Native security library C:\Program Files\IBM\MQ\bin64\amqzfuf1.dll could not be loaded.
[3/11/19 14:34:39:906 IST] 00000019 com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 I MQWB3009I: The MQLocalAuthentication feature is starting...
[3/11/19 14:34:39:906 IST] 0000001c com.ibm.mq.rest.auth.osauth.v1.MQLocalAuthenticationV1 I MQWB3011I: The MQLocalAuthentication feature is updating configuration...
[3/11/19 14:34:39:952 IST] 0000001c com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "java.lang.UnsatisfiedLinkError: com/ibm/mq/rest/auth/osauth/v1/MQLocalAuthenticationV1.initializeMethod(Z)V com.ibm.ws.config.admin.internal.ManagedServiceTracker$1 280" at ffdc_19.03.11_14.34.39.0.log
|
if you can compare both the errors the reason is while using local os authentication features the service is not finding Native security library C:\Program Files\IBM\MQ\bin64\amqzfuf1.dll could not be loaded.
that is due to ibm mq product was not installed in the default location .
hope it helps understaing error |
|
Back to top |
|
 |
blorro |
Posted: Wed Mar 13, 2019 8:54 am Post subject: |
|
|
 Acolyte
Joined: 09 Jan 2014 Posts: 57 Location: Sweden
|
Thanks for the tip!
That most likely is the issue.
Found this :http://nssm.cc/
Seems it works pretty nice setting up windows services out of pretty much anything.
Will try and see how it goes. _________________ "Anything is possible, all the time." |
|
Back to top |
|
 |
anil kumar |
Posted: Fri Mar 15, 2019 5:00 am Post subject: |
|
|
 Voyager
Joined: 22 Jan 2017 Posts: 98 Location: India
|
Thanks for the pointer. if you did a successful setup of windows service do let me know. |
|
Back to top |
|
 |
|