[AMQP 1.0] Basic question on loadsharing due to high volume

2016-01-08 Thread Morgan Lindqvist
Hi All,

I have a little problem understanding how load sharing is supported with
AMQP. Up till now that has not been an issue for me but now I will start
hitting the capacity on the HW where the server is running.

I have a number of producer and a number of consumers. The AMQP server in
the middle now have such a high load that it does not cope processing more
requests. What I would like to do is to solve this on the AMQP server side
without affecting the clients. I do however not understand how this can be
done.

The description on
http://qpid.apache.org/releases/qpid-cpp-0.34/cpp-broker/book/chap-Messaging_User_Guide-Broker_Federation.html
talk about using Federation for load balancing. My understanding is that all
the producers still talk to one AMQP instance that then forward the requests
to "slave" servers. When you hit the capacity of this one single instance
how does one scale the system even more?

When the load is shared between multiple slave AMQP servers, are then all
the consumers required to connect to each of these slave servers to fetch
the messages? So if the load is increased and I need to add another AMQP
slave server all the consumers need to be re-configured to also fetch
messages from this one?

Is there an other way that is better for scaling a system when one have a
lot of data?

Best Regards,
Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/AMQP-1-0-Basic-question-on-loadsharing-due-to-high-volume-tp7636285.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: More frequently releases of qpid binaries

2016-02-22 Thread Morgan Lindqvist
Hi,

As requested two new bug reports are filed
https://issues.apache.org/jira/browse/QPID-7089 and
https://issues.apache.org/jira/browse/QPID-7090

/Morgan


Ken Giusti wrote
> Hi Morgan,
> 
> I agree - both these issues need to be addressed.
> 
> Would you be willing to open two JIRA's for these - one for the docs, the
> other for the cpp broker?
> 
> http://qpid.apache.org/issues.html#report-a-bug
> 
> thanks,
> 
> -K 
> 
> ----- Original Message -
>> From: "Morgan Lindqvist" 

> morgan.lindqvist@

> 
>> To: 

> users@.apache

>> Sent: Sunday, February 21, 2016 4:47:24 AM
>> Subject: Re: More frequently releases of qpid binaries
>> 
>> Hi Again,
>> 
>> I now noticed that the init.d/qpidd script does not use a non-root user
>> id
>> for the daemon. I would prefer if the qpidd daemon did not run as root
>> but
>> instead as the user qpidd.
>> 
>> Is this something you agree with and can it be fixed?
>> 
>> I am not an expert on these matters but I could assist if you need help.
>> 
>> Best Regards,
>> Morgan
>> 
>> 
>> 
>> Morgan Lindqvist wrote
>> > Hi,
>> > 
>> > Thanks for this information. QPIDD is now installed and I will now
>> start
>> > trying to configure it, thanks!
>> > 
>> > Could this information be added to the page describing how to install
>> > QPID?
>> >
>> (http://svn.apache.org/repos/asf/qpid/tags/qpid-cpp-0.34/qpid/cpp/INSTALL)
>> > My guess is that it will save a lot of time for a lot of people.
>> > 
>> > Best Regards,
>> > Morgan
>> > Matt Broadstone wrote
>> >> On Sat, Feb 20, 2016 at 4:09 PM, Morgan Lindqvist <
>> 
>> >> morgan.lindqvist@
>> 
>> >>> wrote:
>> >> 
>> >>> Hi All,
>> >>>
>> >>> I installed qpidd on my Ubuntu 14.04 computer using "sudo apt-get
>> >>> install
>> >>> qpidd" I however discovered that the version I got was version 0.16,
>> we
>> >>> are
>> >>> now at version 0.34.
>> >>>
>> >>> Looking at
>> >>>
>> >>>
>> http://packages.ubuntu.com/search?keywords=qpid=names=all=all
>> >>> it can be seen that version 0.16 is the latest one also for all
>> versions
>> >>> of
>> >>> Ubuntu, also the brand new ones.
>> >>>
>> >>> Since my goal is to use qpidd it would be very nice to ba able to
>> >>> install a
>> >>> pre-compiled binary? As it is now I have been struggling for quite a
>> >>> while
>> >>> to compile and have all the tests pass. I would rather have sent this
>> >>> time
>> >>> in developing the application that will use qpidd.
>> >>>
>> >>> Have there been any discussions on pushing newer versions of qpidd to
>> >>> Ubuntu
>> >>> or to create an apt repository of our own so that we could push out
>> new
>> >>> binaries without being in the hands of the OS vendor.
>> >>>
>> >>>
>> >> https://launchpad.net/~qpid/+archive/ubuntu/testing
>> >> 
>> >> 
>> >> 
>> >>> Another AMQP open source implementation, RabbitMQ, is using their own
>> >>> apt
>> >>> repository, https://www.rabbitmq.com/install-debian.html, it is very
>> >>> convenient.
>> >>>
>> >>> Best Regards,
>> >>> Morgan
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811.html
>> >>> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail:
>> 
>> >> users-unsubscribe@.apache
>> 
>> >>> For additional commands, e-mail:
>> 
>> >> users-help@.apache
>> 
>> >>>
>> >>>
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811p7638817.html
>> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

>> 
>> 
> 
> -- 
> -K
> 
> -
> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

> For additional commands, e-mail: 

> users-help@.apache





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811p7638959.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



Tests fails when building C++ broker on Ubuntu

2016-02-18 Thread Morgan Lindqvist
Hi All, 

I am building the C++ broker on Ubuntu 14.04 and when I run the "make test"
command after the build 15 of the tests fail. 

Is this to be expected or did I do some mistakes when configuring the build. 

I have used the following commands to configure and build the system. 

=== 
sudo apt-get install cmake libboost-all-dev uuid-dev pkg-config g++ make
ruby help2man doxygen graphviz 
sudo apt-get install libssl-dev 
sudo apt-get install libsasl2-2 libsasl2-dev 
sudo apt-get install libnss3-dev libnspr4-dev 
rm -rf ../qpid-cpp-0.34* 
wget http://www.eu.apache.org/dist/qpid/cpp/0.34/qpid-cpp-0.34.tar.gz -O
../qpid-cpp-0.34.tar.gz 
tar -xzf ../qpid-cpp-0.34.tar.gz -C .. 
mkdir ../qpid-cpp-0.34/build 
pushd ../qpid-cpp-0.34/build 
cmake .. 
make all 
make test 
popd 
== 


The cake output is the following 
== 
-- The C compiler identification is GNU 4.8.4 
-- The CXX compiler identification is GNU 4.8.4 
-- Check for working C compiler: /usr/bin/cc 
-- Check for working C compiler: /usr/bin/cc -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler: /usr/bin/c++ 
-- Check for working CXX compiler: /usr/bin/c++ -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Could NOT find Ruby (missing:  RUBY_INCLUDE_DIR RUBY_LIBRARY
RUBY_CONFIG_INCLUDE_DIR) (found version "1.9.1") 
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6") 
-- Could NOT find VALGRIND (missing:  VALGRIND_EXECUTABLE) 
-- Looking for sasl_checkpass in sasl2 
-- Looking for sasl_checkpass in sasl2 - found 
-- Looking for include file sasl/sasl.h 
-- Looking for include file sasl/sasl.h - found 
-- Found SASL: 1   
-- Regenerating AMQP protocol sources 
--
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/broker/management-schema.xml
is newer 
--
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/acl/management-schema.xml
is newer 
--
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/ha/management-schema.xml
is newer 
--
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/legacystore/management-schema.xml
is newer 
--
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/linearstore/management-schema.xml
is newer 
-- Regenerating Qpid Management Framework sources 
-- Boost version: 1.54.0 
-- Found the following Boost libraries: 
--   program_options 
--   system 
-- Looking for uuid_generate 
-- Looking for uuid_generate - not found 
-- Looking for uuid_generate in uuid 
-- Looking for uuid_generate in uuid - found 
-- Looking for clock_gettime 
-- Looking for clock_gettime - found 
-- Looking for include file sys/sdt.h 
-- Looking for include file sys/sdt.h - not found 
-- Looking for include file sys/poll.h 
-- Looking for include file sys/poll.h - found 
-- Looking for include file sys/epoll.h 
-- Looking for include file sys/epoll.h - found 
-- Checking to see if size_t is a distinct type 
-- Performing Test QPID_SIZE_T_DISTINCT 
-- Performing Test QPID_SIZE_T_DISTINCT - Failed 
-- Checking to see if size_t is a distinct type - no 
-- checking for module 'nss' 
--   found nss, version 3.21 
-- Looking for _init in xerces-c 
-- Looking for _init in xerces-c - not found 
-- Looking for C++ include xercesc/framework/MemBufInputSource.hpp 
-- Looking for C++ include xercesc/framework/MemBufInputSource.hpp - not
found 
-- Looking for C++ include xqilla/xqilla-simple.hpp 
-- Looking for C++ include xqilla/xqilla-simple.hpp - not found 
-- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp 
-- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp - not
found 
-- Looking for ibv_create_qp in ibverbs 
-- Looking for ibv_create_qp in ibverbs - found 
-- Looking for rdma_create_id in rdmacm 
-- Looking for rdma_create_id in rdmacm - not found 
-- Looking for include file infiniband/verbs.h 
-- Looking for include file infiniband/verbs.h - found 
-- Looking for include file rdma/rdma_cma.h 
-- Looking for include file rdma/rdma_cma.h - not found 
-- Found Proton:
optimized;/usr/lib/libqpid-proton.so;debug;/usr/lib/libqpid-proton.so (found
version "0.9") 
-- Qpid proton found, amqp 1.0 support enabled 
-- Looking for LOG_AUTHPRIV 
-- Looking for LOG_AUTHPRIV - found 
-- Looking for LOG_FTP 
-- Looking for LOG_FTP - found 
-- Legacystore requires BerkeleyDB for C++ which is absent. 
-- Legacystore is excluded from build. 
-- Linearstore requires BerkeleyDB for C++ which is absent. 
-- Linearstore is excluded from build. 
-- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR) 
-- Build type is "RelWithDebInfo" (has debug symbols) 
-- Configuring done 
-- Generating done 
-- Build files have been written to:
/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build 
=== 

And the failed tests are as follows 
== 

Re: C++ Broker

2016-02-19 Thread Morgan Lindqvist
Hi, Thanks for the assistance with finding the file describing the tests in
more detail.

One of the issues was that the ~/.qpidd directory was owned by another user
than was running the tests. When this was fixed the failed tests was reduced
to 5. When looking at the tests log I however saw that tests that was
classified as OK actually failed. See below.

+
4/34 Testing: sasl_fed
4/34 Test: sasl_fed
Command: "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/run_test"
"-buildDir" "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build" "--"
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/
src/tests/sasl_fed"
Directory: /home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests
"sasl_fed" start time: Feb 19 13:25 CET
Output:
--
python tools absent - skipping sasl_fed.

Test time =   0.30 sec
--
Test Passed.
"sasl_fed" end time: Feb 19 13:25 CET
"sasl_fed" time elapsed: 00:00:00
--
+

I have installed both python2.7 and python2.7-dev but it still says that the
python tools are absent. What does that mean and how do I solve it?

Another tests that passes but fails according to the logs are

+
9/34 Testing: paged_queue_tests
19/34 Test: paged_queue_tests
Command:
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/run_paged_queue_tests"
Directory: /home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests
"paged_queue_tests" start time: Feb 19 13:42 CET
Output:
--
Traceback (most recent call last):
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/qpid-cpp-benchmark",
line 27, in 
import qpid.messaging as qm
ImportError: No module named qpid.messaging
Traceback (most recent call last):
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/qpid-cpp-benchmark",
line 27, in 
import qpid.messaging as qm
ImportError: No module named qpid.messaging

Test time =   0.53 sec
--
Test Passed.
"paged_queue_tests" end time: Feb 19 13:42 CET
"paged_queue_tests" time elapsed: 00:00:00
--


Where should I define something that points to a place so that the module
quid.messaging is found?

The following test is marked as a success but I would say it is failing. Do
you know how to fix this one?

+
10/34 Testing: ssl_test
10/34 Test: ssl_test
Command: "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/run_test"
"-buildDir" "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build" "--"
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/
src/tests/ssl_test"
Directory: /home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests
"ssl_test" start time: Feb 19 13:42 CET
Output:
--
No certutil, skipping ssl test

Test time =   0.02 sec
--
Test Passed.
"ssl_test" end time: Feb 19 13:42 CET
"ssl_test" time elapsed: 00:00:00
--



Another tests that fails but have the same kind of error in the log is the
following test


20/34 Testing: interop_tests
20/34 Test: interop_tests
Command: "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/run_test"
"-buildDir" "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build" "-python" "--"
"/home/webrtc/NordicWay-1.0/qpid
-cpp-0.34/src/tests/interop_tests.py"
Directory: /home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests
"interop_tests" start time: Feb 19 13:42 CET
Output:
--
Traceback (most recent call last):
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/interop_tests.py", line
36, in 
import qpid_messaging as qm
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/bindings/qpid/python/qpid_messaging.py",
line 28, in 
_qpid_messaging = swig_import_helper()
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/bindings/qpid/python/qpid_messaging.py",
line 24, in swig_import_helper
_mod = imp.load_module('_qpid_messaging', fp, pathname, description)
ImportError: No module named qpid.datatypes

Test time =   0.06 sec
--
Test Failed.
"interop_tests" end time: Feb 19 13:42 CET
"interop_tests" time elapsed: 00:00:00
--


All help in getting this to work is highly appreciated.

/Morgan


Gordon Sim wrote
> [...]
> 
>> -- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR)
> 
> I suspect the above may account for at least some of the failures (as 
> 

Re: C++ Broker

2016-02-19 Thread Morgan Lindqvist
Hi again,

I did add the swig part and that is now used by cmake

/Morgan



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Re-C-Broker-tp7638725p7638749.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: C++ Broker tests are failing

2016-02-20 Thread Morgan Lindqvist
Hi,

After installing qpid-qmf, qpid-python, qpid-tests, and qpid-tools on the
same lavel as qpid-cpp-35 and renaming the folders as well as installing the
package libnss3-tools only four tests are failing and three tests looks to
pass when I think they are failing.

The tests that fail now are the following. I am at a loss on what I need to
do to get them to pass. Any advice is welcome.

Test 6,7,8 (same massage for all three)
Here my guess is that the test is supposed to give an exception but that it
happens in the wrong place and is interpreted as a correct exception. Am I
correct in this?
---
Failed: Exception - Link failed to create User 127.0.0.1@QPID federation
connection denied. Systems with authentication enabled must specify ACL
create link rules.
(/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/qpid/broker/ConnectionHandler.cpp:259)

Test time =  14.65 sec
Test Passed.
"sasl_fed_ex_link" end time: Feb 20 20:27 CET
"sasl_fed_ex_link" time elapsed: 00:00:14
--

Test 18)
All sub-tests of test 18 is successful except for the following one.
++
qpid.tests.messaging.endpoints.SetupTests.testConnectError ..
fail
Error during test:  Traceback (most recent call last):
File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests/python/commands/qpid-python-test",
line 340, in run
  phase()
File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests/python/qpid/tests/messaging/endpoints.py",
line 59, in testConnectErro
r
  assert "refused" in str(e)
  AssertionError
++

Test 20)
This sub-test fails and then the rest fails with a reconnect disabled
message, so I guess if the first one is fixed the remaining one might be as
well.
==
interop_tests.CppTxTest.test_txtest2 
fail
Error during test:  Traceback (most recent call last):
File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests/python/commands/qpid-python-test",
line 340, in run
  phase()
File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/interop_tests.py", line
173, in test_txtest2
  self.popen(["qpid-txtest2"]  + self.connect_opts).assert_exit_ok()
File "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/brokertest.py",
line 223, in assert_exit_ok
  if self.wait() != 0: self.unexpected("Exit code %d" % self.returncode)
File "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/brokertest.py",
line 181, in unexpected
  raise BadProcessStatus("%s %s%s" % (self.pname, msg, err))
  BadProcessStatus: qpid-txtest2-2 Exit code 2:
  qpid-txtest2: Transfer agents failed


Test 21)
%%
ha_tests.TransactionTests.test_other_tx_tests ...
fail
Error during test:  Traceback (most recent call last):
File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests/python/commands/qpid-python-test",
line 340, in run
  phase()
File "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/ha_tests.py",
line 1620, in test_other_tx_tests
  "*.tx.*"], stdout=None, stderr=None).assert_exit_ok()
File "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/brokertest.py",
line 223, in assert_exit_ok
  if self.wait() != 0: self.unexpected("Exit code %d" % self.returncode)
File "/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/src/tests/brokertest.py",
line 181, in unexpected
  raise BadProcessStatus("%s %s%s" % (self.pname, msg, err))
  BadProcessStatus: qpid-python-test-154 Exit code 1
%%

Test 25)
Do I need to do something special to get AMQP 1.0 activated or working? It
is AMQP 1.0 that I will use in the end.

Traceback (most recent call last):
  File
"/home/webrtc/NordicWay-1.0/qpid-cpp-0.34/build/src/tests/python/commands/qpid-python-test",
line 563, in 
m = __import__(name, None, None, ["dummy"])
ImportError: No module named broker_1_0
FAIL swigged python tests: 
!!!

Best Regards,
Morgan



Gordon Sim wrote
> On 19/02/16 12:46, Morgan Lindqvist wrote:
>> Hi, Thanks for the assistance with finding the file describing the tests
>> in
>> more detail.
>>
>> One of the issues was that the ~/.qpidd directory was owned by another
>> user
>> than was running the tests. When this was fixed the failed tests was
>> reduced
>> to 5. When l

More frequently releases of qpid binaries

2016-02-20 Thread Morgan Lindqvist
Hi All,

I installed qpidd on my Ubuntu 14.04 computer using "sudo apt-get install
qpidd" I however discovered that the version I got was version 0.16, we are
now at version 0.34.

Looking at
http://packages.ubuntu.com/search?keywords=qpid=names=all=all
it can be seen that version 0.16 is the latest one also for all versions of
Ubuntu, also the brand new ones.

Since my goal is to use qpidd it would be very nice to ba able to install a
pre-compiled binary? As it is now I have been struggling for quite a while
to compile and have all the tests pass. I would rather have sent this time
in developing the application that will use qpidd.

Have there been any discussions on pushing newer versions of qpidd to Ubuntu
or to create an apt repository of our own so that we could push out new
binaries without being in the hands of the OS vendor.

Another AMQP open source implementation, RabbitMQ, is using their own apt
repository, https://www.rabbitmq.com/install-debian.html, it is very
convenient.

Best Regards,
Morgan



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811.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: More frequently releases of qpid binaries

2016-02-20 Thread Morgan Lindqvist
Hi,

Thanks for this information. QPIDD is now installed and I will now start
trying to configure it, thanks!

Could this information be added to the page describing how to install QPID?
(http://svn.apache.org/repos/asf/qpid/tags/qpid-cpp-0.34/qpid/cpp/INSTALL)
My guess is that it will save a lot of time for a lot of people.

Best Regards,
Morgan


Matt Broadstone wrote
> On Sat, Feb 20, 2016 at 4:09 PM, Morgan Lindqvist <

> morgan.lindqvist@

>> wrote:
> 
>> Hi All,
>>
>> I installed qpidd on my Ubuntu 14.04 computer using "sudo apt-get install
>> qpidd" I however discovered that the version I got was version 0.16, we
>> are
>> now at version 0.34.
>>
>> Looking at
>>
>> http://packages.ubuntu.com/search?keywords=qpid=names=all=all
>> it can be seen that version 0.16 is the latest one also for all versions
>> of
>> Ubuntu, also the brand new ones.
>>
>> Since my goal is to use qpidd it would be very nice to ba able to install
>> a
>> pre-compiled binary? As it is now I have been struggling for quite a
>> while
>> to compile and have all the tests pass. I would rather have sent this
>> time
>> in developing the application that will use qpidd.
>>
>> Have there been any discussions on pushing newer versions of qpidd to
>> Ubuntu
>> or to create an apt repository of our own so that we could push out new
>> binaries without being in the hands of the OS vendor.
>>
>>
> https://launchpad.net/~qpid/+archive/ubuntu/testing
> 
> 
> 
>> Another AMQP open source implementation, RabbitMQ, is using their own apt
>> repository, https://www.rabbitmq.com/install-debian.html, it is very
>> convenient.
>>
>> Best Regards,
>> Morgan
>>
>>
>>
>> --
>> View this message in context:
>> http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811.html
>> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

>>
>>





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811p7638816.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: More frequently releases of qpid binaries

2016-02-21 Thread Morgan Lindqvist
Hi Again,

I now noticed that the init.d/qpidd script does not use a non-root user id
for the daemon. I would prefer if the qpidd daemon did not run as root but
instead as the user qpidd.

Is this something you agree with and can it be fixed?

I am not an expert on these matters but I could assist if you need help.

Best Regards,
Morgan



Morgan Lindqvist wrote
> Hi,
> 
> Thanks for this information. QPIDD is now installed and I will now start
> trying to configure it, thanks!
> 
> Could this information be added to the page describing how to install
> QPID?
> (http://svn.apache.org/repos/asf/qpid/tags/qpid-cpp-0.34/qpid/cpp/INSTALL)
> My guess is that it will save a lot of time for a lot of people.
> 
> Best Regards,
> Morgan
> Matt Broadstone wrote
>> On Sat, Feb 20, 2016 at 4:09 PM, Morgan Lindqvist <

>> morgan.lindqvist@

>>> wrote:
>> 
>>> Hi All,
>>>
>>> I installed qpidd on my Ubuntu 14.04 computer using "sudo apt-get
>>> install
>>> qpidd" I however discovered that the version I got was version 0.16, we
>>> are
>>> now at version 0.34.
>>>
>>> Looking at
>>>
>>> http://packages.ubuntu.com/search?keywords=qpid=names=all=all
>>> it can be seen that version 0.16 is the latest one also for all versions
>>> of
>>> Ubuntu, also the brand new ones.
>>>
>>> Since my goal is to use qpidd it would be very nice to ba able to
>>> install a
>>> pre-compiled binary? As it is now I have been struggling for quite a
>>> while
>>> to compile and have all the tests pass. I would rather have sent this
>>> time
>>> in developing the application that will use qpidd.
>>>
>>> Have there been any discussions on pushing newer versions of qpidd to
>>> Ubuntu
>>> or to create an apt repository of our own so that we could push out new
>>> binaries without being in the hands of the OS vendor.
>>>
>>>
>> https://launchpad.net/~qpid/+archive/ubuntu/testing
>> 
>> 
>> 
>>> Another AMQP open source implementation, RabbitMQ, is using their own
>>> apt
>>> repository, https://www.rabbitmq.com/install-debian.html, it is very
>>> convenient.
>>>
>>> Best Regards,
>>> Morgan
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811.html
>>> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>>>
>>> -
>>> To unsubscribe, e-mail: 

>> users-unsubscribe@.apache

>>> For additional commands, e-mail: 

>> users-help@.apache

>>>
>>>





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/More-frequently-releases-of-qpid-binaries-tp7638811p7638817.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



[C++ broker] How to create filters and queues from the client

2016-03-10 Thread Morgan Lindqvist
Hi All,

I was previously using AMQP 0.9.1 (RabbitMQ) and the client library amqplib
for Node JS. With these components it was easy to give the client the
possibility to create the queue and the bindingKey and connect it to an
topic-exchange.

I now would like a client to create a queue and a filter and connect it to
an existing node using QPIDD and the Node JS library amqp10.

So far I have not discovered any way to do this from the client.

I have also been looking for documentation for how to create and describe a
filter (so that it works like a bindingKey for 0.9.1). I have however not
been successful. Or have I misunderstood how filters can be used?

Assistance to make me move forward is highly appreciated.

Best Regards,
Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/C-broker-How-to-create-filters-and-queues-from-the-client-tp7639889.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: [C++ broker] How to create filters and queues

2016-03-13 Thread Morgan Lindqvist
Hi again,

Finally found the issues I had.

1) The small things is normally what gets you :-(
2) Never ever assume that the syntax is the same for different commands
3) re-read everything until you spot what you are missing, it is there

The misstakes I made were the following

a) I assumed that the quid-config bind ... command also had a binding name
as a third argument (as add queue and add exchange does). This it did not,
instead the third argument was a pre AMQP 1.0 bindingKey, this resulted in
that there were no matches and off course no data sent to the queues

b) When I entered the password for the consumer client I made a small typo,
but even a small typo is not a good thing when we are talking about
passwords. The client FW I am using did not warn about this, it only keep on
trying and trying to connect until I stopped the application.

After fixing these two tiny tiny errors the whole application now is working
as it should.

Now it is time to see if I can make a decent WEB GUI for the demo on
Wednesday or if they will see three command line windows and printouts from
Node JS application. Maybe I should throw in a tail -f /var/log/syslog |
grep qpidd to raise the coolness of the demo?

Thanks for all the help!

SBS (Shit behind the sticks, as we say in Sweden) is most of the time the
reason for why stuff does not work. Another, and a bit nicer, quote is "Even
the sun have spots" :-) I think I take that one.

Best Regards,
Morgan



Morgan Lindqvist wrote
> Hi,
> 
> Thanks for the assistance, I however still have problems and I am not
> making any progress so here comes some more questions. Everything was
> working fine with 0.9.1 and RabbitMQ but I must be missing something vital
> when it comes moving to AMQP 1.0 and QPID.
> 
> Environment: Ubuntu 14.04. qpidd 0.34. Client based on amqp10 for Node JS
> 
> Target: Have one AMQP 1.0 node/exchange that an application writes
> messages into. Have a number of clients with one queue each that receives
> all messages that matches the filter criteria. If a message matches
> multiple criteria it shall be put in all the queues for which the filter
> matches.
> 
> I did not manage to get the filtering working so I thought I would start
> with a simple node and queue, but that failed as well.
> 
> Approach to create the nodes, queue and binding:
>   qpid-config -b admin/@127.0.0.1 add exchange direct nwEx
>   qpid-config -b admin/@127.0.0.1 add queue nwQ
>   qpid-config -b admin/@127.0.0.1 bind nwEx nwQ nwB
> 
> The Node JS code for writing contain the following lines:
> client.createSender('nwEx'),
> ...
> sender.send(message).then(function (state) {...)
> 
> Message is defines as follows
> var message  = { body : 'Message body',
>  properties: { userId: settings.username },
>  applicationProperties: { who: 'XYZ', what: 'Yes',
> where: 'SWE', format: 'Nice' }};
> 
> 
> The Node JS code for reading is as follows:
>   client.createReceiver('nwQ')
> ...
> receiver.on('message', function (message) {
>   console.log('msg recv');
>   curr++;
> });
> 
> 
> Looking at the logs from qpidd I see the connections to the exchange and
> the queue, but no error messages.
> 
> The qpidd.acl is as follows
>   group admin admin@QPID
>   acl allow admin all
>   acl deny all all
> 
> This should be easy, I must be doing something fundamentally wrong, I an
> just missing it. The receiving application does not receive any data at
> all.
> 
> When this is working I need to get the filtering up and running as well.
> The queue and filter I specified for the above message and application
> properties were as follows
> pid-config -b admin/@127.0.0.1 add queue nwQ
> --argumentqpid.filter="where='SWE'"
> 
> Here I guess that I need to identify that the "where" attribute comes from
> the applicationProperties part in the message. (see above)
> 
> I have been searching the web but not managed to find any good examples.
> Assistance is welcome.
> 
> Best Regards,
> Morgan
> Olivier Mallassi wrote
>> Hi
>> 
>> I do not know about the JS API but
>> 
>> 1/ AFAIK, AMQP 1.0 does not define anything regarding queue creation and
>> assume queues already exist on the broker side.
>> 2/ with qpid cpp,  you could be able to create the "filtered queue " with
>> 
>>  qpid-config add exchange topic subjects
>> 
>> qpid-config add queue mysubscription
>> --argumentqpid.filter="\"amqp.correlation_id\"='abc'
>> AND color='blue' AND weight > 2500"
>> 
>>   qpid-config bind subjects mysubscription mysubject
>> 
>> 
>

[C++ broker] No logs not found when installing binary from ppa:qpid/testing

2016-03-09 Thread Morgan Lindqvist
Hi,

I have on my Ubuntu 14.04 installed the qpidd binary from ppa:qpid/testing


sudo add-apt-repository ppa:qpid/testing
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install quid
---

When starting the quid daemon it does  not log anything to /var/log/syslog
as the daemon does when built from source. Do I need to enable this in some
way or is it logged to a file that I have not found?

Best Regards,
Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/C-broker-No-logs-not-found-when-installing-binary-from-ppa-qpid-testing-tp7639838.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: [C++ broker] How to create filters and queues

2016-03-12 Thread Morgan Lindqvist
Hi,

Thanks for the assistance, I however still have problems and I am not making
any progress so here comes some more questions. Everything was working fine
with 0.9.1 and RabbitMQ but I must be missing something vital when it comes
moving to AMQP 1.0 and QPID.

Environment: Ubuntu 14.04. qpidd 0.34. Client based on amqp10 for Node JS

Target: Have one AMQP 1.0 node/exchange that an application writes messages
into. Have a number of clients with one queue each that receives all
messages that matches the filter criteria. If a message matches multiple
criteria it shall be put in all the queues for which the filter matches.

I did not manage to get the filtering working so I thought I would start
with a simple node and queue, but that failed as well.

Approach to create the nodes, queue and binding:
  qpid-config -b admin/@127.0.0.1 add exchange direct nwEx
  qpid-config -b admin/@127.0.0.1 add queue nwQ
  qpid-config -b admin/@127.0.0.1 bind nwEx nwQ nwB

The Node JS code for writing contain the following lines:
client.createSender('nwEx'),
...
sender.send(message).then(function (state) {...)

Message is defines as follows
var message  = { body : 'Message body',
 properties: { userId: settings.username },
 applicationProperties: { who: 'XYZ', what: 'Yes',
where: 'SWE', format: 'Nice' }};


The Node JS code for reading is as follows:
  client.createReceiver('nwQ')
...
receiver.on('message', function (message) {
  console.log('msg recv');
  curr++;
});


Looking at the logs from qpidd I see the connections to the exchange and the
queue, but no error messages.

The qpidd.acl is as follows
  group admin admin@QPID
  acl allow admin all
  acl deny all all

This should be easy, I must be doing something fundamentally wrong, I an
just missing it. The receiving application does not receive any data at all.

When this is working I need to get the filtering up and running as well. The
queue and filter I specified for the above message and application
properties were as follows
pid-config -b admin/@127.0.0.1 add queue nwQ
--argumentqpid.filter="where='SWE'"

Here I guess that I need to identify that the "where" attribute comes from
the applicationProperties part in the message. (see above)

I have been searching the web but not managed to find any good examples.
Assistance is welcome.

Best Regards,
Morgan


Olivier Mallassi wrote
> Hi
> 
> I do not know about the JS API but
> 
> 1/ AFAIK, AMQP 1.0 does not define anything regarding queue creation and
> assume queues already exist on the broker side.
> 2/ with qpid cpp,  you could be able to create the "filtered queue " with
> 
>  qpid-config add exchange topic subjects
> 
> qpid-config add queue mysubscription
> --argumentqpid.filter="\"amqp.correlation_id\"='abc'
> AND color='blue' AND weight > 2500"
> 
>   qpid-config bind subjects mysubscription mysubject
> 
> 
> 
> HTH.
> 
> oliv/
> 
> On Thu, Mar 10, 2016 at 5:03 PM, Morgan Lindqvist <

> morgan.lindqvist@

>> wrote:
> 
>> Hi All,
>>
>> I was previously using AMQP 0.9.1 (RabbitMQ) and the client library
>> amqplib
>> for Node JS. With these components it was easy to give the client the
>> possibility to create the queue and the bindingKey and connect it to an
>> topic-exchange.
>>
>> I now would like a client to create a queue and a filter and connect it
>> to
>> an existing node using QPIDD and the Node JS library amqp10.
>>
>> So far I have not discovered any way to do this from the client.
>>
>> I have also been looking for documentation for how to create and describe
>> a
>> filter (so that it works like a bindingKey for 0.9.1). I have however not
>> been successful. Or have I misunderstood how filters can be used?
>>
>> Assistance to make me move forward is highly appreciated.
>>
>> Best Regards,
>> Morgan
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://qpid.2158936.n2.nabble.com/C-broker-How-to-create-filters-and-queues-from-the-client-tp7639889.html
>> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

>>
>>





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/C-broker-How-to-create-filters-and-queues-from-the-client-tp7639889p7639988.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: [C++ broker] No logs not found when installing binary from ppa:qpid/testing

2016-03-09 Thread Morgan Lindqvist
Hi,

I found the issue, one was forced to set the option "log-to-syslog=yes" to
get the logs in the syslog file

/Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/C-broker-No-logs-not-found-when-installing-binary-from-ppa-qpid-testing-tp7639838p7639842.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 c++] ACL for writing to an exchange

2017-03-02 Thread Morgan Lindqvist
Hi,

I will try getting the logs, but until then.

I am using AMQP 1.0, a requirement for the implementation. Can I not use an
"exchange" and connect it to a queue and write to the exchange and read from
the queue in this case?

I have big difficulties in identifying which part of quid that is for 1.0
and which parts are for pre- 1.0

/Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-c-ACL-for-writing-to-an-exchange-tp7659852p7659880.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



[QPID C++][Java JMS client] Data gets corrupted when sent to the server over SSL

2016-09-16 Thread Morgan Lindqvist
Hi all,

I have an issue that data gets corrupted if the size is 66068 but not if it
is 65068 or smaller when using the JavaJMS client. The server is QPIC C++
and SSL encryption is used.

If I instead use a Node JS based client I have no issues with the size of
the messages. I have sent a 1MB large message and it came through as it
should.

Is there a setting in a client that changes how it behaves when it comes to
large messages?

I guess there could be a bug in the QPID C++ server implementation that is
triggered by the JMS client. Any opinions on this?

I have been searching for related issues and I only found this one,
https://issues.apache.org/jira/browse/PROTON-537, but it is solved.


Any pointer what could be the issue and how I could solve it?

(I can not use the Node JS client, I need a Java client)


Best Regards,
Morgan

Environment information:

Server:
QPID C++ server version 1.35.0 (from PPA Testing
https://launchpad.net/~qpid/+archive/ubuntu/testing)
OS: Ubuntu 14.04
AMQP version: 1.0

Client with issue:
QPID Java JMS client
Version 6.0.4
Java version: 1.8.0_101

Client that works:
Node JS AMQP10: https://www.npmjs.com/package/amqp10
Version: 3.2.5
Node version: 4.5.0




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/QPID-C-Java-JMS-client-Data-gets-corrupted-when-sent-to-the-server-over-SSL-tp7650810.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 c++][NodeJS amqp10] Unexpected message format, got uint at index 1 of headers

2017-03-02 Thread Morgan Lindqvist
Hi Matt,

Yes, but ttl does not have index 1, I do not understand this. I am missing 
something.

Best Regards
Morgan



Skickat från min iPhone

2 mars 2017 kl. 17:50 skrev Matt Broadstone [via Qpid] 
<ml-node+s2158936n765992...@n2.nabble.com<mailto:ml-node+s2158936n765992...@n2.nabble.com>>:

On Thu, Mar 2, 2017 at 11:35 AM, Morgan Lindqvist
<[hidden email]> wrote:

> Hi All,
>
> I am using the Node JS library amqp10 (ver 3.2.5) together with quid c++
> (ver 1.35).
>
> I just started defining the TTL parameter in the header and now quid c++
> give me the following warning.
>
> ---
> [Unspecified] warning Unexpected message format, got uint at index 1 of
> headers
> ---
>
> The TTL functionality looks like it is working, setting to a small value
> results in that the message is dropped.
>
> I however do not like warnings in the logs if they can be avoided. Is this a
> feature or a bug or misses of the libraries?
>
> If I in Node JS log the header part I get the following output.
> ---
> header:
>{ durable: false,
>  priority: 4,
>  ttl: ,
>  firstAcquirer: true,
>  deliveryCount: undefined },
> ---
>
> Proposals on how to fix this is appreciated.
>
> /Morgan
>
>
>
>
> --
> View this message in context: 
> http://qpid.2158936.n2.nabble.com/qpid-c-NodeJS-amqp10-Unexpected-message-format-got-uint-at-index-1-of-headers-tp7659927.html
> Sent from the Apache Qpid users mailing list archive at 
> Nabble.com<http://Nabble.com>.
>
> -
> To unsubscribe, e-mail: [hidden 
> email]
> For additional commands, e-mail: [hidden 
> email]
>

Hi Morgan,

This looks like it might be a bug in qpid, as this field is defined as follows:
  

Where milliseconds are define as:


Matt

-
To unsubscribe, e-mail: [hidden 
email]
For additional commands, e-mail: [hidden 
email]




If you reply to this email, your message will be added to the discussion below:
http://qpid.2158936.n2.nabble.com/qpid-c-NodeJS-amqp10-Unexpected-message-format-got-uint-at-index-1-of-headers-tp7659927p7659928.html
To unsubscribe from [qpid c++][NodeJS amqp10] Unexpected message format, got 
uint at index 1 of headers, click 
here<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=7659927=bW9yZ2FuLmxpbmRxdmlzdEBlcmljc3Nvbi5jb218NzY1OTkyN3wtMjA0NjIxNDgzNw==>.
NAML<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-c-NodeJS-amqp10-Unexpected-message-format-got-uint-at-index-1-of-headers-tp7659927p7659929.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

[qpid c++] ACL for writing to an exchange

2017-03-01 Thread Morgan Lindqvist
Hi All,

I have an issue that I can not get working

Setup:

I have one exchange and three queues connected to it with a filter between
the exchange and each queue.

The issue I have is to get the users write access to the exchange.

acl allow producer access exchange name=nwEx
acl allow producer access queue name=nwEx
acl allow producer publish exchange routingkey=nwEx

This does however not give the users in the "producer" group write access to
the exchange. I have tried looking for documentation but failed. Any
pointers or examples would be very much appreciated.

I do not have the error message available now but it is something like that
the user do not have write access to the queues connected to the exchange.

/Morgan



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-c-ACL-for-writing-to-an-exchange-tp7659852.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



[qpid C++] Problems addinng externally signed cert and key to certutil (NSS) database

2017-07-11 Thread Morgan Lindqvist
Hi All,

Up till now I have used a own CA and signed the server and client
certificates for my QPID C++ installation, this is working as it should from
both the client and the server side.

A new requirement have now been added which is that the root CA for the
server certificate must be a trusted CA, not one that I made my self.

I have been trying to adapt my procedure for adding the certificates so that
I can add a certificate and key that is created by a trusted CA to the
certutil (NSS) database but I am failing misserably.

I am using the script below to add the server certificate and create the
client certificate. The server certificate is created by Lets Encrypt and
the client certificates is still created and signed by my own CA.


#!/bin/bash

SERVER_CERT_DIR=serverTrusted
CERT_PW_FILE=${SERVER_CERT_DIR}/cert_pw.txt

#Create directory if missing
mkdir -p ${SERVER_CERT_DIR}

echo "# Create the password file to access the certificate DB"
echo "# Use urandom for password generation"
cat /dev/urandom | head -c 20 | base64 | md5sum | cut -d' ' -f1 >
${CERT_PW_FILE}
chmod go-rwx ${CERT_PW_FILE}

echo "# Create good quality noise"
dd bs=256 count=1 if=/dev/urandom of=noise

echo "# Create the Certificate and Key Database (-f is the password for
database access)"
certutil -N -d ${SERVER_CERT_DIR} -f ${CERT_PW_FILE}

# CA
echo "# Creating CA Certificate and store it in the database"
certutil -S -n CA -d ${SERVER_CERT_DIR} -s "CN=MyOwnCA" -x -t "T,," -m 0 -v
21 -f  ${CERT_PW_FILE} -z noise -2 "CA:TRUE"
echo "# Extract ca.cert file from the database"
certutil -L -n CA -d ${SERVER_CERT_DIR} -a -o ${SERVER_CERT_DIR}/ca.cert

#server
echo "# Convert PEM format from Lets Encrypt"
sudo openssl x509 -outform pem -in
/etc/letsencrypt/live/qpid.myDomain.com/cert.pem -out
${SERVER_CERT_DIR}/production.cert
sudo chown ubuntu:ubuntu ${SERVER_CERT_DIR}/production.cert

echo "# Add the trusted server certificate to the database (trusted peer)"
certutil -A -n development -d ${SERVER_CERT_DIR} -i
${SERVER_CERT_DIR}/production.cert -t 'P,,' -f ${CERT_PW_FILE}

echo "# Convert the key and add to database"
sudo openssl rsa -outform der -in
/etc/letsencrypt/live/qpid.myDomain.com/privkey.pem -out
${SERVER_CERT_DIR}/production.key
sudo chown ubuntu:ubuntu ${SERVER_CERT_DIR}/production.key
openssl rsa -inform DER -outform PEM -in ${SERVER_CERT_DIR}/production.key
-out ${SERVER_CERT_DIR}/production-key.pem

echo "# Create p12 key"
openssl pkcs12 -export -inkey ${SERVER_CERT_DIR}/production-key.pem  -in
${SERVER_CERT_DIR}/production.cert -out
${SERVER_CERT_DIR}/production-key.p12 -nodes -password pass:`cat
${CERT_PW_FILE}`
echo "# Add server key to database"
pk12util -d ${SERVER_CERT_DIR} -i ${SERVER_CERT_DIR}/production-key.p12 -w
${CERT_PW_FILE} -k ${CERT_PW_FILE}

#client
function createClient {
  echo "# Generate the client certificate"
  certutil -S -n $1 -d ${SERVER_CERT_DIR} -s "CN=$1" -c CA -t "P,," -v 21 -f
${CERT_PW_FILE} -z noise

  echo "# Export the key from the DB to a pkcs#12 file"
  pk12util -n $1 -d ${SERVER_CERT_DIR} -o ${SERVER_CERT_DIR}/$1.p12 -k
${CERT_PW_FILE} -w ${CERT_PW_FILE}

  echo "# Convert the key (nodes is no key encryption and passin is password
input)"
  openssl pkcs12 -in ${SERVER_CERT_DIR}/$1.p12 -out
${SERVER_CERT_DIR}/$1.key -nodes -passin pass:`cat ${CERT_PW_FILE}`

  echo "# Export the certificate"
  certutil -L -n $1 -d ${SERVER_CERT_DIR} -a -o ${SERVER_CERT_DIR}/$1.cert
}

createClient client1
createClient client2
---

I am far from an expert when it comes to certificates, the above commands is
the result from searching the web and trying to understand what should be
done.

If I use the openssl command the check the certificate that is used by the
qpid instance I get the following result

--
>openssl s_client -host qpid.myDomain.com -port 5671 -cert
cert/serverTrusted/client1.cert -key cert/serverTrusted/client1.key

CONNECTED(0003)
depth=0 CN = qpid.myDomain.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = qpid.myDomain.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/CN=qpid.myDomain.com
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
---
...
---

If I use the same command to another site I have that is signed by Lets
Encrypt it works as it should
---
>openssl s_client -host www.myDomain.com

CONNECTED(0003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = www.myDomain.com
verify return:1
---
Certificate chain
 0 s:/CN=www.myDomain.com
   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
 1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---
...
--

>From this I draw the conclusion that the 

Re: [qpid C++] Problems addinng externally signed cert and key to certutil (NSS) database

2017-07-12 Thread Morgan Lindqvist
Hi,

Thank you very much, it works like a charm.

/Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-C-Problems-addinng-externally-signed-cert-and-key-to-certutil-NSS-database-tp7664728p7664745.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



[qpid c++][launchpad-ppa] linearstore.so not available in binary?

2017-08-23 Thread Morgan Lindqvist
Hi,

I am using the binary of quid-c++ 1.36 available here,
https://launchpad.net/~qpid/+archive/ubuntu/released?field.series_filter=xenial

The issue I have is that I do not find the linearstore.so and hence I do not
get persistence to work.

Should I use something else than linearstore.so or is it missing from the
binary?

Can I add it in some way or could it be added to the binary?

Best Regards,
Morgan




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-c-launchpad-ppa-linearstore-so-not-available-in-binary-tp7665871.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 c++][launchpad-ppa] linearstore.so not available in binary?

2017-08-23 Thread Morgan Lindqvist
That I missed, thanks

/Morgan


Jakub Scholz-2 wrote
> Perhaps a stupid question ... but have you tried installing the
> liblinearstore (liblinearstore_1.36.0-1qpid+xenial1_amd64.deb) package?
> According to the changelog it has been renamed from qpidd-linear-store.
> 
> Jakub





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/qpid-c-launchpad-ppa-linearstore-so-not-available-in-binary-tp7665871p7665873.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