Ruby: error: qpid/messaging/Logger.h: No such file or directory

2016-11-21 Thread Gary Taylor
I am trying to get the server.rb sample from
https://qpid.apache.org/releases/qpid-0.32/messaging-api/ruby/examples/index.html
to work.  When I try to install the qpid_messaging gem I get
an error about being unable to find Logger.h.  It looks like
it is there to me?   It's probably user error but want to
make sure it's still a viable option and/or see if anyone
has a suggestion.  

Sequence of events:

--
# ruby ./server.rb
  :29:in `require': no such file to load 
-- qpid_messaging (LoadError)
from :29:in `require'
from ./apache_ruby_server.rb:4:in `'


# head ./server.rb
  #!/usr/bin/env ruby

  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
  require 'qpid_messaging'


# gem install ./qpid_messaging-1.35.0.gem
  
  cqpid.cpp:24792: error: ???critical??? is not a member of 
???qpid::messaging???
  cqpid.cpp:24799: error: ???free_qpid_messaging_LoggerOutput??? was not 
declared in this scope
  make: *** [cqpid.o] Error 1

  Gem files will remain installed in 
/usr/lib64/ruby/gems/1.9.1/gems/qpid_messaging-1.35.0 for inspection.
  Results logged to 
/usr/lib64/ruby/gems/1.9.1/gems/qpid_messaging-1.35.0/ext/cqpid/gem_make.out
  
  
# less 
/usr/lib64/ruby/gems/1.9.1/gems/qpid_messaging-1.35.0/ext/cqpid/gem_make.out
  /usr/bin/ruby extconf.rb
  checking for main() in -lstdc++... yes
  checking for main() in -lstdc++... yes
  checking for main() in -lqpidclient... yes
  checking for main() in -lqpidcommon... yes
  checking for main() in -lqpidmessaging... yes
  checking for main() in -lqpidtypes... yes
  creating Makefile

  make
  g++ -I. -I/usr/include/ruby-1.9.1/x86_64-linux 
-I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.   -fPIC 
-fPIC -fno-inline  -O2 -g -pipe -Wall 
-Wp,-D_F
  ORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 
-mtune=generic -o cqpid.o -c cqpid.cpp
  cqpid.cpp:1868:35: error: qpid/messaging/Logger.h: No such file or directory
  cqpid.cpp: In function ???VALUE _wrap_new_Address__SWIG_0(int, VALUE*, 
VALUE)???:
  cqpid.cpp:2327: error: expected type-specifier
  cqpid.cpp:2327: error: expected unqualified-id before ???&??? token
  cqpid.cpp:2327: error: expected ???)??? before ???&??? token
  
  
 
# find / -name Logger.h
  /usr/include/qpid/log/Logger.h
  /usr/src/debug/qpid-0.18/cpp/include/qpid/log/Logger.h
--

I tried some other things that I didn't document close enough to include here.

Is Ruby still supported?

RHEL 6.7
qpid 0.18-39 (using this to match customer environments)
Ruby 1.8.7 and/or 1.9.2p290

Thanks,
Gary
-- 
sque...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

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



Re: [Qpid C++ Broker][HA] How to configure the HA-cluster without rgmanager?

2016-11-21 Thread Alan Conway
On Sun, 2016-11-20 at 17:53 +0800, lei@airlink-software.com wrote:
> Hi,
> 
> I'm trying to configure the qpid HA-cluster without rgmanager but it
> doesn't work.
> 
> The version Infos:
> ---
> CentOS 7.2
> qpid-cpp-1.35.0
> qpid-proton-0.14.0
> ---
> 
> I installed qpid-cpp and qpid-proton in according to the INSTALL.txt
> with default configurations on 3 CentOS VMs.
> The IP addresses are: 172.16.28.231, 172.16.28.232, 172.16.23.233.
> 
> Started qpid on every VM with command:
> $qpidd --auth no --ha-cluster yes --ha-brokers-url
> 172.16.28.231,172.16.28.232,172.16.28.233
> 
> But when I use qpid-ha to show the status of the cluster, all nodes
> are in joining status.
> It means the nodes didn't connect to each other?

rgmanager is the thing that promotes the initial primary, and promotes
a new primary if that fails. The brokers are waiting for something to
promote one of them.

> Did I have some mistakes in the configurations or the usage?
> I read the documents on the qpid site. It says that rgmanager can
> manage the cluster and set the primary node by calling qpidd-primary
> script.
> But I didn't find the qpidd-primary script in my system.

Looks like it has been converted to a systemd script:

   /usr/lib/systemd/system/qpidd-primary.service

It simply calls `qpid-ha promote`

> Is the rgmanager necessary to use HA-cluster?

You need something to do the basic cluster-management tasks:
- detect primary failure, choose a backup to promote
- ensure exactly one primary is running at all times
- enforce quorum

Qpid HA is designed so that you can use something other than rgmanager
(e.g. pacemaker) but only scripts for rgmanager are provided. If you
want to use something else you'd need to write your own scripts.

Cheers,
Alan.

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



Re: qpid-cpp-1.35 rpm build for SUSE

2016-11-21 Thread rammohan ganapavarapu
Chris,

Thanks for trying to help me, below are my env details.

OS: SUSE Linux Enterprise Server 12 SP1  (x86_64) - Kernel \r (\l).
cmake -version
cmake version 2.8.12.1
gcc version 4.8.5 (SUSE Linux)



Ram

On Fri, Nov 18, 2016 at 6:16 PM, Chris Richardson  wrote:

> Hi Ram,
>
> It looks like you're not entirely alone with this problem:
> http://stackoverflow.com/questions/39708294/error-changes-meaning-when-
> installing-apache-qpid
> notably also SUSE, unfortunately no solution posted.
>
> May I suggest you post some more info about your environment, particularly
> arch (whether you're on 32 or 64 bit) and what compiler (incl. version)
> you're using. Steps to reproduce would also help. Unfortunately I don't
> have SUSE but I'd be happy to test on the distros I do have if it's of any
> benefit.
>
> /Chris
>
>
>
> On 18 November 2016 at 23:34, rammohan ganapavarapu <
> rammohanga...@gmail.com
> > wrote:
>
> > Hi,
> >
> > If any one built qpid-cpp rpms for suse please share your experience, if
> > you already have a rpms to download please share.
> >
> > Ram
> >
> > On Tue, Nov 8, 2016 at 8:19 AM, rammohan ganapavarapu <
> > rammohanga...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I am trying to build qpid-cpp v1.35 rpms for SUSE, while i am building
> > > qpid-proton rpm i am getting this compilation error any idea why i am
> > > getting this error and how to fix it?
> > >
> > > [ 34%] Building CXX object proton-c/bindings/cpp/
> > > CMakeFiles/qpid-proton-cpp.dir/src/connection.cpp.o
> > > In file included from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > ././link.hpp:31,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > > ./receiver.hpp:27,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > session.hpp:27,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/
> > connection.hpp:28,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/src/connection.cpp:24:
> > > /mnt/ec2-user/rpmbuild/BUILD/qpid-proton-0.14.0/proton-c/
> > > bindings/cpp/include/proton/././././sender_options.hpp:87: error:
> > > declaration of ‘proton::sender_options& proton::sender_options::
> > > delivery_mode(proton::delivery_mode)’
> > > /mnt/ec2-user/rpmbuild/BUILD/qpid-proton-0.14.0/proton-c/
> > > bindings/cpp/include/proton/./././././delivery_mode.hpp:30: error:
> > > changes meaning of ‘delivery_mode’ from ‘struct proton::delivery_mode’
> > > In file included from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > ././link.hpp:32,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > > ./receiver.hpp:27,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/./
> > session.hpp:27,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/include/proton/
> > connection.hpp:28,
> > >  from /mnt/ec2-user/rpmbuild/BUILD/
> > > qpid-proton-0.14.0/proton-c/bindings/cpp/src/connection.cpp:24:
> > > /mnt/ec2-user/rpmbuild/BUILD/qpid-proton-0.14.0/proton-c/
> > > bindings/cpp/include/proton/././././receiver_options.hpp:83: error:
> > > declaration of ‘proton::receiver_options& proton::receiver_options::
> > > delivery_mode(proton::delivery_mode)’
> > > /mnt/ec2-user/rpmbuild/BUILD/qpid-proton-0.14.0/proton-c/
> > > bindings/cpp/include/proton/./././././delivery_mode.hpp:30: error:
> > > changes meaning of ‘delivery_mode’ from ‘struct proton::delivery_mode’
> > > make[2]: *** [proton-c/bindings/cpp/CMakeFiles/qpid-proton-cpp.
> > dir/src/connection.cpp.o]
> > > Error 1
> > > make[1]: *** [proton-c/bindings/cpp/CMakeFiles/qpid-proton-cpp.
> dir/all]
> > > Error 2
> > >
> > >
> > > Ram
> > >
> >
>
>
>
> --
>
> *Chris Richardson*, System Architect
> c...@fourc.eu
>
>
> *FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
> *
>
> *Follow us on LinkedIn , Facebook
> , Google+  and Twitter
> !*
>


RE: [Qpid C++ Broker][HA] How to configure the HA-cluster without rgmanager?

2016-11-21 Thread Steve Huston
I am not an expert in all cluster things, but the only way I have seen qpid C++ 
brokers in a cluster is using rgmanager. It takes care of managing the need to 
move the cluster primary around. It also manages the virtual IP address 
assigned to the broker cluster - you didn't mention a virtual IP in your 
question, but you will need it to use rgmanager for qpid HA.

-Steve

> -Original Message-
> From: lei@airlink-software.com [mailto:lei@airlink-software.com]
> Sent: Sunday, November 20, 2016 4:54 AM
> To: users 
> Subject: [Qpid C++ Broker][HA] How to configure the HA-cluster without
> rgmanager?
> 
> Hi,
> 
> I'm trying to configure the qpid HA-cluster without rgmanager but it doesn't
> work.
> 
> The version Infos:
> ---
> CentOS 7.2
> qpid-cpp-1.35.0
> qpid-proton-0.14.0
> ---
> 
> I installed qpid-cpp and qpid-proton in according to the INSTALL.txt with
> default configurations on 3 CentOS VMs.
> The IP addresses are: 172.16.28.231, 172.16.28.232, 172.16.23.233.
> 
> Started qpid on every VM with command:
> $qpidd --auth no --ha-cluster yes --ha-brokers-url
> 172.16.28.231,172.16.28.232,172.16.28.233
> 
> But when I use qpid-ha to show the status of the cluster, all nodes are in
> joining status.
> It means the nodes didn't connect to each other?
> 
> Did I have some mistakes in the configurations or the usage?
> I read the documents on the qpid site. It says that rgmanager can manage
> the cluster and set the primary node by calling qpidd-primary script.
> But I didn't find the qpidd-primary script in my system.
> Is the rgmanager necessary to use HA-cluster?
> 
> Regards,
> 
> 
> Lei Dai

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



Re: C++ Broker --worker-threads option

2016-11-21 Thread Gordon Sim

On 21/11/16 13:25, Gregory Simpson wrote:

Hi,

I am trying to get a better understanding of what the C++ broker
--worker-threads option does. The Linux man pages says that this parameter
"Sets the broker thread pool size" so I believed that when this is set to a
higher number then performance should improve. In testing this theory I
received conflicting results in that performance was downgraded as I
increased the number of worker threads.

The tests I ran:
Test 1: One send process broadcasting to multiple receivers
Test 2: One send process broadcasting to one receiver
Both: Increment --worker-thread parameter from default to 15 by iterations
of 5
Both: Record start and stop time for the receiver and sender processes

I would like answers to the following questions:
* Why would the performance degrade when this parameter is increased


Adding worker threads increases the potential for parallel processing of 
the overall load. However, the achievable parallelism is limited by the 
number of cores on your machine. Increasing the worker threads beyond 
that won't to improve overall performance.


All processing of a given connection is serialised. Therefore having 
more worker threads than there are connections won't help either.


Further, there can be contention between threads (e.g. two connections 
accessing the same queue), and this also limits the amount of 
parallelism actually achievable.



* What does this parameter do


It controls the number of threads that process connections.


* In what case would setting this parameter help performance


The default value is linked to the number of cores. Whether that can be 
improved on depends on the system in question, the number of cores, the 
number of connections, the messaging patterns etc.


Hope this helps a little.


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



C++ Broker --worker-threads option

2016-11-21 Thread Gregory Simpson
Hi,

I am trying to get a better understanding of what the C++ broker
--worker-threads option does. The Linux man pages says that this parameter
"Sets the broker thread pool size" so I believed that when this is set to a
higher number then performance should improve. In testing this theory I
received conflicting results in that performance was downgraded as I
increased the number of worker threads.

The tests I ran:
Test 1: One send process broadcasting to multiple receivers
Test 2: One send process broadcasting to one receiver
Both: Increment --worker-thread parameter from default to 15 by iterations
of 5
Both: Record start and stop time for the receiver and sender processes

I would like answers to the following questions:
* Why would the performance degrade when this parameter is increased
* What does this parameter do
* In what case would setting this parameter help performance

Thanks,
-- 
Greg


Qpid JMS client JmsConnection.close() hangs

2016-11-21 Thread DraCzech
Hi, I'm currently using ActiveMQ 5.14.1 embedded broker connected from
several local queues to MS Azure IoT Hub using JmsConnectionFactory as
foreignConnectionFactory in SimpleJmsQueueConnector. (Using dependency to
qpid jms client 0.11.1) Each queue is connected to the server via its
respective bridge and everything seems to be working fine until I want to
shut down the connection.

If I have network connection, everything is stopped in few seconds. However
if I lose network connection and call SimpleJmsQueueConnector.stop() method,
it hangs on its foreignConnection.close() (JmsConnection). It remains stuck
indefinitely and I have to interrupt the thread responsible for closing of
the connection. Which unfortunately leads to more problems later as there
are remains of the connection in the system.

*Part of the thread dump:*
2016-11-16 09:35:13.275227  - parking to wait for  <0x42e6bc08> (a
java.util.concurrent.CountDownLatch$Sync)
2016-11-16 09:35:13.275654  at
java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
2016-11-16 09:35:13.276143  at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
2016-11-16 09:35:13.276631  at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
2016-11-16 09:35:13.277058  at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
2016-11-16 09:35:13.277577  at
java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
2016-11-16 09:35:13.278676  at
org.apache.qpid.jms.provider.ProviderFuture.sync(ProviderFuture.java:97)
2016-11-16 09:35:13.279103  at
org.apache.qpid.jms.JmsConnection.close(JmsConnection.java:187)
2016-11-16 09:35:13.279622  - locked <0x487b1cb8> (a
org.apache.qpid.jms.JmsQueueConnection)
2016-11-16 09:35:13.280018  at
org.apache.activemq.network.jms.JmsConnector.stop(JmsConnector.java:179)

I believe this problem is tied to the JMS specification and is caused by
MessageConsumer.receive() waiting on some pending receive. I've found some
description of the same or similar issue online, but no specific solution
for it. From what I've read I think the problem might be related to:

http://qpid.2158936.n2.nabble.com/Qpid-JMS-0-9-0-receive-hanging-issue-relates-to-Artemis-works-on-ActiveMQ-td7642585.html

  

and

https://issues.apache.org/jira/browse/QPIDJMS-221
  

Could you please tell me if it's possible to set up my messaging in such a
way which prevents this kind of freeze? How should I defend against this
kind of problems?
Thanks!



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Qpid-JMS-client-JmsConnection-close-hangs-tp7654565.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: Valid values for x-declare, x-subscribe, x-binding?

2016-11-21 Thread Gordon Sim

On 18/11/16 20:29, Gary Taylor wrote:

In the docs, located at
https://qpid.apache.org/releases/qpid-0.32/programming/book/section-addresses.html
there are tables(for example: 2.3 - Link Properties) that
have defintions for the items in $subject.

One example:
x-declare - A nested map whose values correspond to the
valid fields of an AMQP 0-10 queue-declare command.


I do not understand what this is trying to explain.
Is there another location I need to go and look up the "valid
fields of an AMQP 0-10 queue-declare command."?


This means the arguments for the queue-declare command (page 239 in the 
0-10 spec).



I've done
www searches and also the PDF from
http://www.amqp.org/specification/0-10 .

Basically I am trying to learn how to use these with spout
and drain on the shell prompt.


If you are starting out, and have no specific need for AMQP 0-10, I 
would strongly recommend using AMQP 1.0 instead. This is the actual ISO 
standard and is supported by several different brokers (and indeed by 
the Qpid Dispatch Router).




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