Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Gordon Sim

On 09/03/2012 11:02 AM, Sajith Kariyawasam wrote:

Hi all,

I'm facing an issue, $subject.

Here's the exception Im getting,

*[Client] warning Closing connection due to internal-error: Sasl error:
SASL(-4): no mechanism available: No worthy mechs found
(qpid/SaslFactory.cpp:280)*
*internal-error: Sasl error: SASL(-4): no mechanism available: No worthy
mechs found (qpid/SaslFactory.cpp:280)*


Any idea?


That means that the client and broker could not agree on a SASL 
mechanism to use for authentication.


Are you specifying and options to the hello world example? If not, the 
client is most likely asking for ANONYMOUS.


Which broker are you using? If qpidd, what does your 
/etc/sasl/qpidd.conf contain?



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: New blog post on AMQP 1.0 and Qpid

2012-09-03 Thread Gordon Sim

On 08/31/2012 06:07 PM, William Henry wrote:

Thanks Gordon! Do you mind if I post this response on my blog and credit to you?


I don't mind at all.


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Sajith Kariyawasam
Thanks for the response Gordon, I'm new to this area.

My Broker is Qpid Java Broker, then which config file I should refer to?
when running the sample I'm not specifying any option, i just execute
./hello_world, as mentioned in
https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt



On Mon, Sep 3, 2012 at 3:40 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 11:02 AM, Sajith Kariyawasam wrote:

 Hi all,

 I'm facing an issue, $subject.

 Here's the exception Im getting,

 *[Client] warning Closing connection due to internal-error: Sasl error:

 SASL(-4): no mechanism available: No worthy mechs found
 (qpid/SaslFactory.cpp:280)*
 *internal-error: Sasl error: SASL(-4): no mechanism available: No worthy
 mechs found (qpid/SaslFactory.cpp:280)*


 Any idea?


 That means that the client and broker could not agree on a SASL mechanism
 to use for authentication.

 Are you specifying and options to the hello world example? If not, the
 client is most likely asking for ANONYMOUS.

 Which broker are you using? If qpidd, what does your /etc/sasl/qpidd.conf
 contain?


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




-- 
Best Regards
Sajith


Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Sajith Kariyawasam
is it /etc/passwd file?

That file contain

*guest:guest*

*client:guest*

*server:guest*

*admin:admin*

*webadmin:webadmin*
*
*

Seems I need to pass credentials, ? if so how can I do it in the source
file ?

On Mon, Sep 3, 2012 at 3:44 PM, Sajith Kariyawasam saj...@gmail.com wrote:

 Thanks for the response Gordon, I'm new to this area.

 My Broker is Qpid Java Broker, then which config file I should refer to?
 when running the sample I'm not specifying any option, i just execute
 ./hello_world, as mentioned in
 https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt



 On Mon, Sep 3, 2012 at 3:40 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 11:02 AM, Sajith Kariyawasam wrote:

 Hi all,

 I'm facing an issue, $subject.

 Here's the exception Im getting,

 *[Client] warning Closing connection due to internal-error: Sasl error:

 SASL(-4): no mechanism available: No worthy mechs found
 (qpid/SaslFactory.cpp:280)*
 *internal-error: Sasl error: SASL(-4): no mechanism available: No worthy
 mechs found (qpid/SaslFactory.cpp:280)*


 Any idea?


 That means that the client and broker could not agree on a SASL mechanism
 to use for authentication.

 Are you specifying and options to the hello world example? If not, the
 client is most likely asking for ANONYMOUS.

 Which broker are you using? If qpidd, what does your /etc/sasl/qpidd.conf
 contain?


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




 --
 Best Regards
 Sajith




-- 
Best Regards
Sajith


Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Sajith Kariyawasam
Now I'm sending options as follows,

 ./hello_world localhost:5672  amqp.topic  {username: guest, password:
guest}

seems the format Im using to set options is not correct..

On Mon, Sep 3, 2012 at 3:48 PM, Sajith Kariyawasam saj...@gmail.com wrote:

 is it /etc/passwd file?

 That file contain

 *guest:guest*

 *client:guest*

 *server:guest*

 *admin:admin*

 *webadmin:webadmin*
 *
 *

 Seems I need to pass credentials, ? if so how can I do it in the source
 file ?

 On Mon, Sep 3, 2012 at 3:44 PM, Sajith Kariyawasam saj...@gmail.comwrote:

 Thanks for the response Gordon, I'm new to this area.

 My Broker is Qpid Java Broker, then which config file I should refer to?
 when running the sample I'm not specifying any option, i just execute
 ./hello_world, as mentioned in
 https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt



 On Mon, Sep 3, 2012 at 3:40 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 11:02 AM, Sajith Kariyawasam wrote:

 Hi all,

 I'm facing an issue, $subject.

 Here's the exception Im getting,

 *[Client] warning Closing connection due to internal-error: Sasl error:

 SASL(-4): no mechanism available: No worthy mechs found
 (qpid/SaslFactory.cpp:280)*
 *internal-error: Sasl error: SASL(-4): no mechanism available: No worthy
 mechs found (qpid/SaslFactory.cpp:280)*


 Any idea?


 That means that the client and broker could not agree on a SASL
 mechanism to use for authentication.

 Are you specifying and options to the hello world example? If not, the
 client is most likely asking for ANONYMOUS.

 Which broker are you using? If qpidd, what does your
 /etc/sasl/qpidd.conf contain?


 --**--**
 -
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




 --
 Best Regards
 Sajith




 --
 Best Regards
 Sajith




-- 
Best Regards
Sajith


Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Sajith Kariyawasam
Finally got it working..! :)

./hello_world localhost:5672 amq.topic {username:guest, password:guest}



On Mon, Sep 3, 2012 at 4:00 PM, Sajith Kariyawasam saj...@gmail.com wrote:

 Now I'm sending options as follows,

  ./hello_world localhost:5672  amqp.topic  {username: guest, password:
 guest}

 seems the format Im using to set options is not correct..


 On Mon, Sep 3, 2012 at 3:48 PM, Sajith Kariyawasam saj...@gmail.comwrote:

 is it /etc/passwd file?

 That file contain

 *guest:guest*

 *client:guest*

 *server:guest*

 *admin:admin*

 *webadmin:webadmin*
 *
 *

 Seems I need to pass credentials, ? if so how can I do it in the source
 file ?

 On Mon, Sep 3, 2012 at 3:44 PM, Sajith Kariyawasam saj...@gmail.comwrote:

 Thanks for the response Gordon, I'm new to this area.

 My Broker is Qpid Java Broker, then which config file I should refer to?
 when running the sample I'm not specifying any option, i just execute
 ./hello_world, as mentioned in
 https://svn.apache.org/repos/asf/qpid/trunk/qpid/cpp/examples/README.txt



 On Mon, Sep 3, 2012 at 3:40 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 11:02 AM, Sajith Kariyawasam wrote:

 Hi all,

 I'm facing an issue, $subject.

 Here's the exception Im getting,

 *[Client] warning Closing connection due to internal-error: Sasl error:

 SASL(-4): no mechanism available: No worthy mechs found
 (qpid/SaslFactory.cpp:280)*
 *internal-error: Sasl error: SASL(-4): no mechanism available: No
 worthy
 mechs found (qpid/SaslFactory.cpp:280)*


 Any idea?


 That means that the client and broker could not agree on a SASL
 mechanism to use for authentication.

 Are you specifying and options to the hello world example? If not, the
 client is most likely asking for ANONYMOUS.

 Which broker are you using? If qpidd, what does your
 /etc/sasl/qpidd.conf contain?


 --**--**
 -
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




 --
 Best Regards
 Sajith




 --
 Best Regards
 Sajith




 --
 Best Regards
 Sajith




-- 
Best Regards
Sajith


Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Gordon Sim

On 09/03/2012 11:30 AM, Sajith Kariyawasam wrote:

Now I'm sending options as follows,

  ./hello_world localhost:5672  amqp.topic  {username: guest, password:
guest}

seems the format Im using to set options is not correct..


Try quotes around the settings, e.g.

  ./hello_world localhost:5672  amqp.topic  '{username:guest, 
password:guest}'


Alternatively, you can specify the username in the url:

  ./hello_world guest/guest@localhost:5672


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Gordon Sim

On 09/03/2012 11:14 AM, Sajith Kariyawasam wrote:

My Broker is Qpid Java Broker, then which config file I should refer to?


I believe that ANONYMOUS support is available in the latest 0.18 release 
of the java broker (released just last week). Assuming you are using a 
previous release, that explains the error (client wanted to use 
ANONYMOUS, server did not offer that).



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread Gordon Sim

On 09/03/2012 11:13 AM, maverick_muguda wrote:

  What you pointed out was one of the problems, doesn't seem like the last
one.


I ran in to the following exception, when i tried to setup an SSL enabled
connection.


That looks like a trust failure. You should use the fully qualified 
hostname of the server as used in the SSL certificate. Also make sure 
you are specifying the trust store for the JMS client correctly, that 
the client can actually read it and that the correct certificates are 
contained within it (e.g. the CA certificate that signed the broker 
certificate).


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



How to install Qpid C++ API libraries ?

2012-09-03 Thread Sajith Kariyawasam
Hi all,

My requirement is to run the broker (Qpid Java broker) in
a separate machine (machine A), and a client program hosted in another
separate machine (machine B), and it is written in C++, will connect to the
broker to get messages.

So, in machine B I need to have Qpid C++ libraries installed (No need to
have the C++ broker)

In that case, what is the best way to install those libraries in machine B
? Can I get all the dependencies in apt-get or else do I have to download
separately and build? if so what components do I need to download ?

Thanks
-- 
Best Regards
Sajith


Re: How to install Qpid C++ API libraries ?

2012-09-03 Thread Gordon Sim

On 09/03/2012 12:19 PM, Sajith Kariyawasam wrote:

Hi all,

My requirement is to run the broker (Qpid Java broker) in
a separate machine (machine A), and a client program hosted in another
separate machine (machine B), and it is written in C++, will connect to the
broker to get messages.

So, in machine B I need to have Qpid C++ libraries installed (No need to
have the C++ broker)

In that case, what is the best way to install those libraries in machine B
? Can I get all the dependencies in apt-get or else do I have to download
separately and build? if so what components do I need to download ?


Have a look at the INSTALL notes in the source distribution for a list 
of the required and optional dependencies[1]. I would imagine most of 
those would be installable via apt-get, however I use Fedora and I don't 
know the details of the various package names for your system. If you 
are willing to post details of that for your distribution back, we could 
update the INSTALL notes.


Cajus Pollmeier has built Debian packages for Qpid for previous, 
available from http://apt.naasa.net/. (There are also packages for 
Fedora, just FYI).


[1] probably boost and libuuid, plus nss if you want SSL will suffice on 
the client side.


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: How to install Qpid C++ API libraries ?

2012-09-03 Thread Sajith Kariyawasam
On Mon, Sep 3, 2012 at 5:44 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 12:19 PM, Sajith Kariyawasam wrote:

 Hi all,

 My requirement is to run the broker (Qpid Java broker) in
 a separate machine (machine A), and a client program hosted in another
 separate machine (machine B), and it is written in C++, will connect to
 the
 broker to get messages.

 So, in machine B I need to have Qpid C++ libraries installed (No need to
 have the C++ broker)

 In that case, what is the best way to install those libraries in machine B
 ? Can I get all the dependencies in apt-get or else do I have to download
 separately and build? if so what components do I need to download ?


 Have a look at the INSTALL notes in the source distribution for a list of
 the required and optional dependencies[1]. I would imagine most of those
 would be installable via apt-get, however I use Fedora and I don't know the
 details of the various package names for your system. If you are willing to
 post details of that for your distribution back, we could update the
 INSTALL notes.


Sure, will post them once I got it successfully installed.


 Cajus Pollmeier has built Debian packages for Qpid for previous, available
 from http://apt.naasa.net/. (There are also packages for Fedora, just
 FYI).

 [1] probably boost and libuuid, plus nss if you want SSL will suffice on
 the client side.

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




-- 
Best Regards
Sajith


Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread maverick_muguda
the connectionURL i am using is
amqp://guest:guest@clientid/test?brokerlist='tcp://machine-name.us-west-1.compute.amazonaws.com:5674?ssl='true''

I have ensured that the right machine is used.

the trust store i am using has both the client certificate as well as the CA
certificate


keytool -list -keystore trust-store.jks -storepass password 
   

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 2 entries

rootca, Sep 3, 2012, trustedCertEntry,
Certificate fingerprint (MD5):
83:0E:47:F0:6F:00:63:BB:05:B6:8D:E2:F4:8B:E8:3D
java-client, Sep 3, 2012, trustedCertEntry,
Certificate fingerprint (MD5):
C2:4E:DF:D8:60:39:58:B5:BB:64:C8:25:21:E4:42:80



I followed the instructions in 2.4 and did an additional step of importing
the CA's certificate into the keystore. which can be verified from the
output 

keytool -list -keystore key-store.jks -storepass password

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 2 entries

rootca, Sep 3, 2012, trustedCertEntry,
Certificate fingerprint (MD5):
83:0E:47:F0:6F:00:63:BB:05:B6:8D:E2:F4:8B:E8:3D
java-client, Sep 3, 2012, PrivateKeyEntry, 
Certificate fingerprint (MD5):
C2:4E:DF:D8:60:39:58:B5:BB:64:C8:25:21:E4:42:80


In spite of all of these changes, the original problem of PKIX path
building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target remains. I have
rerun all the steps from 
http://rajith.2rlabs.com/2010/03/01/apache-qpid-securing-connections-with-ssl/
SSL-Howto  page. 

Please suggest any relevant debugging/modifications.

Thanks,
Naveen



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Unable-to-Setup-SSL-between-Java-Client-and-C-broker-tp7581558p7581610.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread Jakub Scholz
Can you try to run the client with the SSL debug mode? (option
-Djavax.net.debug=ssl ...
http://docs.oracle.com/javase/1.5.0/docs/guide/security/jsse/ReadDebug.html)
I'm usually using this SSL debug mode with our customers when they
have SSL problems. It sometimes shows bit more details why the SSL
doesn't work ...

Do you see any NSS error on the Qpid broker?

Regards
Jakub

On Mon, Sep 3, 2012 at 6:20 PM, maverick_muguda
naveenkumar.mug...@gmail.com wrote:
 the connectionURL i am using is
 amqp://guest:guest@clientid/test?brokerlist='tcp://machine-name.us-west-1.compute.amazonaws.com:5674?ssl='true''

 I have ensured that the right machine is used.

 the trust store i am using has both the client certificate as well as the CA
 certificate

 
 keytool -list -keystore trust-store.jks -storepass password

 Keystore type: JKS
 Keystore provider: SUN

 Your keystore contains 2 entries

 rootca, Sep 3, 2012, trustedCertEntry,
 Certificate fingerprint (MD5):
 83:0E:47:F0:6F:00:63:BB:05:B6:8D:E2:F4:8B:E8:3D
 java-client, Sep 3, 2012, trustedCertEntry,
 Certificate fingerprint (MD5):
 C2:4E:DF:D8:60:39:58:B5:BB:64:C8:25:21:E4:42:80

 

 I followed the instructions in 2.4 and did an additional step of importing
 the CA's certificate into the keystore. which can be verified from the
 output

 keytool -list -keystore key-store.jks -storepass password

 Keystore type: JKS
 Keystore provider: SUN

 Your keystore contains 2 entries

 rootca, Sep 3, 2012, trustedCertEntry,
 Certificate fingerprint (MD5):
 83:0E:47:F0:6F:00:63:BB:05:B6:8D:E2:F4:8B:E8:3D
 java-client, Sep 3, 2012, PrivateKeyEntry,
 Certificate fingerprint (MD5):
 C2:4E:DF:D8:60:39:58:B5:BB:64:C8:25:21:E4:42:80
 

 In spite of all of these changes, the original problem of PKIX path
 building failed: sun.security.provider.certpath.SunCertPathBuilderException:
 unable to find valid certification path to requested target remains. I have
 rerun all the steps from
 http://rajith.2rlabs.com/2010/03/01/apache-qpid-securing-connections-with-ssl/
 SSL-Howto  page.

 Please suggest any relevant debugging/modifications.

 Thanks,
 Naveen



 --
 View this message in context: 
 http://qpid.2158936.n2.nabble.com/Unable-to-Setup-SSL-between-Java-Client-and-C-broker-tp7581558p7581610.html
 Sent from the Apache Qpid users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread maverick_muguda
i enabled the SSL debug mode, find below snippets from the re-execution of
the client.


trustStore is:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/security/cacerts
trustStore type is : jks
trustStore provider is : 
init truststore

the truststore is different from what i am suggesting from the command
prompt

trigger seeding of SecureRandom
done seeding SecureRandom
Using SSLEngineImpl.
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
%% No cached client session
*** ClientHello, TLSv1
RandomCookie:  GMT: 1346624684 bytes = { 20, 74, 205, 217, 77, 143, 238,
126, 133, 164, 207, 193, 231, 220, 87, 107, 62, 245, 10, 69, 172, 183, 189,
148, 155, 180, 52, 23 }
Session ID:  {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA,
SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA,
SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods:  { 0 }
***
main, WRITE: TLSv1 Handshake, length = 81
main, WRITE: SSLv2 client hello message, length = 110
IoReceiver -
ec2-50-18-37-212.us-west-1.compute.amazonaws.com/10.166.127.160:5674, READ:
TLSv1 Handshake, length = 1228
*** ServerHello, TLSv1
RandomCookie:  GMT: 1346624684 bytes = { 207, 112, 175, 7, 145, 21, 235, 70,
47, 9, 75, 82, 73, 245, 62, 149, 81, 168, 118, 7, 162, 160, 121, 85, 243,
103, 216, 134 }
Session ID:  {114, 152, 165, 78, 15, 70, 250, 40, 28, 240, 160, 177, 57,
181, 190, 25, 41, 158, 57, 152, 45, 172, 223, 250, 156, 180, 212, 147, 105,
58, 114, 147}
Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
Compression Method: 0
Extension renegotiation_info, renegotiated_connection: empty
***



chain [1] = [
[
  Version: V3
  Subject: CN=MyRootCA, O=apigee, ST=Karnataka, C=IN
  Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

  Key:  Sun RSA public key, 1024 bits
  modulus:
13799796429888720938447912832005519106684316701926942053443386310126921448440178245639545686919100104906047246346698148538166698998250176134400490952671572289049712933938611474519480922970314195718462040027519575065319741485960135931606611449850660661735083257942025194914951565563808821921192048728852967
  public exponent: 65537
  Validity: [From: Mon Sep 03 13:20:06 UTC 2012,
   To: Mon Dec 03 13:20:06 UTC 2012]
  Issuer: CN=MyRootCA, O=apigee, ST=Karnataka, C=IN
  SerialNumber: [99197fe8]

Certificate Extensions: 1
[1]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:2147483647
]

]



IoReceiver - ec2-xxx.us-west-1.compute.amazonaws.com/xxx:5674, fatal error:
46: General SSLEngine problem
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
IoReceiver - ec2-xxx.us-west-1.compute.amazonaws.com/xxx:5674, SEND TLSv1
ALERT:  fatal, description = certificate_unknown
IoReceiver - ec2-xxx.us-west-1.compute.amazonaws.com/xxx:5674, WRITE: TLSv1
Alert, length = 2
main, fatal: engine already closed.  Rethrowing
javax.net.ssl.SSLHandshakeException: General SSLEngine problem


 i have masked the ip and machine names above

While on the server side, i make the following observations

Find below the command i execute and its output:

 /ebs/qpid/cpp/src/qpidd --load-module src/.libs/ssl.so  --ssl-cert-db
server_db/  --ssl-cert-password-file broker-pfile  --ssl-cert-name
ec2-XXX.us-west-1.compute.amazonaws.com  --ssl-port 5674

 
2012-09-03 13:34:28 notice Listening on TCP/TCP6 port 5672
2012-09-03 13:34:28 notice Listening for SSL connections on TCP port 5674
2012-09-03 13:34:28 notice SSL plugin not enabled, you must set
--ssl-cert-db to enable it.
2012-09-03 13:34:28 notice Broker running
2012-09-03 13:35:30 error Error reading socket: Encountered end of file
[-5938]

note the message about SSL plugin not enabled, even though i pass the flag
and parameter

There are no other errors i see on the broker's console.


-Naveen



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Unable-to-Setup-SSL-between-Java-Client-and-C-broker-tp7581558p7581614.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread Gordon Sim

On 09/03/2012 05:53 PM, maverick_muguda wrote:

i enabled the SSL debug mode, find below snippets from the re-execution of
the client.


trustStore is:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/security/cacerts
trustStore type is : jks
trustStore provider is :
init truststore

the truststore is different from what i am suggesting from the command
prompt


So you specified -Djavax.net.ssl.trustStore, but that is getting ignored?

[...]

While on the server side, i make the following observations

Find below the command i execute and its output:

  /ebs/qpid/cpp/src/qpidd --load-module src/.libs/ssl.so  --ssl-cert-db
server_db/  --ssl-cert-password-file broker-pfile  --ssl-cert-name
ec2-XXX.us-west-1.compute.amazonaws.com  --ssl-port 5674
2012-09-03 13:34:28 notice Listening on TCP/TCP6 port 5672
2012-09-03 13:34:28 notice Listening for SSL connections on TCP port 5674
2012-09-03 13:34:28 notice SSL plugin not enabled, you must set
--ssl-cert-db to enable it.
2012-09-03 13:34:28 notice Broker running
2012-09-03 13:35:30 error Error reading socket: Encountered end of file
[-5938]

note the message about SSL plugin not enabled, even though i pass the flag
and parameter


Try adding the --no-module-dir option to the broker. The error is odd 
and I wonder if you have some other version of the SSL plugin also 
loaded from elsewhere (i.e. from the default module dir on your system).



-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread maverick_muguda
 So you specified -Djavax.net.ssl.trustStore, but that is getting ignored? 

Yes, the command i am executing is 

java  -Djavax.net.debug=ssl org.apache.qpid.example.Hello 
-Djavax.net.ssl.trustStore=/ebs/qpid/cpp/trust-store.jks 
-Djavax.net.ssl.trustStorePassword=password 
-Djavax.net.ssl.keyStore=/ebs/qpid/cpp/key-store.jks 
-Djavax.net.ssl.keyStorePassword=password

Try adding the --no-module-dir option to the broker. The error is odd
and I wonder if you have some other version of the SSL plugin also
loaded from elsewhere (i.e. from the default module dir on your system)

This fixed the SSL plugin not enabled message. But the original problem
still persists.

Thanks,
Naveen



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Unable-to-Setup-SSL-between-Java-Client-and-C-broker-tp7581558p7581616.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: qpid::messaging API unexpected behavior

2012-09-03 Thread CLIVE

Gordon,

Thanks for the response and the clarification. With the sender code 
recompiled in, it all works as you state. I was just expecting a bit 
more from the I/O thread with regards to reconnecting without any other 
access to the messaging API.


I tried the same block of code, but with a Receiver undertaking a timed 
fetch, and that worked as well.


Thanks once again.

Clive

On 03/09/2012 09:48, Gordon Sim wrote:

On 09/01/2012 04:39 PM, CLIVE wrote:

I have been creating a producer client using qpid 0.14 (running 64bit
CENTOS 6.2) and I have encountered some unexpected behavior that I
wondered if someone could shed some light on.

The code shown below connects to a broker and then sends messages on a
exchange topic called foo with a subject of bar (this was commented out
to simplify the test) .


Question: are you saying that the client did not reconnect even when 
the send was enabled? That I would not expect.


With the send commented out, the inner loop doesn't do anything with 
the connection. In the current implementation, the application thread 
is the one that will actually drive reconnection. So if you don't make 
a call, then the library doesn't failover.


This is not the ideal implementation. It was done that way mainly to 
reuse the older client API as much as possible. The thread(s) started 
by the library to do the IO do(es) not have sufficient context to do 
the reconnect. I expect the upcoming AMQP 1.0 based implementation to 
be able to do better here.


However, as soon as you try to do something (e.g. send a message, 
fetch a message, get the next receiver for which a message is 
available etc), that *should* trigger reconnect (which with your 
settings would fail after 30 seconds of trying, resulting in an 
exception that would put you back into the outer loop).



If the broker is not up then everything works
find and the client will loop around until the broker becomes available
and it can then start sending its messages.

But if the client is connected to the broker and I kill the broker (to
simulate a broker crash) and then restart the broker several minutes
later, the client NEVER reconnects. All I see is a warning connection
closed message being reported by the client and the output from my loop
every 10 seconds.


That is the case even if you are sending message?


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: [Qpid / C++] Exception is occurred when executing hello_world.cpp sample

2012-09-03 Thread Sajith Kariyawasam
Hi Gordon,

Actually, no, I have been using the latest release, 0.18.. Anyway ./hello_world
localhost:5672 amq.topic {username:guest, password:guest} solved my
problem, but now Im experiencing some other issue.

I have been first using Qpid Java Broker 0.18, and were able to run
hello_world sample successfully. There after I moved to WSO2 Message
Broker, which is based on Qpid Java Broker, and executed the same
hello_world sample, but now I'm getting the following exception in the
client side.

Any idea what is it ?

*[Client] warning Exception received from broker: not-allowed: Cannot
redeclare with a different exchange type [caused by 3 \x00:\x00]*

*not-allowed: Cannot redeclare with a different exchange type*
*
*
*
*


On Mon, Sep 3, 2012 at 4:09 PM, Gordon Sim g...@redhat.com wrote:

 On 09/03/2012 11:14 AM, Sajith Kariyawasam wrote:

 My Broker is Qpid Java Broker, then which config file I should refer to?


 I believe that ANONYMOUS support is available in the latest 0.18 release
 of the java broker (released just last week). Assuming you are using a
 previous release, that explains the error (client wanted to use ANONYMOUS,
 server did not offer that).



 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@qpid.apache.**orgusers-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org




-- 
Best Regards
Sajith


Re: Unable to Setup SSL between Java Client and C++ broker

2012-09-03 Thread Robbie Gemmell
You need to specify all of the system properties before the class you want
to run, otherwise they will just be treated as arguments.

Robbie
On 3 Sep 2012 19:30, maverick_muguda naveenkumar.mug...@gmail.com wrote:

  So you specified -Djavax.net.ssl.trustStore, but that is getting ignored?

 Yes, the command i am executing is

 java  -Djavax.net.debug=ssl org.apache.qpid.example.Hello
 -Djavax.net.ssl.trustStore=/ebs/qpid/cpp/trust-store.jks
 -Djavax.net.ssl.trustStorePassword=password
 -Djavax.net.ssl.keyStore=/ebs/qpid/cpp/key-store.jks
 -Djavax.net.ssl.keyStorePassword=password

 Try adding the --no-module-dir option to the broker. The error is odd
 and I wonder if you have some other version of the SSL plugin also
 loaded from elsewhere (i.e. from the default module dir on your system)

 This fixed the SSL plugin not enabled message. But the original problem
 still persists.

 Thanks,
 Naveen



 --
 View this message in context:
 http://qpid.2158936.n2.nabble.com/Unable-to-Setup-SSL-between-Java-Client-and-C-broker-tp7581558p7581616.html
 Sent from the Apache Qpid users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
 For additional commands, e-mail: users-h...@qpid.apache.org