Connecting to IBM MQ from Java client is failing with MQJE001: Completion Code '2', Reason '2035'
<p>I have a IBM MQ version 7.5 installation in windows 7. I have created a queue manager, channel and listener using the following commands.</p>

<pre><code>//CREATE THE QUEUE MANAGER
crtmqm.exe PG3RT1

//START THE QUEUE MANAGER AS INTERACTIVE
strmqm.exe -si PG3RT1

//CONNECT AS SCRIPT CONSOLE
runmqsc.exe PG3RT1

//CREATE THE CHANNEL TO APPLICATION CONNECTIVITY
DEFINE CHANNEL(PG3RT1.CHANNEL) CHLTYPE(SVRCONN) TRPTYPE(TCP)

//CREATE THE LISTENER 
DEFINE LISTENER(LISTENER.PG3RT1) TRPTYPE(TCP) PORT(1414)

//START THE LISTENER
START LISTENER(LISTENER.PG3RT1)
</code></pre>

<p>Now i am trying to connect to the Queue Manager using following java client.
connection is rejected with the following error.</p>

<pre><code>    15:06:52.175 [localhost-startStop-1] ERROR c.b.c.s.s.m.MQUtil - MQJE001: Completion Code '2', Reason '2035'.
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2035'.
        at com.ibm.mq.MQManagedConnectionJ11.&lt;init&gt;(MQManagedConnectionJ11.java:230)
        at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:553)
        at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:593)
        at com.ibm.mq.StoredManagedConnection.&lt;init&gt;(StoredManagedConnection.java:96)
        at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:198)
        at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:893)
        at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:780)
        at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:729)
        at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:177)
        at com.ibm.mq.MQQueueManager.&lt;init&gt;(MQQueueManager.java:745)
        at com.bcs.cas.sach.simulator.mq.MQUtil.init(MQUtil.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
</code></pre>

<p>Can anyone advise why the connection is failing. 
Do i need to enable remote administration on the queue manager?</p>

<p>Following is the code fragement i used for connection</p>

<pre><code>public void init(){
    MQEnvironment.hostname = hostName;
    MQEnvironment.port = Integer.valueOf(port);
    MQEnvironment.channel = serverChannelName;
    MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);
    LOGGER.info("queueManagerName: " + queueManagerName);
    LOGGER.info("hostName: " + hostName);
    LOGGER.info("serverChannelName: " + serverChannelName);
    LOGGER.info("port: " + port);
    //initialize the connection pool
    MQPoolToken token = MQEnvironment.addConnectionPoolToken();
    try {
        mqQueueManager = new MQQueueManager(queueManagerName, MQEnvironment.properties);
        LOGGER.info("mqQueueManager: " + mqQueueManager);
    } catch (MQException e) {
        LOGGER.error(e.getMessage(), e);
    }
}
</code></pre>