|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
MQRC_HANDLE_NOT_AVAILABLE error |
« View previous topic :: View next topic » |
Author |
Message
|
RogerLacroix |
Posted: Tue May 05, 2015 12:43 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
vlucian wrote: |
Roger, I'm sorry, you didn't understand, please read more carefully: there's a single log thread. So, this is not the issue. And, as I said before, the same code works on windows or AIX no matter what types of queues are used (local or remote). The problem is only on Linux connector working with remote queue. |
You come here and ask for free help and when you get it, you blow me off. I extensive multi-threaded/programming experience, probably, more years than you have been alive. I spend almost everyday writing C code that runs in a multi-threaded environment. If you don't believe me then go look at my product's page.
Secondly, the code is NOT the same for Windows, AIX and Linux because pThreads does NOT exist on Windows. Therefore, just because it works on Windows has absolutely no bearing on AIX or Linux.
Third, it is very clear from your comments that the program does different things for local queue vs a remote queue.
Is the program outputting the Process ID and Thread ID for each entry written to the logfile? Because what you are describing is a newbie mistake 101 when it comes to programming in a multi-threaded environment.
Do NOT ask a question if you do not want to hear the answer.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 06, 2015 4:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Did you do the right things to build the application on linux?
Are you sure? |
|
Back to top |
|
 |
vlucian |
Posted: Wed May 06, 2015 6:13 am Post subject: |
|
|
Novice
Joined: 28 Jan 2011 Posts: 17
|
I didn't intend to start a dispute regarding programming capabilities of the forum's members (I'm not even a programmer). Obviously, I started this thread because I was (actually we were) out of options and I wanted some other expert's opinions. But please don't mind if I can't consider very 'helpful' answers as " find a developer who understands" or "your developers don't know what the issue is!?!" or "newbie mistake". I want to believe here are only professional discussions where other people's age really don't matter. I'm sure we are all young ... at least in spirit.
(closing parenthesis)
On the other hand I must admit: maybe the case was not .... clearly explained. My colleagues told me from the beginning it will be difficult to go into details. If you want I can try to clarify things. Better idea, you can go to our community page http://www.fintp.org/ and see there (on github actually) the open source version of this product (fintp_log, fintp_transport and fintp_connectors - MqConnector part). Needless to say you or anyone else can join this community.
We can forget about windows or aix and stay with Linux only: same executable produce inactive handles if we use a remote queue and act normally if we use a local queue. The code does not differentiate between them.
Another information: if we are using MQCNO_HANDLE_SHARE_BLOCK option instead MQCNO_HANDLE_SHARE_NONE the problem disappear.
@mqjeff
Quote: |
Did you do the right things to build the application on linux?
Are you sure? |
what do you mean?
Last edited by vlucian on Wed May 06, 2015 6:36 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 06, 2015 6:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It's difficult to tell from the source in github what libraries and what compiler options are passed to the build commands for the MQ Connector. |
|
Back to top |
|
 |
tczielke |
Posted: Wed May 06, 2015 7:36 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
It sounded like a trace was run from a previous post. Assuming that was an MQ trace (i.e. strmqtrc or activity trace), do you see your log thread maintaining the same thread id through the trace? For example, if your pid was 1000 and your log thread started with 5, you would see the thread id in the MQ trace stay at 1000.5 for the entire log thread trace activity. Or do you see the log thread activity in the trace increasing its thread id in the trace? For example, the log pid.thread id starts at 1000.5, but then starts increasing to 1000.10, 1000.13, etc.? If you are using one long running thread for the logging thread, that thread id in the trace should stay the same thread id number, I would anticipate. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 06, 2015 7:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vlucian wrote: |
Another information: if we are using MQCNO_HANDLE_SHARE_BLOCK option instead MQCNO_HANDLE_SHARE_NONE the problem disappear.
|
That would point to a handle not being closed because it was meant to be shared... So you would have to handle differently the closure / release of the handle depending on the option and usage you are making of it...
Make sure you compile with the thread safe libs (*_r.so)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vlucian |
Posted: Wed May 06, 2015 10:11 am Post subject: |
|
|
Novice
Joined: 28 Jan 2011 Posts: 17
|
fjb_saper wrote: |
Make sure you compile with the thread safe libs (*_r.so)  |
Tthat's for sure - a developer confirmed me.
Tomorrow I will try to clarify more aspects.
Thank you all. |
|
Back to top |
|
 |
vlucian |
Posted: Thu May 07, 2015 2:49 am Post subject: |
|
|
Novice
Joined: 28 Jan 2011 Posts: 17
|
Maybe this link will help
http://www.fintp.org/getting-started/
Also, here are some compilation instructions:
Code: |
g++
-DHAVE_CONFIG_H -I. -DUNIX -DDEBUG_ENABLED -DXALAN_1_9
-I/home/fintp/fintp_src/fintp_dev/fintp_utils/src
-I/home/fintp/fintp_src/fintp_dev/fintp_log/src
-I/home/fintp/fintp_src/fintp_dev/fintp_base/src
-I/home/fintp/fintp_src/fintp_dev/fintp_transport/src -DLINUX
-I/usr/local/include -pthread -I/usr/local/include
-I/usr/local/include/xercesc -I/usr/local/include
-I/usr/local/include/xalanc -I/usr/include/ZipArchive
-I/usr/include/ziparchive -I/usr/local/ZipArchive/ZipArchive
-I/usr/local/ZipArchive -I/home/fintp/fintp_src/fintp_dev/fintp_udal/src
-DLINUX -g -O2 -MT FinTPDBConnector-FilePublisher.o -MD -MP -MF
.deps/FinTPDBConnector-FilePublisher.Tpo -c -o
FinTPDBConnector-FilePublisher.o `test -f
'src/FileConnector/FilePublisher.cpp' || echo
'./'`src/FileConnector/FilePublisher.cpp |
Code: |
g++ -shared -nostdlib
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtbeginS.o .libs/MqException.o
.libs/MqLogPublisher.o .libs/TransportHelper.o .libs/WMqHelper.o
-Wl,-rpath -Wl,/home/fintp/fintp_src/fintp_dev/fintp_log/.libs
-Wl,-rpath -Wl,/home/fintp/fintp_src/fintp_dev/fintp_utils/.libs
-Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
-L/home/fintp/fintp_src/fintp_dev/fintp_utils/.libs/.libs
-L/opt/mqm/lib64 -limqb23gl_r -limqc23gl_r
-L/home/fintp/fintp_src/fintp_dev/fintp_utils/.libs -L/usr/lib
-L/home/fintp/fintp_src/fintp_dev/fintp_log/.libs
/home/fintp/fintp_src/fintp_dev/fintp_log/.libs/libfintp_log.so
-L/usr/local/lib -lboost_system
/home/fintp/fintp_src/fintp_dev/fintp_utils/.libs/libfintp_utils.so
/usr/local/lib/libxerces-c.so -lnsl -lcurl -licui18n -licuuc -licudata
-lpthread -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7
-L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.. -lstdc++ -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtendS.o
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crtn.o
-Wl,-soname -Wl,libfintp_transport.so.0 -o
.libs/libfintp_transport.so.0.0.0 |
|
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|