I am new to IBM MQ, wanted to know if its possible to display remote queue managers from client host using CLI, like I can successfully see the remote queue managers in webconsole of client-ibm-mq but how to check that from CLI or PCF or REST call
It is not currently possible to use remote MQ commands (such as PCF or MQSC) to display the queue managers on a machine.
However, using the MQ Console or the REST API it is possible. Do an HTTP GET from the following URL (changing the domain accordingly):-
http://localhost:9080/ibmmq/rest/v1/admin/qmgr
This will show you output like the following:-
{"qmgr": [
{
"name": "MQG1",
"state": "running"
},
{
"name": "MQG2",
"state": "ended"
}
]}
For more information on this particular REST API, see reference page for HTTP GET from /admin/qmgr
Related
I developed a video chatting application using simple peer and socket.io . But when I tried hosting the application the peers could not be connected because of the firewall issue . I am aware that STUN and TURN servers are to be used for this purpose . Is it possible to connect to those servers using simple peer ?
If so how?
Any explanation or reference articles will be helpful
You can add the iceServer configuration like in original webrtc in the simple-peer config like so:
{
initiator: false,
config: { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }, { urls: 'stun:global.stun.twilio.com:3478?transport=udp' }] },
}
You can add stun servers and/or turn servers.
If you read the source code of the simple-peer npm package you will realize that it currently uses
URLs: [
'stun:stun.l.google.com:19302',
'stun:global.stun.twilio.com:3478'
]
for its public IP discovery needs.
Your app fails to work in case of firewall because just stun server is insufficient in case of firewall.
Besides a STUN server, you need a TURN server is this case.
TURN is the fallback is case STUN fails to deliver.
I was trying to enable the AMQP 1.0 connection with Ditto running on my local virtual Ubuntu machine following the instruction from the website. So I created the twin on my instance, verified it exists and the following step was to create a connection with the endpoint.
First my question: Is it mandatory to use Hono to create AMQP connection? Cause I would prefer to use simple mosquito client. So I tryed to execute the PUT CURL:
{
"targetActorSelection": "/system/sharding/connection",
"headers": { "aggregate": false },
"piggybackCommand": {
"type": "connectivity.commands:createConnection",
"connection": {}
}
}
to the adress where my instance of eclipse ditto running http://localhost/devops/piggyback/connectivity, but i'm getting 401 Authorization error.
I tryed to put the basic authentication used in the example: devops:devopsPw1!, but it fails as well.
Meanwhile sending the same command to the Ditto sandbox instance working fine. What did I miss in my configuration?
Thanks a lot in advance, Mila
regarding the first question. No it is not mandatory to use Hono to create an AMQP connection. You can establish an AMQP connection to whatever uri you define in your connection.
This leads me to the next point. The JSON you provided in your question is missing the description of the actual connection.
I see that we should clarify this in the documentation more explicitly like we did for the testConnection command.
You could have a look at the connection model to see how to configure the connection.
Regarding your second question (401 response) the problem is that the default devops password is "foobar". You can configure it to a password you like by setting the environment variable DEVOPS_PASSWORD of the gateway container.
I hope I could help you.
I want to use Sensu as monitoring system and Graphite as backend for graphics.
I wish to configure Sensu for receiving data from RabbitMQ via AMQP protocol that's why I configured Carbon in such way:
# vim /etc/carbon/carbon.conf
# Enable AMQP if you want to receve metrics using an amqp broker
ENABLE_AMQP = True
# Verbose means a line will be logged for every metric received
# useful for testing
AMQP_VERBOSE = True
AMQP_HOST = 10.0.3.16
AMQP_PORT = 5672
AMQP_VHOST = /sensu
AMQP_USER = sensu
AMQP_PASSWORD = kubuntu710
AMQP_EXCHANGE = metrics_my
AMQP_METRIC_NAME_IN_BODY = True
Per my understanding Carbon with some frequency requests data from RabbitMQ (via AMQP) and save it via Whisper.
On other side Sensu saves some metrics in RabbitMQ, I configured it in next way:
root#sensu_server:/etc/sensu/conf.d# vim graphite_handler_amqp.json
{
"handlers": {
"graphite_amqp": {
"type": "transport",
"pipe": {
"type": "topic",
"name": "metrics_my",
"durable": "true"
},
"mutator": "only_check_output"
}
}
}
And of course I attached this handler in such way:
root#sensu_server:/etc/sensu/conf.d# cat metrics_cpu.json
{
"checks": {
"metrics_cpu": {
"type": "metric",
"command": "/opt/sensu/embedded/bin/metrics-cpu-pcnt-usage.rb",
"interval": 10,
"subscribers": ["MONGO"],
"handlers": ["graphite_amqp"]
}
}
}
Everything fine but Graphite can't draw metrics. This is log from Graphite side:
13/06/2016 18:57:16 :: New AMQP connection made
And this is from rabbitMQ on Sensu server side:
=INFO REPORT==== 13-Jun-2016::15:57:16 ===
accepting AMQP connection <0.25298.0> (10.0.3.95:43722 -> 10.0.3.16:5672)
=ERROR REPORT==== 13-Jun-2016::15:57:16 ===
Channel error on connection <0.25298.0> (10.0.3.95:43722 -> 10.0.3.16:5672, vhost: '/sensu', user: 'sensu'), channel 1:
operation exchange.declare caused a channel exception precondition_failed: "inequivalent arg 'durable' for exchange 'metrics_my' in vhost '/sensu': received 'true' but current is 'false'"
Why rabbitMQ thinks that "durable": set to "false", when Sensu should set it to true?
Can anybody share own expirience with such logic?
PS. Configuration with just tcp handler is working fine for me.
operation exchange.declare caused a channel exception precondition_failed: "inequivalent arg 'durable' for exchange 'metrics_my' in vhost '/sensu': received 'true' but current is 'false'"
The exchange metrics_my already exists and has the durable property set to false. Some other process is now trying to re-declare that same exchange with a different value for durable (true).
It looks like that when the processes start up they are trying to configure RabbitMQ using the configuration you have specified - making sure the required exchanges and queues exist.
However, RabbitMQ does not allow changing some properties of exchanges and queues after they have been created, so one of the processes is starting up, trying to make sure the exchange exists but is failing because it is specifying a different value for the durable property than what it already is.
My guess is that carbon and sensu have been configured to have a different value of durable for the metrics_my exchange.
Based on the snippets of configuration you provided, I don't see an option for changing the durable property for carbon, but you can for sensu.
You need to make everyone agree on what durable should be, delete the exchange (if durable will be different) and restart everything.
PS: The durable property specifies that the exchange should be persisted to disk and survive restarts of the RabbitMQ process.
I am trying to setup a MQ Cluster that has the following config
There are 3 host machines, ubuntuvm-1, ubuntuvm-2 and ubuntuvm-3
ubuntuvm-1 has one Full repository queue manager and one partial repository queue manager. QM_FR1, QM_PR1
ubuntuvm-2 is same as above. QM_FR2, QM_PR2
ubuntuvm-3 has only one partial repository queue manager, QM_PR3
Following are the steps I have taken
I have created cluster receiver channels on each queue manager that point to its own queue manager.
I have created cluster sender channels that point to at least one full repository.
I have made sure that the channels are correct, i see the tests pass when I run them through the MQ Explorer.
I get an error when using MQ Explorer, I try to add the QM_FR1 queue manger to cluster (CLUSTER1).
Following is the error.
Access not permitted. You are not authorized to perform this operation. (AMQ4036)
Severity: 10 (Warning)
Explanation: The queue manager security mechanism has indicated that the userid associated with this request is not authorized to access the object.
Why am I getting this error and how do I fix this?
Please shout if you want me to provide more details.
I create a queue manager like QMTEST in IBM WebSphere MQ Explorer. I want to connect to a remote queue manager (remote ip address). I followed these steps:
add remote Queue manager
Queue manager name: QMTEST [Next]
Host Name or ip Address: X.X.X.X(remote ip) [Finish]
But I couldn't connect. I got this error message 'Could not establish connection to the queue manager-reason 2538.(AMQ4059)'. What can I do?
The four digit number in your error message is an MQRC (MQ Reason Code). This number gives you more information about what went wrong. You can look it up in Knowledge Center.
MQRC_HOST_NOT_AVAILABLE (2538)
There is a list of possible things that could cause this error. My guess is it is likely to be the first one, you have not started a listener on the queue manager, since you do not mention doing that in your question details.
You should also read the following link which is some basic details on how to connect to a remote queue manager. You appear to have the MQ Explorer side sorted, but perhaps not the queue manager side.
Setting up the server using the command line
Please ensure the listener is running on the remote queue manager side. The default MQ listener port is 1414. If the listener is running then check the queue manager error logs for any connection errors from the MQ explorer.
Are you sure the qmgr and its listener are running and that you have a SYSTEM.ADMIN.SVRCONN channel? That is the server-connection channel used for remote administration of a queue manager. This technote may be helpful.
Is this on a modern Windows or Linux server? If so, did you open the port (i.e. 1414) in the firewall?
Sometimes when we create a Queue manager remote administration objects are not created that's why we get such errors because it is unable to find these objects. To create them right click on the queue Manager, Select Remote Administration objects and create them and start the listener.
I experienced this same error and the queue was configured correctly.
I was using Eclipse and switched to the MQ Explorer setup available from IBM web page.
After that, I was totally able to see the queues and everything I was supposed to see.