You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Harsha Halgaswatta <ha...@gmail.com> on 2010/01/11 10:06:28 UTC

Broker connection refused

hi

I tried the client example SubscriptionWrapper after starting the
broker with management disabled.  but i could not connect : Fatal
error: javax.jms.JMSException: Error creating connection: Connection
refused.

my connection string was :
amqp://guest:guest@localhost/test?brokerlist='tcp://localhost:5672'
Please let me know what would be the issue.

Thanks in advance
Harsha

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Marnie McCormack <ma...@googlemail.com>.
There are some dev notes about using the jpda options here:
http://qpid.apache.org/qpid-java-run-scripts.html

Hth,
Marnie

On Fri, Jan 15, 2010 at 5:29 PM, Robbie Gemmell <ro...@gmail.com>wrote:

> Hi Harsha,
>
> You can enable remote debugging by declaring the standard JVM debug
> options directly in one of the environment variables used by the
> qpid-run script (eg JAVA_OPTS, QPID_OPTS) or making 'proper' use of
> the qpid-run script's handling for JPDA options (open the script, from
> build\bin or common\bin and youll see the seection with overview about
> 2/3rds down). If you meant you are starting the broker directly using
> the Main class within Eclipse then you should be able to debug it
> directly without any of the above.
>
> As for producing messages, I would look at the
> org.apache.qpid.example.jmsexample.* packages in client\examples,
> which provide JMS examples for common messaging use cases using
> various features of the broker.
>
> Robbie
>
> 2010/1/14 Harsha Halgaswatta <ha...@gmail.com>:
>  > Hi Robbie , Marnei
> >
> > After setting sslonly to false  i found it is ok . Further my
> > connection string was admin/admin as credentials. As Marnei mentioned
> > that did not work. so after changing it to guest/guest it worked. So
> > thanks a lot for the information.Thanks for the information
> >
> > Further i need to know how to enable remote debugging in broker and
> > feed some messages on  the queue in case of invoking subscribers. is
> > there any readings for this as well.
> >
> > Thanks
> > Harsha.
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Broker connection refused

Posted by Harsha Halgaswatta <ha...@gmail.com>.
HI Robbie

Thanks for the information, It is really helpful. I will have a look at it.

Thanks
Harsha

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Harsha,

You can enable remote debugging by declaring the standard JVM debug
options directly in one of the environment variables used by the
qpid-run script (eg JAVA_OPTS, QPID_OPTS) or making 'proper' use of
the qpid-run script's handling for JPDA options (open the script, from
build\bin or common\bin and youll see the seection with overview about
2/3rds down). If you meant you are starting the broker directly using
the Main class within Eclipse then you should be able to debug it
directly without any of the above.

As for producing messages, I would look at the
org.apache.qpid.example.jmsexample.* packages in client\examples,
which provide JMS examples for common messaging use cases using
various features of the broker.

Robbie

2010/1/14 Harsha Halgaswatta <ha...@gmail.com>:
> Hi Robbie , Marnei
>
> After setting sslonly to false  i found it is ok . Further my
> connection string was admin/admin as credentials. As Marnei mentioned
> that did not work. so after changing it to guest/guest it worked. So
> thanks a lot for the information.Thanks for the information
>
> Further i need to know how to enable remote debugging in broker and
> feed some messages on  the queue in case of invoking subscribers. is
> there any readings for this as well.
>
> Thanks
> Harsha.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Harsha Halgaswatta <ha...@gmail.com>.
Hi Robbie , Marnei

After setting sslonly to false  i found it is ok . Further my
connection string was admin/admin as credentials. As Marnei mentioned
that did not work. so after changing it to guest/guest it worked. So
thanks a lot for the information.Thanks for the information

Further i need to know how to enable remote debugging in broker and
feed some messages on  the queue in case of invoking subscribers. is
there any readings for this as well.

Thanks
Harsha.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Marnie McCormack <ma...@googlemail.com>.
Hi Harsha,

I've run this example quite a bit - can you post (copy into your message
rather than attach) the broker log for your running broker please ? Can you
also verify the use credentials i.e. userid/pwd guest/guest ?

The most likely explanation is that the user credentials are invalid.

Regards,
Marnie

On Wed, Jan 13, 2010 at 12:00 PM, Robbie Gemmell
<ro...@gmail.com>wrote:

> Hi Harsha,
>
> I havent had a chance to look further at this yet, ill try tonight.
> Although I didnt for my test below, I often run the broker and
> examples through Eclipse during development so I dont think that is
> your problem (certainly the example classes seem to have worked or you
> would probably have recieved a completely different error). Can you
> try starting the broker outwith Eclipse to be sure though?
>
> Robbie
>
> 2010/1/12 Harsha Halgaswatta <ha...@gmail.com>:
> > Hi Robbie
> >
> > Thanks for taking time on this , i used trunk as well , but i tried
> > SubscriptionWrapper inside eclipse. Not paired with the examples jars.
> > is it a problem ? . I can start the broker through eclipse , but could
> > not connect.
> >
> >
> > my config is as follows:
> >
> > <broker>
> >    <prefix>/home/harsha/Qpid/qpid/java/broker</prefix>
> >    <work>${QPID_WORK}</work>
> >    <conf>${prefix}/etc</conf>
> >    <connector>
> >        <!-- To enable SSL edit the keystorePath and keystorePassword
> >             and set enabled to true.
> >             To disasble Non-SSL port set sslOnly to true -->
> >        <ssl>
> >            <enabled>false</enabled>
> >            <sslOnly>true</sslOnly>
> >
>  <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
> >            <keystorePassword>keystorepass</keystorePassword>
> >        </ssl>
> >        <qpidnio>false</qpidnio>
> >        <protectio>
> >            <enabled>false</enabled>
> >            <readBufferLimitSize>262144</readBufferLimitSize>
> >            <writeBufferLimitSize>262144</writeBufferLimitSize>
> >        </protectio>
> >        <transport>nio</transport>
> >        <port>5672</port>
> >        <sslport>8672</sslport>
> >        <socketReceiveBuffer>32768</socketReceiveBuffer>
> >        <socketSendBuffer>32768</socketSendBuffer>
> >    </connector>
> >    <management>
> >        <enabled>false</enabled>
> >        <jmxport>8999</jmxport>
> >        <ssl>
> >            <enabled>true</enabled>
> >            <!-- Update below path to your keystore location, eg
> > ${conf}/qpid.keystore  -->
> >
>  <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
> >            <keyStorePassword>password</keyStorePassword>
> >        </ssl>
> >    </management>
> >    <advanced>
> >        <filterchain enableExecutorPool="true"/>
> >        <enablePooledAllocator>false</enablePooledAllocator>
> >        <enableDirectBuffers>false</enableDirectBuffers>
> >        <framesize>65535</framesize>
> >        <compressBufferOnQueue>false</compressBufferOnQueue>
> >        <enableJMSXUserID>false</enableJMSXUserID>
> >        <locale>en_US</locale>
> >    </advanced>
> >
> >    <security>
> >        <principal-databases>
> >            <!-- Example use of Base64 encoded MD5 hashes for
> > authentication via CRAM-MD5-Hashed -->
> >            <principal-database>
> >                <name>passwordfile</name>
> >
> >
> <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
> >                <attributes>
> >                    <attribute>
> >                        <name>passwordFile</name>
> >                        <value>${conf}/passwd</value>
> >                    </attribute>
> >                </attributes>
> >            </principal-database>
> >        </principal-databases>
> >
> >        <access>
> >
>  <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
> >        </access>
> >
> >        <msg-auth>false</msg-auth>
> >
> >        <jmx>
> >            <access>${conf}/jmxremote.access</access>
> >            <principal-database>passwordfile</principal-database>
> >        </jmx>
> >    </security>
> >
> >    <virtualhosts>
> >
> >        <default>test</default>
> >        <virtualhost>
> >            <name>localhost</name>
> >            <localhost>
> >                <store>
> >                    <class>org.apache.qpid.server.store.MemoryMessageStore
> >                    </class>
> >                </store>
> >
> >                <housekeeping>
> >
>  <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
> >                </housekeeping>
> >
> >                <exchanges>
> >                    <exchange>
> >                        <type>direct</type>
> >                        <name>test.direct</name>
> >                        <durable>true</durable>
> >                    </exchange>
> >                    <exchange>
> >                        <type>topic</type>
> >                        <name>test.topic</name>
> >                    </exchange>
> >                </exchanges>
> >                <queues>
> >                    <exchange>amq.direct</exchange>
> >                    <maximumQueueDepth>4235264</maximumQueueDepth>
> >                    <!-- 4Mb -->
> >                    <maximumMessageSize>2117632</maximumMessageSize>
> >                    <!-- 2Mb -->
> >                    <maximumMessageAge>600000</maximumMessageAge>
> >                    <!-- 10 mins -->
> >                    <maximumMessageCount>50</maximumMessageCount>
> >                    <!-- 50 messages -->
> >
> >                    <queue>
> >                        <name>queue</name>
> >                    </queue>
> >                    <queue>
> >                        <name>ping</name>
> >                    </queue>
> >                    <queue>
> >                        <name>test-queue</name>
> >                        <test-queue>
> >                            <exchange>test.direct</exchange>
> >                            <durable>true</durable>
> >                        </test-queue>
> >                    </queue>
> >                    <queue>
> >                        <name>test-ping</name>
> >                        <test-ping>
> >                            <exchange>test.direct</exchange>
> >                        </test-ping>
> >                    </queue>
> >
> >                </queues>
> >            </localhost>
> >        </virtualhost>
> >
> >
> >        <virtualhost>
> >            <name>development</name>
> >            <development>
> >                <store>
> >                    <class>org.apache.qpid.server.store.MemoryMessageStore
> >                    </class>
> >                </store>
> >
> >                <queues>
> >                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
> >                    <maximumMessageCount>50</maximumMessageCount>
> >                    <queue>
> >                        <name>queue</name>
> >                        <queue>
> >                            <exchange>amq.direct</exchange>
> >                            <maximumQueueDepth>4235264</maximumQueueDepth>
> >                            <!-- 4Mb -->
> >
>  <maximumMessageSize>2117632</maximumMessageSize>
> >                            <!-- 2Mb -->
> >                            <maximumMessageAge>600000</maximumMessageAge>
> >                            <!-- 10 mins -->
> >                        </queue>
> >                    </queue>
> >                    <queue>
> >                        <name>ping</name>
> >                        <ping>
> >                            <exchange>amq.direct</exchange>
> >                            <maximumQueueDepth>4235264</maximumQueueDepth>
> >                            <!-- 4Mb -->
> >
>  <maximumMessageSize>2117632</maximumMessageSize>
> >                            <!-- 2Mb -->
> >                            <maximumMessageAge>600000</maximumMessageAge>
> >                            <!-- 10 mins -->
> >                        </ping>
> >                    </queue>
> >                </queues>
> >            </development>
> >        </virtualhost>
> >        <virtualhost>
> >            <name>test</name>
> >            <test>
> >                <store>
> >                    <class>org.apache.qpid.server.store.MemoryMessageStore
> >                    </class>
> >                </store>
> >
> >                <queues>
> >                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
> >                    <maximumMessageCount>50</maximumMessageCount>
> >                    <queue>
> >                        <name>queue</name>
> >                        <queue>
> >                            <exchange>amq.direct</exchange>
> >                            <maximumQueueDepth>4235264</maximumQueueDepth>
> >                            <!-- 4Mb -->
> >
>  <maximumMessageSize>2117632</maximumMessageSize>
> >                            <!-- 2Mb -->
> >                            <maximumMessageAge>600000</maximumMessageAge>
> >                            <!-- 10 mins -->
> >                        </queue>
> >                    </queue>
> >                    <queue>
> >                        <name>ping</name>
> >                        <ping>
> >                            <exchange>amq.direct</exchange>
> >                            <maximumQueueDepth>4235264</maximumQueueDepth>
> >                            <!-- 4Mb -->
> >
>  <maximumMessageSize>2117632</maximumMessageSize>
> >                            <!-- 2Mb -->
> >                            <maximumMessageAge>600000</maximumMessageAge>
> >                            <!-- 10 mins -->
> >                        </ping>
> >                    </queue>
> >                </queues>
> >            </test>
> >        </virtualhost>
> >    </virtualhosts>
> >    <heartbeat>
> >        <delay>0</delay>
> >        <timeoutFactor>2.0</timeoutFactor>
> >    </heartbeat>
> >    <queue>
> >        <auto_register>true</auto_register>
> >    </queue>
> >
> >    <status-updates>ON</status-updates>
> >
> > </broker>
> >
> >
> > and the example.properties file is :
> >
> >
> > java.naming.factory.initial =
> > org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> > connectionfactory.local =
> > amqp://admin:admin@localhost/test?brokerlist='tcp://127.0.0.1:5672'
> > queue.MyQueue = example.MyQueue
> > topic.ibmStocks = stocks.nyse.ibm
> > destination.direct = direct://amq.direct//directQueue
> >
> >
> > Thanks in advance
> > Harsha
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Broker connection refused

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Harsha,

I havent had a chance to look further at this yet, ill try tonight.
Although I didnt for my test below, I often run the broker and
examples through Eclipse during development so I dont think that is
your problem (certainly the example classes seem to have worked or you
would probably have recieved a completely different error). Can you
try starting the broker outwith Eclipse to be sure though?

Robbie

2010/1/12 Harsha Halgaswatta <ha...@gmail.com>:
> Hi Robbie
>
> Thanks for taking time on this , i used trunk as well , but i tried
> SubscriptionWrapper inside eclipse. Not paired with the examples jars.
> is it a problem ? . I can start the broker through eclipse , but could
> not connect.
>
>
> my config is as follows:
>
> <broker>
>    <prefix>/home/harsha/Qpid/qpid/java/broker</prefix>
>    <work>${QPID_WORK}</work>
>    <conf>${prefix}/etc</conf>
>    <connector>
>        <!-- To enable SSL edit the keystorePath and keystorePassword
>             and set enabled to true.
>             To disasble Non-SSL port set sslOnly to true -->
>        <ssl>
>            <enabled>false</enabled>
>            <sslOnly>true</sslOnly>
>            <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
>            <keystorePassword>keystorepass</keystorePassword>
>        </ssl>
>        <qpidnio>false</qpidnio>
>        <protectio>
>            <enabled>false</enabled>
>            <readBufferLimitSize>262144</readBufferLimitSize>
>            <writeBufferLimitSize>262144</writeBufferLimitSize>
>        </protectio>
>        <transport>nio</transport>
>        <port>5672</port>
>        <sslport>8672</sslport>
>        <socketReceiveBuffer>32768</socketReceiveBuffer>
>        <socketSendBuffer>32768</socketSendBuffer>
>    </connector>
>    <management>
>        <enabled>false</enabled>
>        <jmxport>8999</jmxport>
>        <ssl>
>            <enabled>true</enabled>
>            <!-- Update below path to your keystore location, eg
> ${conf}/qpid.keystore  -->
>            <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
>            <keyStorePassword>password</keyStorePassword>
>        </ssl>
>    </management>
>    <advanced>
>        <filterchain enableExecutorPool="true"/>
>        <enablePooledAllocator>false</enablePooledAllocator>
>        <enableDirectBuffers>false</enableDirectBuffers>
>        <framesize>65535</framesize>
>        <compressBufferOnQueue>false</compressBufferOnQueue>
>        <enableJMSXUserID>false</enableJMSXUserID>
>        <locale>en_US</locale>
>    </advanced>
>
>    <security>
>        <principal-databases>
>            <!-- Example use of Base64 encoded MD5 hashes for
> authentication via CRAM-MD5-Hashed -->
>            <principal-database>
>                <name>passwordfile</name>
>
> <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
>                <attributes>
>                    <attribute>
>                        <name>passwordFile</name>
>                        <value>${conf}/passwd</value>
>                    </attribute>
>                </attributes>
>            </principal-database>
>        </principal-databases>
>
>        <access>
>            <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
>        </access>
>
>        <msg-auth>false</msg-auth>
>
>        <jmx>
>            <access>${conf}/jmxremote.access</access>
>            <principal-database>passwordfile</principal-database>
>        </jmx>
>    </security>
>
>    <virtualhosts>
>
>        <default>test</default>
>        <virtualhost>
>            <name>localhost</name>
>            <localhost>
>                <store>
>                    <class>org.apache.qpid.server.store.MemoryMessageStore
>                    </class>
>                </store>
>
>                <housekeeping>
>                    <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
>                </housekeeping>
>
>                <exchanges>
>                    <exchange>
>                        <type>direct</type>
>                        <name>test.direct</name>
>                        <durable>true</durable>
>                    </exchange>
>                    <exchange>
>                        <type>topic</type>
>                        <name>test.topic</name>
>                    </exchange>
>                </exchanges>
>                <queues>
>                    <exchange>amq.direct</exchange>
>                    <maximumQueueDepth>4235264</maximumQueueDepth>
>                    <!-- 4Mb -->
>                    <maximumMessageSize>2117632</maximumMessageSize>
>                    <!-- 2Mb -->
>                    <maximumMessageAge>600000</maximumMessageAge>
>                    <!-- 10 mins -->
>                    <maximumMessageCount>50</maximumMessageCount>
>                    <!-- 50 messages -->
>
>                    <queue>
>                        <name>queue</name>
>                    </queue>
>                    <queue>
>                        <name>ping</name>
>                    </queue>
>                    <queue>
>                        <name>test-queue</name>
>                        <test-queue>
>                            <exchange>test.direct</exchange>
>                            <durable>true</durable>
>                        </test-queue>
>                    </queue>
>                    <queue>
>                        <name>test-ping</name>
>                        <test-ping>
>                            <exchange>test.direct</exchange>
>                        </test-ping>
>                    </queue>
>
>                </queues>
>            </localhost>
>        </virtualhost>
>
>
>        <virtualhost>
>            <name>development</name>
>            <development>
>                <store>
>                    <class>org.apache.qpid.server.store.MemoryMessageStore
>                    </class>
>                </store>
>
>                <queues>
>                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
>                    <maximumMessageCount>50</maximumMessageCount>
>                    <queue>
>                        <name>queue</name>
>                        <queue>
>                            <exchange>amq.direct</exchange>
>                            <maximumQueueDepth>4235264</maximumQueueDepth>
>                            <!-- 4Mb -->
>                            <maximumMessageSize>2117632</maximumMessageSize>
>                            <!-- 2Mb -->
>                            <maximumMessageAge>600000</maximumMessageAge>
>                            <!-- 10 mins -->
>                        </queue>
>                    </queue>
>                    <queue>
>                        <name>ping</name>
>                        <ping>
>                            <exchange>amq.direct</exchange>
>                            <maximumQueueDepth>4235264</maximumQueueDepth>
>                            <!-- 4Mb -->
>                            <maximumMessageSize>2117632</maximumMessageSize>
>                            <!-- 2Mb -->
>                            <maximumMessageAge>600000</maximumMessageAge>
>                            <!-- 10 mins -->
>                        </ping>
>                    </queue>
>                </queues>
>            </development>
>        </virtualhost>
>        <virtualhost>
>            <name>test</name>
>            <test>
>                <store>
>                    <class>org.apache.qpid.server.store.MemoryMessageStore
>                    </class>
>                </store>
>
>                <queues>
>                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
>                    <maximumMessageCount>50</maximumMessageCount>
>                    <queue>
>                        <name>queue</name>
>                        <queue>
>                            <exchange>amq.direct</exchange>
>                            <maximumQueueDepth>4235264</maximumQueueDepth>
>                            <!-- 4Mb -->
>                            <maximumMessageSize>2117632</maximumMessageSize>
>                            <!-- 2Mb -->
>                            <maximumMessageAge>600000</maximumMessageAge>
>                            <!-- 10 mins -->
>                        </queue>
>                    </queue>
>                    <queue>
>                        <name>ping</name>
>                        <ping>
>                            <exchange>amq.direct</exchange>
>                            <maximumQueueDepth>4235264</maximumQueueDepth>
>                            <!-- 4Mb -->
>                            <maximumMessageSize>2117632</maximumMessageSize>
>                            <!-- 2Mb -->
>                            <maximumMessageAge>600000</maximumMessageAge>
>                            <!-- 10 mins -->
>                        </ping>
>                    </queue>
>                </queues>
>            </test>
>        </virtualhost>
>    </virtualhosts>
>    <heartbeat>
>        <delay>0</delay>
>        <timeoutFactor>2.0</timeoutFactor>
>    </heartbeat>
>    <queue>
>        <auto_register>true</auto_register>
>    </queue>
>
>    <status-updates>ON</status-updates>
>
> </broker>
>
>
> and the example.properties file is :
>
>
> java.naming.factory.initial =
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> connectionfactory.local =
> amqp://admin:admin@localhost/test?brokerlist='tcp://127.0.0.1:5672'
> queue.MyQueue = example.MyQueue
> topic.ibmStocks = stocks.nyse.ibm
> destination.direct = direct://amq.direct//directQueue
>
>
> Thanks in advance
> Harsha
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: Broker connection refused

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Harsha,

When trying to run the broker with your config I was observing a full
startup sequence followed by an immediate shutdown, with no signal of error.
This would certainly lead to the error you reported, as the broker is not
listening and so your connection attempts are refused.

Upon investigation, the problem here is that you have 'sslOnly' set to true
for the connector, but SSL is not enabled. The current handing of these
options undertaken in the server startup means that this effectively
disables the broker because neither the SSL or non-SSL ports are bound as a
result. Set 'sslOnly' to false and you should hopefully have more luck :)

Robbie

> -----Original Message-----
> From: Harsha Halgaswatta [mailto:harsha.halgaswatta@gmail.com]
> Sent: 12 January 2010 02:57
> To: users@qpid.apache.org
> Subject: Re: Broker connection refused
> 
> Hi Robbie
> 
> Thanks for taking time on this , i used trunk as well , but i tried
> SubscriptionWrapper inside eclipse. Not paired with the examples jars.
> is it a problem ? . I can start the broker through eclipse , but could
> not connect.
> 
> 
> my config is as follows:
> 
> <broker>
>     <prefix>/home/harsha/Qpid/qpid/java/broker</prefix>
>     <work>${QPID_WORK}</work>
>     <conf>${prefix}/etc</conf>
>     <connector>
>         <!-- To enable SSL edit the keystorePath and keystorePassword
> 	     and set enabled to true.
>              To disasble Non-SSL port set sslOnly to true -->
>         <ssl>
>             <enabled>false</enabled>
>             <sslOnly>true</sslOnly>
> 
> <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyS
> torePath>
>             <keystorePassword>keystorepass</keystorePassword>
>         </ssl>
>         <qpidnio>false</qpidnio>
>         <protectio>
>             <enabled>false</enabled>
>             <readBufferLimitSize>262144</readBufferLimitSize>
>             <writeBufferLimitSize>262144</writeBufferLimitSize>
>         </protectio>
>         <transport>nio</transport>
>         <port>5672</port>
>         <sslport>8672</sslport>
>         <socketReceiveBuffer>32768</socketReceiveBuffer>
>         <socketSendBuffer>32768</socketSendBuffer>
>     </connector>
>     <management>
>         <enabled>false</enabled>
>         <jmxport>8999</jmxport>
>         <ssl>
>             <enabled>true</enabled>
>             <!-- Update below path to your keystore location, eg
> ${conf}/qpid.keystore  -->
> 
> <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyS
> torePath>
>             <keyStorePassword>password</keyStorePassword>
>         </ssl>
>     </management>
>     <advanced>
>         <filterchain enableExecutorPool="true"/>
>         <enablePooledAllocator>false</enablePooledAllocator>
>         <enableDirectBuffers>false</enableDirectBuffers>
>         <framesize>65535</framesize>
>         <compressBufferOnQueue>false</compressBufferOnQueue>
>         <enableJMSXUserID>false</enableJMSXUserID>
>         <locale>en_US</locale>
>     </advanced>
> 
>     <security>
>         <principal-databases>
>             <!-- Example use of Base64 encoded MD5 hashes for
> authentication via CRAM-MD5-Hashed -->
>             <principal-database>
>                 <name>passwordfile</name>
> 
> <class>org.apache.qpid.server.security.auth.database.PlainPasswordFileP
> rincipalDatabase</class>
>                 <attributes>
>                     <attribute>
>                         <name>passwordFile</name>
>                         <value>${conf}/passwd</value>
>                     </attribute>
>                 </attributes>
>             </principal-database>
>         </principal-databases>
> 
>         <access>
> 
> <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
>         </access>
> 
>         <msg-auth>false</msg-auth>
> 
>         <jmx>
>             <access>${conf}/jmxremote.access</access>
>             <principal-database>passwordfile</principal-database>
>         </jmx>
>     </security>
> 
>     <virtualhosts>
> 
>         <default>test</default>
>         <virtualhost>
>             <name>localhost</name>
>             <localhost>
>                 <store>
> 
> <class>org.apache.qpid.server.store.MemoryMessageStore
>                     </class>
>                 </store>
> 
>                 <housekeeping>
> 
> <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
>                 </housekeeping>
> 
>                 <exchanges>
>                     <exchange>
>                         <type>direct</type>
>                         <name>test.direct</name>
>                         <durable>true</durable>
>                     </exchange>
>                     <exchange>
>                         <type>topic</type>
>                         <name>test.topic</name>
>                     </exchange>
>                 </exchanges>
>                 <queues>
>                     <exchange>amq.direct</exchange>
>                     <maximumQueueDepth>4235264</maximumQueueDepth>
>                     <!-- 4Mb -->
>                     <maximumMessageSize>2117632</maximumMessageSize>
>                     <!-- 2Mb -->
>                     <maximumMessageAge>600000</maximumMessageAge>
>                     <!-- 10 mins -->
>                     <maximumMessageCount>50</maximumMessageCount>
>                     <!-- 50 messages -->
> 
>                     <queue>
>                         <name>queue</name>
>                     </queue>
>                     <queue>
>                         <name>ping</name>
>                     </queue>
>                     <queue>
>                         <name>test-queue</name>
>                         <test-queue>
>                             <exchange>test.direct</exchange>
>                             <durable>true</durable>
>                         </test-queue>
>                     </queue>
>                     <queue>
>                         <name>test-ping</name>
>                         <test-ping>
>                             <exchange>test.direct</exchange>
>                         </test-ping>
>                     </queue>
> 
>                 </queues>
>             </localhost>
>         </virtualhost>
> 
> 
>         <virtualhost>
>             <name>development</name>
>             <development>
>                 <store>
> 
> <class>org.apache.qpid.server.store.MemoryMessageStore
>                     </class>
>                 </store>
> 
>                 <queues>
> 
> <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
>                     <maximumMessageCount>50</maximumMessageCount>
>                     <queue>
>                         <name>queue</name>
>                         <queue>
>                             <exchange>amq.direct</exchange>
> 
> <maximumQueueDepth>4235264</maximumQueueDepth>
>                             <!-- 4Mb -->
> 
> <maximumMessageSize>2117632</maximumMessageSize>
>                             <!-- 2Mb -->
> 
> <maximumMessageAge>600000</maximumMessageAge>
>                             <!-- 10 mins -->
>                         </queue>
>                     </queue>
>                     <queue>
>                         <name>ping</name>
>                         <ping>
>                             <exchange>amq.direct</exchange>
> 
> <maximumQueueDepth>4235264</maximumQueueDepth>
>                             <!-- 4Mb -->
> 
> <maximumMessageSize>2117632</maximumMessageSize>
>                             <!-- 2Mb -->
> 
> <maximumMessageAge>600000</maximumMessageAge>
>                             <!-- 10 mins -->
>                         </ping>
>                     </queue>
>                 </queues>
>             </development>
>         </virtualhost>
>         <virtualhost>
>             <name>test</name>
>             <test>
>                 <store>
> 
> <class>org.apache.qpid.server.store.MemoryMessageStore
>                     </class>
>                 </store>
> 
>                 <queues>
> 
> <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
>                     <maximumMessageCount>50</maximumMessageCount>
>                     <queue>
>                         <name>queue</name>
>                         <queue>
>                             <exchange>amq.direct</exchange>
> 
> <maximumQueueDepth>4235264</maximumQueueDepth>
>                             <!-- 4Mb -->
> 
> <maximumMessageSize>2117632</maximumMessageSize>
>                             <!-- 2Mb -->
> 
> <maximumMessageAge>600000</maximumMessageAge>
>                             <!-- 10 mins -->
>                         </queue>
>                     </queue>
>                     <queue>
>                         <name>ping</name>
>                         <ping>
>                             <exchange>amq.direct</exchange>
> 
> <maximumQueueDepth>4235264</maximumQueueDepth>
>                             <!-- 4Mb -->
> 
> <maximumMessageSize>2117632</maximumMessageSize>
>                             <!-- 2Mb -->
> 
> <maximumMessageAge>600000</maximumMessageAge>
>                             <!-- 10 mins -->
>                         </ping>
>                     </queue>
>                 </queues>
>             </test>
>         </virtualhost>
>     </virtualhosts>
>     <heartbeat>
>         <delay>0</delay>
>         <timeoutFactor>2.0</timeoutFactor>
>     </heartbeat>
>     <queue>
>         <auto_register>true</auto_register>
>     </queue>
> 
>     <status-updates>ON</status-updates>
> 
> </broker>
> 
> 
> and the example.properties file is :
> 
> 
> java.naming.factory.initial =
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
> connectionfactory.local =
> amqp://admin:admin@localhost/test?brokerlist='tcp://127.0.0.1:5672'
> queue.MyQueue = example.MyQueue
> topic.ibmStocks = stocks.nyse.ibm
> destination.direct = direct://amq.direct//directQueue
> 
> 
> Thanks in advance
> Harsha
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Harsha Halgaswatta <ha...@gmail.com>.
Hi Robbie

Thanks for taking time on this , i used trunk as well , but i tried
SubscriptionWrapper inside eclipse. Not paired with the examples jars.
is it a problem ? . I can start the broker through eclipse , but could
not connect.


my config is as follows:

<broker>
    <prefix>/home/harsha/Qpid/qpid/java/broker</prefix>
    <work>${QPID_WORK}</work>
    <conf>${prefix}/etc</conf>
    <connector>
        <!-- To enable SSL edit the keystorePath and keystorePassword
	     and set enabled to true.
             To disasble Non-SSL port set sslOnly to true -->
        <ssl>
            <enabled>false</enabled>
            <sslOnly>true</sslOnly>
            <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
            <keystorePassword>keystorepass</keystorePassword>
        </ssl>
        <qpidnio>false</qpidnio>
        <protectio>
            <enabled>false</enabled>
            <readBufferLimitSize>262144</readBufferLimitSize>
            <writeBufferLimitSize>262144</writeBufferLimitSize>	
        </protectio>
        <transport>nio</transport>
        <port>5672</port>
        <sslport>8672</sslport>
        <socketReceiveBuffer>32768</socketReceiveBuffer>
        <socketSendBuffer>32768</socketSendBuffer>
    </connector>
    <management>
        <enabled>false</enabled>
        <jmxport>8999</jmxport>
        <ssl>
            <enabled>true</enabled>
            <!-- Update below path to your keystore location, eg
${conf}/qpid.keystore  -->
            <keyStorePath>/home/harsha/Qpid/qpid/java/build/bin/qpid.keystore</keyStorePath>
            <keyStorePassword>password</keyStorePassword>
        </ssl>
    </management>
    <advanced>
        <filterchain enableExecutorPool="true"/>
        <enablePooledAllocator>false</enablePooledAllocator>
        <enableDirectBuffers>false</enableDirectBuffers>
        <framesize>65535</framesize>
        <compressBufferOnQueue>false</compressBufferOnQueue>
        <enableJMSXUserID>false</enableJMSXUserID>
        <locale>en_US</locale>	
    </advanced>

    <security>
        <principal-databases>
            <!-- Example use of Base64 encoded MD5 hashes for
authentication via CRAM-MD5-Hashed -->
            <principal-database>
                <name>passwordfile</name>

<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
                <attributes>
                    <attribute>
                        <name>passwordFile</name>
                        <value>${conf}/passwd</value>
                    </attribute>
                </attributes>
            </principal-database>
        </principal-databases>

        <access>
            <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
        </access>

        <msg-auth>false</msg-auth>

        <jmx>
            <access>${conf}/jmxremote.access</access>
            <principal-database>passwordfile</principal-database>
        </jmx>
    </security>

    <virtualhosts>

        <default>test</default>
        <virtualhost>
            <name>localhost</name>
            <localhost>
                <store>
                    <class>org.apache.qpid.server.store.MemoryMessageStore
                    </class>
                </store>

                <housekeeping>
                    <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
                </housekeeping>

                <exchanges>
                    <exchange>
                        <type>direct</type>
                        <name>test.direct</name>
                        <durable>true</durable>
                    </exchange>
                    <exchange>
                        <type>topic</type>
                        <name>test.topic</name>
                    </exchange>
                </exchanges>
                <queues>
                    <exchange>amq.direct</exchange>
                    <maximumQueueDepth>4235264</maximumQueueDepth>
                    <!-- 4Mb -->
                    <maximumMessageSize>2117632</maximumMessageSize>
                    <!-- 2Mb -->
                    <maximumMessageAge>600000</maximumMessageAge>
                    <!-- 10 mins -->
                    <maximumMessageCount>50</maximumMessageCount>
                    <!-- 50 messages -->

                    <queue>
                        <name>queue</name>
                    </queue>
                    <queue>
                        <name>ping</name>
                    </queue>
                    <queue>
                        <name>test-queue</name>
                        <test-queue>
                            <exchange>test.direct</exchange>
                            <durable>true</durable>
                        </test-queue>
                    </queue>
                    <queue>
                        <name>test-ping</name>
                        <test-ping>
                            <exchange>test.direct</exchange>
                        </test-ping>
                    </queue>

                </queues>
            </localhost>
        </virtualhost>


        <virtualhost>
            <name>development</name>
            <development>
                <store>
                    <class>org.apache.qpid.server.store.MemoryMessageStore
                    </class>
                </store>

                <queues>
                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
                    <maximumMessageCount>50</maximumMessageCount>
                    <queue>
                        <name>queue</name>
                        <queue>
                            <exchange>amq.direct</exchange>
                            <maximumQueueDepth>4235264</maximumQueueDepth>
                            <!-- 4Mb -->
                            <maximumMessageSize>2117632</maximumMessageSize>
                            <!-- 2Mb -->
                            <maximumMessageAge>600000</maximumMessageAge>
                            <!-- 10 mins -->
                        </queue>
                    </queue>
                    <queue>
                        <name>ping</name>
                        <ping>
                            <exchange>amq.direct</exchange>
                            <maximumQueueDepth>4235264</maximumQueueDepth>
                            <!-- 4Mb -->
                            <maximumMessageSize>2117632</maximumMessageSize>
                            <!-- 2Mb -->
                            <maximumMessageAge>600000</maximumMessageAge>
                            <!-- 10 mins -->
                        </ping>
                    </queue>
                </queues>
            </development>
        </virtualhost>
        <virtualhost>
            <name>test</name>
            <test>
                <store>
                    <class>org.apache.qpid.server.store.MemoryMessageStore
                    </class>
                </store>

                <queues>
                    <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
                    <maximumMessageCount>50</maximumMessageCount>
                    <queue>
                        <name>queue</name>
                        <queue>
                            <exchange>amq.direct</exchange>
                            <maximumQueueDepth>4235264</maximumQueueDepth>
                            <!-- 4Mb -->
                            <maximumMessageSize>2117632</maximumMessageSize>
                            <!-- 2Mb -->
                            <maximumMessageAge>600000</maximumMessageAge>
                            <!-- 10 mins -->
                        </queue>
                    </queue>
                    <queue>
                        <name>ping</name>
                        <ping>
                            <exchange>amq.direct</exchange>
                            <maximumQueueDepth>4235264</maximumQueueDepth>
                            <!-- 4Mb -->
                            <maximumMessageSize>2117632</maximumMessageSize>
                            <!-- 2Mb -->
                            <maximumMessageAge>600000</maximumMessageAge>
                            <!-- 10 mins -->
                        </ping>
                    </queue>
                </queues>
            </test>
        </virtualhost>
    </virtualhosts>
    <heartbeat>
        <delay>0</delay>
        <timeoutFactor>2.0</timeoutFactor>
    </heartbeat>
    <queue>
        <auto_register>true</auto_register>
    </queue>

    <status-updates>ON</status-updates>

</broker>


and the example.properties file is :


java.naming.factory.initial =
org.apache.qpid.jndi.PropertiesFileInitialContextFactory
connectionfactory.local =
amqp://admin:admin@localhost/test?brokerlist='tcp://127.0.0.1:5672'
queue.MyQueue = example.MyQueue
topic.ibmStocks = stocks.nyse.ibm
destination.direct = direct://amq.direct//directQueue


Thanks in advance
Harsha

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: Broker connection refused

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Harsha,

I have just run the 0.6 RC3 (effectively trunk) broker with management
disabled, and appeared to be successful in connecting the 0.6 RC3 client
when paired with the examples jar using the SubscriptionWrapper example
(output snippets below). The only way I was able to replicate your output
was to stop the broker and then try the example.

So we can try to figure out the problem you are having, could you confirm
what versions of client/broker/examples you are using, how you
built/extracted them, any config changes you have made, and how you ran the
example.

Regards,
Robbie


Broker:
...
2010-01-11 22:23:41,994 INFO  [main] server.Main (Main.java:336) - Starting
Qpid Broker 0.6 build: 895736
2010-01-11 22:23:47,239 INFO  [main] server.Main (Main.java:453) - Qpid
Broker Ready :0.6 build: 895736

SubscriptionWrapper example:
...
2010-01-11 22:23:56,328 WARN  [IoReceiver - localhost/127.0.0.1:5672]
util.Logger (Logger.java:86) - Ignoring the idle timeout 0 set by the
connection, using the brokers max value 65535

> -----Original Message-----
> From: Robbie Gemmell [mailto:robbie.gemmell@gmail.com]
> Sent: 11 January 2010 10:48
> To: users@qpid.apache.org
> Subject: Re: Broker connection refused
> 
> Hi Harsha,
> 
> I dont have time to look into this right now im afraid, but I will try
> when I get a chance.
> 
> Some questions: Do the other examples work for you against the same
> running broker? Have you modified the configuration other than
> disabling management? Are you using trunk, 0.5, or one of the 0.6
> RC's?
> 
> Robbie
> 
> 
> P.S., most of us work Mon-Fri on Qpid so we sometimes neglect the
> lists at the weekend, dont take it to mean we arent going to reply
> eventually when we get the chance :)
> 
> 2010/1/11 Harsha Halgaswatta <ha...@gmail.com>:
> > hi
> >
> > I tried the client example SubscriptionWrapper after starting the
> > broker with management disabled.  but i could not connect : Fatal
> > error: javax.jms.JMSException: Error creating connection: Connection
> > refused.
> >
> > my connection string was :
> > amqp://guest:guest@localhost/test?brokerlist='tcp://localhost:5672'
> > Please let me know what would be the issue.
> >
> > Thanks in advance
> > Harsha
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
> >


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Broker connection refused

Posted by Robbie Gemmell <ro...@gmail.com>.
Hi Harsha,

I dont have time to look into this right now im afraid, but I will try
when I get a chance.

Some questions: Do the other examples work for you against the same
running broker? Have you modified the configuration other than
disabling management? Are you using trunk, 0.5, or one of the 0.6
RC's?

Robbie


P.S., most of us work Mon-Fri on Qpid so we sometimes neglect the
lists at the weekend, dont take it to mean we arent going to reply
eventually when we get the chance :)

2010/1/11 Harsha Halgaswatta <ha...@gmail.com>:
> hi
>
> I tried the client example SubscriptionWrapper after starting the
> broker with management disabled.  but i could not connect : Fatal
> error: javax.jms.JMSException: Error creating connection: Connection
> refused.
>
> my connection string was :
> amqp://guest:guest@localhost/test?brokerlist='tcp://localhost:5672'
> Please let me know what would be the issue.
>
> Thanks in advance
> Harsha
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org