| Author | 
		  Message
		 | 
		
		  | paustin_ours | 
		  
		    
			  
				 Posted: Mon Feb 22, 2016 1:28 pm    Post subject: integrationAPI connection to broker | 
				     | 
			   
			 
		   | 
		
		
		   Yatiri
 
 Joined: 19 May 2004 Posts: 667 Location: columbus,oh 
  | 
		  
		    
			  
				I try to deploy using a deploy integration API script running locally on the broker server. when i run the scrip as the broker service id, i am able to deploy fine.
 
 
when i run the script as a different id "tst" i dont seem to get a connection to the broker
 
 
i use
 
 
   
	| Code: | 
   
  
	|             b = BrokerProxy.getLocalInstance(brokerName); | 
   
 
 
 
since the script runs locally on the broker server.
 
 
i have the id "tst" set up with the webuseradmin commands i have admin role for the id.
 
 
Not sure what else is needed
 
 
 
this is the error message i get
 
 
   
	| Quote: | 
   
  
	com.ibm.broker.config.proxy.ConfigManagerProxyLoggedException: BIP8846S: Configuration data for component 'XXXXXX' is not usable by this product version (level -1; should be 8 ). 
 
 
Each component has configuration data associated with it, and this data is versioned to ensure that the component can only be run under a product version that supports this level. The component level is -1 and the current code level only supports 8.
 
com.ibm.broker.config.proxy.PipedBrokerConnectionParameters.getSender(PipedBrokerConnectionParameters.java:163)
 
        at com.ibm.broker.config.proxy.LocalBrokerConnectionParameters.getSender(LocalBrokerConnectionParameters.java:172)
 
        at com.ibm.broker.config.proxy.BrokerProxy.<init>(BrokerProxy.java:355)
 
        at com.ibm.broker.config.proxy.BrokerProxy.getInstance(BrokerProxy.java:982)
 
        at com.ibm.broker.config.proxy.BrokerProxy.getLocalInstance(BrokerProxy.java:888)
 
        at com.dtcc.cdts.components.configdeploy.CDTSDeployBar.connect(CDTSDeployBar.java:814)
 
        at com.dtcc.cdts.components.configdeploy.CDTSDeployBar.deployBAR(CDTSDeployBar.java:222)
 
        at com.dtcc.cdts.components.configdeploy.CDTSDeployBar.deployBar(CDTSDeployBar.java:185)
 
        at com.dtcc.cdts.components.configdeploy.CDTSConfigDeploy.main(CDTSConfigDeploy.java:72)
 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
 
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
 
        at java.lang.reflect.Method.invoke(Method.java:620)
 
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:5 
 
 
 | 
   
 
 
 
this is against the broker 10.0.0.3 on linux | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Mon Feb 22, 2016 3:03 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				So did the jars you're using come with broker 10.0.0.3 ? 
 
Do you have the jetty jars on the classpath?    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | paustin_ours | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 4:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Yatiri
 
 Joined: 19 May 2004 Posts: 667 Location: columbus,oh 
  | 
		  
		    
			  
				| yes i have the correct jar from 10.0.0.3. I did not have the CLASSPATH pointing to jetty jars. I did that and got the same error. I also tried sourcing the mqsiprofile and then trying the deploy, still same error. It only works with the broker service id thus far. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | stoney | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 4:49 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 03 Apr 2013 Posts: 140
  
  | 
		  
		    
			  
				I'm pretty sure that the "-1" in this error means "I can't access the broker configuration, so I don't know what level the broker is".
 
Is your user ID a member of the mqbrkrs group? Can it run any of the mqsi commands, such as mqsilist? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | paustin_ours | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 5:26 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Yatiri
 
 Joined: 19 May 2004 Posts: 667 Location: columbus,oh 
  | 
		  
		    
			  
				| it is not part of the mqbrkrs. it has permissions set up for webuseradmin with admin roles. In other words, when I try to connect from 10.0.0.3 toolkit using this id, I am  able to connect fine to the broker. But of course when I use the toolkit I use the port 4414, here I try to connect as a localinstance since the broker is local on the server. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 6:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				What happens if you change your ConnectionProxy to try the remote connection instead of the local one?   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | stoney | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 6:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 03 Apr 2013 Posts: 140
  
  | 
		  
		    
			  
				Agreed - getLocalInstance() will attempt to use named pipes (Windows) or UNIX domain sockets (everywhere else), which will fail if you're not in the mqbrkrs group and can't access it!
 
 
Use getInstance() instead:
 
 
   
	| Code: | 
   
  
	| BrokerProxy.getInstance(new IntegrationNodeConnectionParameters("mymachine.domain.com", 4414)); | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | paustin_ours | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 6:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Yatiri
 
 Joined: 19 May 2004 Posts: 667 Location: columbus,oh 
  | 
		  
		    
			  
				great..making progress. I tried the getInstance() this time after adding the jetty jars now i get this
 
 
23/02/2016 09:43:55.670 - com.ibm.broker.config.proxy.ConfigManagerProxyLoggedException: Not authorized to connect to target integration node (XXXXX:4414) as use
 
r 'null'. The Integration Node has administration security enabled and the credentials used were invalid.
 
 
I am running as "tst" id, i was thinking that this is the id that would be used to look for access. Should i set the id somewhere in the code? I dont see an option where i can pass an id. Please advise. thanks for your help btw. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | stoney | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 6:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 03 Apr 2013 Posts: 140
  
  | 
		  
		    
			  
				| IntegrationNodeConnectionParameters has setUserID() and setPassword() methods - you need to supply it with the web admin user ID and password of the "tst" user. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | paustin_ours | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 7:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Yatiri
 
 Joined: 19 May 2004 Posts: 667 Location: columbus,oh 
  | 
		  
		    
			  
				| thanks. I do see this and other options to set user id and password in the code. Interestingly when i connect from toolkit, if i don't provide the password in the window it still connects. I dont want to pass a clear text password in the code or the .broker file for that matter. Anyway of getting around it? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Feb 23, 2016 9:18 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| paustin_ours wrote: | 
   
  
	| thanks. I do see this and other options to set user id and password in the code. Interestingly when i connect from toolkit, if i don't provide the password in the window it still connects. I dont want to pass a clear text password in the code or the .broker file for that matter. Anyway of getting around it? | 
   
 
 
Securing the access through HTTPS ?   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |