<div dir="ltr">Flash News :�<div>I am sorry to bother you a lot this morning . But I have an interesting finding�</div><div>When I activate my client with the tracer - it connects well to the rabbitmq server .�</div><div>when I connect directly - it throws that exception .�</div>
<div><br></div><div>So maybe my problem is with the connection string ?�</div><div>here it is - I only replace the �ip and port�</div><div>BasicChannel(Username, Password, VirtualHost, BrokerIp, BrokerPort, Heartbeat);�</div>
<div>BasicChannel(Username, Password, VirtualHost, &quot;127.0.0.1&quot;,5672, Heartbeat);<br><br></div><div>and my ctor is�</div><div><pre>public BasicChannel(final String username, final String password, final String virtualHost, final String brokerIp, final int brokerPort, int heartbeat) {
        ConnectionFactory factory = new ConnectionFactory();
        factory.setUsername(username);
        factory.setPassword(password);
        factory.setVirtualHost(virtualHost);
        factory.setRequestedHeartbeat(heartbeat);
        factory.setHost(brokerIp);
        factory.setPort(brokerPort);

        connection = null;
        try {
            connection = factory.newConnection();
        } catch (IOException e) {
            throw new PlatformException(&quot;could not create connection&quot;, e);
        }</pre></div><div><br></div><div><br></div><div>Thanks</div><div><br></div><div><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 9:26 AM, mysurf mail <span dir="ltr">&lt;<a href="mailto:stammailbox@gmail.com">stammailbox@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Sorry,�<div>I get PossibleAuthenticationFailureException</div><div><br></div><div><pre>PlatformException: could not create connection
        at com.programa17.mmm.modules.stopwatch.util.BasicChannel.&lt;init&gt;(BasicChannel.java:40)
        at com.programa17.mmm.modules.stopwatch.util.BasicChannel.&lt;init&gt;(BasicChannel.java:23)
        at com.programa17.mmm.modules.stopwatch.util.RabbitMQTest$Manager.&lt;init&gt;(RabbitMQTest.java:94)
        at com.programa17.mmm.modules.stopwatch.util.RabbitMQTest.test1(RabbitMQTest.java:22)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
Caused by: com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly caused by authentication failure
        at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:289)
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:383)
        at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:403)
        at com.programa17.mmm.modules.stopwatch.util.BasicChannel.&lt;init&gt;(BasicChannel.java:38)
        ... 23 more
Caused by: com.rabbitmq.client.AlreadyClosedException: clean connection shutdown; reason: Attempt to use closed channel
        at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:181)
        at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:208)
        at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:194)
        at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:281)
        ... 26 more</pre><div><div></div><div class="h5"><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 9:01 AM, mysurf mail <span dir="ltr">&lt;<a href="mailto:stammailbox@gmail.com" target="_blank">stammailbox@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Ok,�<div>I will repeat my test results fully .�</div><div>It happens only from certain computers.�</div><div>It usually throws an exception when the command�</div><div>factory.newConnection() is invoked.�</div>


<div>the exception is ConnectionException. I have it in the initial mail of this thread.</div><div>( I can telnet that port. I can connect from other computers. I can connect to it with 1.7.0 clients )</div><div><br></div>


<div>I dont think I am acking until that point.�</div><div><div></div><div><div><br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 5:59 PM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br>
<br>
On 01/03/11 14:57, mysurf mail wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
<br>
I setup a trace at the client app server. Set the listen port and<br>
connection port and got a log for the unsuccessful<br>
factory.newConnection() . I added it in attached the tracelog.txt.<br>
</blockquote>
<br></div>
This looks like a normal trace with a successful connection establishment, and subsequent exchange and queue declarations. I would be surprised if the broker logfile contained an abrupt connection failure at the corresponding time. Can you please confirm? If possible please supply a trace of a case where an error occurs.<div>


<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
now regarding the other references you gave me<br>
<br>
1 Protocol errors:<br>
 �Acknowledging with an unknown delivery tag<br>
 �Redeclaring exchanges with different parameters<br>
<br>
you recommended not acking more than once. This whole thing started when<br>
we upgraded the rabbitmq version and Matthias sujested we will change<br>
the consumer to ack (i.e. we changed it to<br>
channel.basicConsume(queueName, FALSE, queueingConsumer);)<br>
(This is if I understood him right )<br>
So How can I control the acking . How do I know if I ack more then once.<br>
</blockquote>
<br></div>
This is more than a recommendation. From the specification:<br>
<br>
 �&quot;a client MUST not acknowledge the same message more than once.&quot;<br>
<br>
Check whether your client contains instances of &quot;channel.basicAck&quot;. If you acknowledge messages more than once you will see a channel exception.<br><font color="#888888">
<br>
<br>
Emile<br>
</font></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>