1

I have been trying to connect IBM MQ to Kafka on my Ubuntu. I want to get the messages from MQ to Kafka. I am trying to use a connector Link. I followed all the steps, but I keep on getting the following errors:

host name supplied is not valid.

and

JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').

I tried everything, but nothing seems to work. If anyone has faced the same issue, please let me know.

My configuration includes the following line:-

# A list of one or more host(port) entries for connecting to the queue manager. Entries are separated with a comma - required
mq.connection.name.list=localhost:1414
JoshMc
  • 10,239
  • 2
  • 19
  • 38
trougc
  • 329
  • 3
  • 14
  • What configuration are you using? What is the host name you have set? Might be a firewall or networking related issue like described [here](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.tro.doc/q045380_.htm). But without any additional details, it's hard to say. – Mathieu de Lorimier Apr 26 '18 at 13:50
  • As @MathieudeLorimier says, you need to provide your config for us to have any chance of helping you. You might want to also evaluate the new IBM MQ connector [here](https://docs.confluent.io/current/connect/connect-jms/kafka-connect-ibmmq/docs/index.html). – Robin Moffatt Apr 26 '18 at 14:05
  • @MathieudeLorimier I am not using any remote connections. Both Kafka and IBM MQ (8.0) are installed on my Ubuntu. The listener is on and is listening on the port 1414, I disabled the firewall, connection name in the client channel is correct. – trougc Apr 26 '18 at 17:32
  • @RobinMoffatt thanks for the link. I will check it out. – trougc Apr 26 '18 at 17:33
  • @trougc it would still help to see the config file if you want insight on your issue. – Mathieu de Lorimier Apr 26 '18 at 18:12
  • @MathieudeLorimier Please find the link to the config file. The only changes I have made is that I did not create a new user called 'alice' as mentioned . I am using the root user. Hence the username and password in the config files are 'trougc'. The trougc user is added to mqm group. https://github.com/chandantroughia/Configuration/blob/master/mq-source.properties – trougc Apr 26 '18 at 19:11
  • I suggest looking at the opened ports on the machine to make sure that the service is listening on the correct IP / Port. See [this thread](https://askubuntu.com/questions/9368/how-can-i-see-what-ports-are-open-on-my-machine). Your service might be listening to 127.0.0.1 rather than localhost (not sure it makes a difference for this particular service but that could be the issue) – Mathieu de Lorimier Apr 26 '18 at 20:26

2 Answers2

2

Turning Andrew Schofield's comment into an answer in case it gets lost in mist.

Your configuration file has the following:-

mq.connection.name.list=localhost:1414

IBM MQ does not use the industry-standard host:port syntax. It uses host(port). Unfortunately, there was a (now fixed) mistake in the instructions.

Please use the following syntax instead:-

mq.connection.name.list=localhost(1414)
Morag Hughson
  • 7,255
  • 15
  • 44
0
  1. host name supplied is not valid.
  2. JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').

The error message is pretty clear, the hostname/connection name is invalid.

That link you gave says that the "mq-source.properties" file has the connection information specified as:

mq.connection.name.list=localhost(1414)

In this case, the author was testing the queue manager on the same server as the MQ client application i.e. localhost which would be the same as 127.0.0.1. Each queue manager must have a unique port #. 1414 is the default.

So, if your queue manager is running on a remote host i.e. 10.10.10.10 and using port # 1415 then mq.connection.name.list value would be:

mq.connection.name.list=10.10.10.10(1415)

So, where are you running the queue manager and port # is it using?

Roger
  • 7,062
  • 13
  • 20
  • Hey Roger, thanks for the reply. I am trying to use my computer to use this connector with the IBM MQ installed on my machine (nothing remote). The Queue manager is running on my machine and the port is 1414. – trougc Apr 26 '18 at 17:23
  • Hi, I think the problem is possibly extremely simple. MQ does not use the industry-standard host:port syntax. It uses host(port). Unfortunately, there was a (now fixed) mistake in the instructions. I would try ` mq.connection.name.list=10.10.10.10(1415) ` Hope this helps. Sorry for the silly typo in my instructions. – Andrew Schofield Apr 27 '18 at 09:12