| Author | 
		  Message
		 | 
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Thu Nov 27, 2008 1:37 am    Post subject: Problem with BlockIP2 on HP-UX | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				Hello,
 
 
I have problem with installing BlockIP2 on HP-UX.
 
 
Firs I compile code:
 
 
   
	| Code: | 
   
  
	cc +DD64 +z -c -D_HPUX_SOURCE -o BlockIP2.o BlockIP2.c -I/opt/mqm/inc
 
 | 
   
 
 
 
The output is:
 
 
   
	| Code: | 
   
  
	
 
Warning 942: "BlockIP2.c", line 5411 # Types 'tm *' and 'int' are not
 
    assignment-compatible.
 
        timenow = localtime_r(&longtime,&wk_localtime);
 
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Warning 942: "BlockIP2.c", line 5564 # Types 'tm *' and 'int' are not
 
    assignment-compatible.
 
        timenow = localtime_r(&longtime,&wk_localtime);
 
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 | 
   
 
 
 
BlockIP2.o file is genearted
 
 
Then I'm linking:
 
 
   
	| Code: | 
   
  
	ld -b +noenvvar BlockIP2.o +ee MQStart +ee BlockExit -o BlockIP2 -L/opt/mqm/lib64 -L/usr/lib/pa20_64 -lmqm_r -lpthread
 
 | 
   
 
 
 
The output is :
 
 
 
 
   
	| Code: | 
   
  
	ld: (Warning) Ignore library $2$s with bad machine type 796226418
 
1 warnings.
 
 | 
   
 
 
 
BlockIP2 file is genearted
 
 
Next I copy lib:
 
 
 
   
	| Code: | 
   
  
	chown mqm:mqm BlockIP2
 
/bin/cp BlockIP2 /var/mqm/exits64
 
chown mqm:mqm /var/mqm/exits64/BlockIP2 | 
   
 
 
 
...and configure channel:
 
   
	| Code: | 
   
  
	
 
ALTER CHANNEL(xxx) ... +
 
SCYDATA('x.x.x.*;) +
 
scyexit('BlockIP2')
 
 | 
   
 
 
 
Problem is that when I'm testing it I got error :
 
 
   
	| Code: | 
   
  
	AMQ9535: User exit not valid.
 
 | 
   
 
 
 
I'm not HP-UX and C expert,
 
Any suggestions ?
 
I really need your Help. _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Thu Nov 27, 2008 4:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	ld: (Warning) Ignore library $2$s with bad machine type 796226418
 
1 warnings.  | 
   
 
 
 
Bad machine type? Are you using Itanium libraries on a non Itanium machine and vice versa? Or is the compiler / linker the offending component?    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Thu Nov 27, 2008 4:38 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				
   
	| fjb_saper wrote: | 
   
  
	
   
	| Quote: | 
   
  
	ld: (Warning) Ignore library $2$s with bad machine type 796226418
 
1 warnings.  | 
   
 
 
 
Bad machine type? Are you using Itanium libraries on a non Itanium machine and vice versa? Or is the compiler / linker the offending component?    | 
   
 
 
 
 
Thanks
 
Admin told me it is Itanium machine.
 
Are you talking about Itanium MQ libs ?
 
 
Do you know where this Itanium libs are placed ? _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Thu Nov 27, 2008 2:23 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| marcin.kasinski wrote: | 
   
  
	Admin told me it is Itanium machine.
 
Are you talking about Itanium MQ libs ?
 
 
Do you know where this Itanium libs are placed ? | 
   
 
 
 
Well HP has 2 types of machines Itanium and non Itanium (Risc?).
 
You cannot use the libraries for an Itanium machine on a non itanium machine and vice versa. If you need the Itanium libraries you need to compile on an Itanium machine that has the Itanium MQ (client and/or server) installed.
 
 
You CANNOT compile/link on a non Itanium machine and expect the program to work on an Itanium machine. 
 
 
  _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Philip Morten | 
		  
		    
			  
				 Posted: Fri Nov 28, 2008 3:02 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Master
 
 Joined: 07 Mar 2002 Posts: 230 Location: Hursley Park 
  | 
		  
		    
			  
				
   
	| marcin.kasinski wrote: | 
   
  
	
   
	| fjb_saper wrote: | 
   
  
	
   
	| Quote: | 
   
  
	ld: (Warning) Ignore library $2$s with bad machine type 796226418
 
1 warnings.  | 
   
 
 
 
Bad machine type? Are you using Itanium libraries on a non Itanium machine and vice versa? Or is the compiler / linker the offending component?  :innocent: | 
   
 
 
 
 
Thanks
 
Admin told me it is Itanium machine.
 
Are you talking about Itanium MQ libs ?
 
 
Do you know where this Itanium libs are placed ? | 
   
 
 
If this is an Itanium machine and WebSphere MQ was properly installed then the MQ libraries will be for Itanium ( libraries in /opt/mqm/lib and lib64 will have .so suffix), however,  in your link line you have  "-L/usr/lib/pa20_64" which is where the system PA-RISC libraries are located for programs that use the PA-RISC emulation.  I imagine that the linker found libpthread from that directory and then rejected it as it did not match the architecture of the .o file.  I think you should just be able to remove that entry from your link command and let the linker find libpthread from its built in path but instructions for building all types of MQ applications on  HP-UX Itanium ( aka IPF or IA64) can be found in the Information Center at http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg16290_.htm _________________ Philip Morten
 
 
The postings on this site are my own and do not necessarily represent IBM's positions, strategies or opinions. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Wed Dec 03, 2008 1:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				I changed ld command : 
 
 
ld -b +noenvvar BlockIP2.o +ee MQStart +ee BlockExit -o BlockIP2 -L/opt/mqm/lib64 -L/usr/lib/hpux64 -lmqm_r -lpthread
 
 
 
Now there is no warning after executing this command but I still have "User exit not valid" error on runtime. _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Mon Dec 08, 2008 4:23 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				Anothere thing:
 
 
How can I check lib is valid ?
 
 
 
 
returns 
 
 
   
	| Code: | 
   
  
	| BlockIP2:       ELF-64 shared object file - IA64 | 
   
 
 
 
 
 
 
returns 
 
 
   
	| Code: | 
   
  
	  find library=libmqm_r.so; required by ./BlockIP2
 
        libmqm_r.so =>  /opt/mqm/lib64/libmqm_r.so
 
 
  find library=libpthread.so.1; required by ./BlockIP2
 
        libpthread.so.1 =>      /usr/lib/hpux64/libpthread.so.1
 
 
  find library=libmqz_r.so; required by /opt/mqm/lib64/libmqm_r.so
 
        libmqz_r.so =>  /opt/mqm/lib64/libmqz_r.so
 
 
  find library=libmqmcs_r.so; required by /opt/mqm/lib64/libmqm_r.so
 
        libmqmcs_r.so =>        /opt/mqm/lib64/libmqmcs_r.so
 
 
  find library=libmqmzse.so; required by /opt/mqm/lib64/libmqm_r.so
 
        libmqmzse.so => /opt/mqm/lib64/libmqmzse.so
 
 
  find library=libcl.so.1; required by /opt/mqm/lib64/libmqmcs_r.so
 
        libcl.so.1 =>   /usr/lib/hpux64/libcl.so.1
 
 
  find library=libpthread.so.1; required by /opt/mqm/lib64/libmqmcs_r.so
 
        libpthread.so.1 =>      /usr/lib/hpux64/libpthread.so.1
 
 
  find library=libdl.so.1; required by /opt/mqm/lib64/libmqmcs_r.so
 
        libdl.so.1 =>   /usr/lib/hpux64/libdl.so.1
 
 
  find library=libIO77.so.1; required by /usr/lib/hpux64/libcl.so.1
 
        libIO77.so.1 => /usr/lib/hpux64/libIO77.so.1
 
 
  find library=libunwind.so.1; required by /usr/lib/hpux64/libcl.so.1
 
        libunwind.so.1 =>       /usr/lib/hpux64/libunwind.so.1
 
 
  find library=libuca.so.1; required by /usr/lib/hpux64/libunwind.so.1
 
        libuca.so.1 =>  /usr/lib/hpux64/libuca.so.1 | 
   
 
 
 
 
Can I do another checking or can I turn some trace on to have additional error message from MQ ? _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | xhaxk | 
		  
		    
			  
				 Posted: Mon Dec 08, 2008 1:40 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 30 Oct 2008 Posts: 31
  
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| I still have "User exit not valid" error on runtime | 
   
 
 
 
What do you mean, still? This is the first time ytou have mentioned this.
 
I expect the exit lib is not in the right place - /var/mqm/exits64 - or the permissions are wrong.
 
 
Post the error msg from the log file, the channel definition, and a listing (ls -l) of /var/mqm/exits64 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Thu Dec 11, 2008 7:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				
   
	| Code: | 
   
  
	
 
Error log
 
 
12/08/08 09:36:36 - Process(5388.1014) User(mqbrkr) Program(amqrmppa_nd)
 
AMQ9535: User exit not valid.
 
 
EXPLANATION:
 
Channel program 'WLSAP_T/WCESB_T' ended because user exit 'BlockIP2' is not
 
valid.
 
ACTION:
 
Ensure that the user exit is specified correctly in the channel definition, and
 
that the user exit program is correct and available.
 
----- amqrexta.c : 5327 -------------------------------------------------------
 
12/08/08 09:36:36 - Process(5388.1014) User(mqbrkr) Program(amqrmppa_nd)
 
AMQ9999: Channel program ended abnormally.
 
 
 
 
 
 
Channel Configuration:
 
 
 
 
  9 :  DISPLAY CHANNEL(WLSAP_T/WCESB_T)
 
AMQ8414: Display Channel details.
 
   CHANNEL(WLSAP_T/WCESB_T)                CHLTYPE(RCVR)
 
   ALTDATE(2008-12-08)                     ALTTIME(09.32.37)
 
   BATCHSZ(50)                             COMPHDR(NONE)
 
   COMPMSG(NONE)                           DESCR( )
 
   HBINT(300)                              KAINT(AUTO)
 
   MAXMSGL(4194304)                        MCAUSER( )
 
   MONCHL(QMGR)                            MRDATA( )
 
   MREXIT( )                               MRRTY(10)
 
   MRTMR(1000)                             MSGDATA( )
 
   MSGEXIT( )                              NPMSPEED(FAST)
 
   PUTAUT(DEF)                             RCVDATA( )
 
   RCVEXIT( )                              SCYDATA(FN=/esbdatat/WLSAP_T.conf;)
 
   SCYEXIT(BlockIP2)                       SENDDATA( )
 
   SENDEXIT( )                             SEQWRAP(999999999)
 
   SSLCAUTH(REQUIRED)                      SSLCIPH( )
 
   SSLPEER( )                              STATCHL(QMGR)
 
   TRPTYPE(TCP)
 
 
 
/home/mqbrkr $ ls -l /var/mqm/exits64
 
total 1378
 
-rwxr-xr-x   1 mqm        mqm         243512 Dec  4 09:33 BlockIP2
 
-rwxr-xr-x   1 mqbrkr     mqm         310168 Dec  9 14:27 BlockIP22
 
lrwxr-xr-x   1 mqbrkr     mqm             44 Jun 30 10:14 libclntsh.sl -> /db2/oracle/product/10.2.0//lib/libclntsh.sl
 
-rwxr-xr-x   1 mqbrkr     mqm          79104 Dec  5 10:00 secexit
 
-rwxr-xr-x   1 mqbrkr     mqm          70792 Dec  5 11:47 secexit2
 
 
 
 
 | 
   
 
 
 
BlockIP2 -> compiling with cc +DD64 +z -c -D_HPUX_SOURCE -o BlockIP2.o BlockIP2.c -I/opt/mqm/inc
 
 
BlockIP22 -> compiling with cc -D_HPUX_SOURCE -D_REENTRANT -DUNIX -DHNLUP +DD64 +DSitanium2 -q -c +z -o BlockIP2.o BlockIP2.c -I/opt/mqm/inc
 
 
 
 
Second cc command I got from Joergen author of BlockIP2.
 
He told these are proper parameters for HP-UX 64 Itanium.
 
 
Problem is it doesn't help.
 
I got "User exit not valid" error for both libs. _________________ Marcin
  Last edited by marcin.kasinski on Thu Dec 11, 2008 10:30 am; edited 2 times in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Thu Dec 11, 2008 7:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				
   
	| xhaxk wrote: | 
   
  
	
   
	| Quote: | 
   
  
	| I still have "User exit not valid" error on runtime | 
   
 
 
 
What do you mean, still? This is the first time ytou have mentioned this... | 
   
 
 
 
From Marcin's first post:
 
 
   
	| marcin.kasinski wrote: | 
   
  
	| Problem is that when I'm testing it I got error : AMQ9535: User exit not valid. | 
   
 
 _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Thu Dec 11, 2008 9:55 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				Is there any command I can check this lib to be 100% sure lib is OK ?
 
Is there any chance to trace MQ and add additional error message ?
 
 
For me "user exit is not valid" is not enough. _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Thu Dec 11, 2008 10:25 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				| try renaming the compiled file to include ".so" at the end. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Fri Dec 12, 2008 1:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				
   
	| mqjeff wrote: | 
   
  
	| try renaming the compiled file to include ".so" at the end. | 
   
 
 
 
 
The same error... _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Fri Dec 12, 2008 2:13 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw 
  | 
		  
		    
			  
				I've got something.
 
I will check it on monday but...
 
 
 
What is proper value for SCYEXIT  on HP-UX
 
 
 
 
or 
 
 
   
	| Code: | 
   
  
	| SCYEXIT('BlockIP2(BlockExit)') | 
   
 
 _________________ Marcin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Fri Dec 12, 2008 9:01 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Note that when you do not have the value between single quotes it gets moved to upper case. And remember CASE does MAtter   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |