Our websphere MQ GUI shows the java client to be connected .
Further on investigation, we see Java application on the client machine is not even on but developed an error and quit.
Question is when the Jave program terminates should the MQ - Java connection not automatically disconnect ?
Expert advise needed .
How do you know the application is still connected? You say client machine, so is the SVRCONN channel used by the java application still running? Did you refresh the WMQ Explorer GUI (as Shashi asked?).
MQ does clean up the connections but it depends on the underlying operating system which should clear/mark the port as unused (In linux, net.ipv4.tcp_keepalive_time)
Related
I am connecting from server 1 to server 2 using ibm mq series(single queue manager group) using single subnet NAT ip address. Destination of server 2 is single ip address point. Problem is: whenever i connect different custodian data(client data) to upload data and whenever server restart happens on one custodian point, other custodian client resets and not able to connect to server2 ip address.
Solution i have attempted: instead of ibm mq series and regular c# code, using combination of microservices with java8 parallel processing and Apache Kafka to render parallel threads to connect with single nat ip subnet, so that none of the custodian codes get resetted.is this solution correct? But the destination server is giving single ip address point to connect for n custodians. Is there something i can do in nat gateway to parallel render data to destination IP address? Please help me with my solution.will be happy to help with any info.
Your question is not very clear and then you go off on a tangent about your solution which again is not clear and appears to be creating an overly complex system.
So, let me guess what your setup is:
Server 1 has an IBM MQ client running a C# .NET application. Is this correct? If so, what version is the IBM MQ Client software? i.e. 9.1.0.9
Server 2 is running IBM MQ queue manager. Is this correct? If so, what version is the IBM MQ Server software? i.e. 9.2.0.4 Use the dspmqver command to get this information.
If the above is correct then it is pretty much a basic IBM MQ environment.
So, when your application has this issue, MQ would have thrown an MQException. What was the Completion Code and Reason Code? The reason code would probably been one of the following
2009 [MQRC_CONNECTION_BROKEN]
2059 [MQRC_Q_MGR_NOT_AVAILABLE]
2538 [MQRC_HOST_NOT_AVAILABLE]
What did your application do when it received the MQException? Crash or die or loop forever?
Did you add reconnection login to your code to reconnect to the queue manager after the failure?
Friends,
I installed IBM explorer 7.1 which have server and GUI. Locally I connected the queue using inter process communication. Now I need to connect the server QM from remote machine using java standalone program.
In server I have created a queue, port and server channel. when I trying to connect using host name , unable to get the connection. Is this the right way?. else I have to install client where I tried connect that server.but getting error code 2035 when i run that java program. listener and queue manage is running in remote machine. Some forum i seen that AMQCLCHL.TAB file using for client connection. I had confusion whether i have to use that for client connection. if yes how i can use that?
I've looked all over for this for quite a while so I'm just going to ask it here;
How do I set up an H2 db in server mode so I can connect to it via the internet from a different machine? How do I start the engine in server mode and leave it running on a machine to accept connections? I can forward the ports and everything fine, it's just getting the engine in "receiving" mode that I'm dumb about.
I'm sorry, I've really looked everywhere. I want to be able to connect to the db and add data from a mobile app. All of the app and transmission data is working great, I just need to be able to run a server with the db on it and receive the data. Any tutorial or documentation that is clearer than the stock H2 server mode documentation would be really appreciated.
Thanks!
For security reasons, by default the H2 servers (including the TCP server) are protected against remote access. The error message you get on the client should be clear this. You have to explicitly enable remote access using -tcpAllowOthers (for the TCP server):
java -cp h2.jar org.h2.tools.Server -tcp -tcpAllowOthers
This will only start the TCP server - see the documentation for details.
$ java -cp h2.jar -Dh2.binAddress=0.0.0.0 org.h2.tools.Server
See http://h2database.com/html/advanced.html#server_bind_address
I have a client/server applciation that communicates through JNDI/RMI/IIOP using, on client side, some Glassfish client code (NOT packaged as a Glassfish client) and on server side a Glassfish instance.
I have some Glassfish multimode scripts that I use to make sure the domains I create on any machines are totally identical and correctly configured.
Using that script on local network, I have already made sure I could access a remote Glassfish server instance from client code on my machine (that was quite a reasonable guess, however I tend to test all things I'm not totally sure of).
Next step is to have that client/server application working over (I should instead say "through") internet : with my client code in my company LAN (in other words on my machine) and my server code on an Amazon VM running my Glassfish server. For some reasons, the remote Glassfish is running on a Windows VM.
Obviously (as I ask that question, you can safely guess the through internet test is NOT working. And you're right.
So, to have more guesses, I started SmartSniffer both on my machine and on server.
On my machine, I can only see one TCP packet going to that server instance (and nothing coming back).
On server instance, I can see one packet entering (the client query) and one packet exiting (the server answer). That server answer looks like this :
[4/4/2012 11:47:13 AM:917]
GIOP.......(................NameService....._is_a...................NEO................ª.......(IDL:omg.org/SendingContext/CodeBase:1.0............n........172.27.63.145.Ô2....¯«Ë........e...........................
...................
... ...........&...............(IDL:omg.org/CosNaming/NamingContext:1.0.
That 172.27.63.145 address is my IP in local network.
[4/4/2012 11:47:13 AM:917]
GIOP.......2............NEO................0.......(IDL:omg.org/SendingContext/CodeBase:1.0............ô........46.137.114.###.'5....¯«Ë........d...........................
...................
... ...........&...........!...|...............$...
...f............10.241.42.###.'6.#........g..............g........default...................g...............+IDL:omg.org/CosNaming/NamingContextExt:1.0.............¢........10.241.42.208.'5...M¯«Ë....
...d... S1AS-ORB............RootPOA....
TNameService............................... ...................
... ...........&......
That 46.137.114.### is external one of my Amazon VM, and 10.241.42.### is its internal IP in amazon magical virtual server.
So it seems server is answering, no ?
But that answer never finds its way to my machine in my network.
So ... how can I check where it get lost ? Seems likepacket sniffer has done its job, but what can I do now ?
NOTE This question is a clarification of "How to Connect a glassfish client to glassfish server over NATs?"
Perhaps stupid question, but is your Amazon EC2 instance is configured with all required ports open for your communication protocol to work? You could see configured open ports in security group your instance assigned to in AWS console, under EC2->Security Groups.
I've being trying to setup my java application that connects to a local queue manager in MQ7 without a WebSphere Application Server installed on my machine in binding mode. Without specifying the host in the .bindings file, running my application will throw an java exception somewhere along the lines of:
com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018:
Failed to connect to queue manager 'TBUKKKNN' with connection mode
'Client' and host name ''. Check the queue manager is started and if
running in client mode, check there is a listener running. Please see
the linked exception for more information.
Although documentation for WebSphere MQ has explicitly denied possibility of connecting to MQ7 without WAS installed on same machine, my colleagues are very confident that there are workarounds for this.
Much appreciated if anyone could help me with this issue. Or let me know if more clarification on my question is required.
I wrote an article a while back that explains how to do this so I'm a little puzzled about any documentation stating that it can't be done. Not only is there a "workaround" but it is officially supported and the sample programs that come with the WMQ Client install media include several that use Java and JMS but do not use a Java EE server. If for some reason you just grabbed the jar files instead of installing the vendor distribution, you can download it for free to get the samples. The v7.0 client is here and the v7.1 client is here. Also, make sure to use the version of the docs that matches your client version. The v7.0 Infocenter is here and the v7.1 Infocenter is here. Any client version can connect to a v7.0 QMgr, by the way.
Anyway, your error message indicates that your Connection Factory transport type is still set to Client. You'll need to change it to BIND. The properties are described here. The landing page with the list of all the properties of all the administered objects is here.
Change to cf.setTransportType(MQCNO_STANDARD_BINDING); ...that should work
cf.setTransportType(WMQConstants.WMQ_CM_BINDINGS);
cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_BINDINGS);