eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
387 stars 144 forks source link

JMS session closed #3040

Closed glassfishrobot closed 17 years ago

glassfishrobot commented 17 years ago

I have an app that uses JMS, but I get an exception when I try to send a message to a destination. The log files indicate the session is closed when it shouldn't be...

The AS is configured for a cluster with a single instance. I attached the instance log file.

Environment

Operating System: All Platform: Linux

Affected Versions

[9.1pe]

glassfishrobot commented 6 years ago
glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Created an attachment (id=928) Cluster instance log file

glassfishrobot commented 17 years ago

@glassfishrobot Commented gfbugbridge said:

glassfishrobot commented 17 years ago

@glassfishrobot Commented @sivakumart said: Requesting Ramesh to investigate

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: Daniel, There is a null pointer exception in the logs before the JMS exception, coould you confirm if the connection and session were created properly

[#|2007-05-22T10:30:12.454-0400|SEVERE|sun-appserver9.1|com.localmatters.flexiq.collector.producer.ProducerWS|_ThreadID=21;_ThreadName=RMI TCP Connection(77)-192.168.3.125;_RequestID=0059a38b-445d-4b42-90f5-72205b131e9c;|Unexpected error. java.lang.NullPointerException at com.localmatters.flexiq.collector.producer.ProducerWS.initJMSConnectivity(ProducerWS.java:269) at com.localmatters.flexiq.collector.producer.ProducerWS.init(ProducerWS.java:229) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

-Ramesh

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: I think there are two issues here:

1. Connection factory resource injection fails when the bean goes through its life-cycle (constructor, post-construct method) right after deployment. However, when a client calls one of the business methods, the bean goest through the life-cycle again, and the connection factory resource injection is successful.

2. When glassfish is configured with cluster profile, the connection is successfully created. However, when one tries to use it to create a session, for example, he gets a javax.jms.IllegalStateException: [C4062]: Cannot perform operation, connection is closed.

Should we open another issue to keep track of these in separate thread?

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Ops... Issue 1 has an entry already as you mentioned in our e-mail thread: https://glassfish.dev.java.net/issues/show_bug.cgi?id=2105

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: There is an error in the log file that indicates that the connection is closed (cleanup) ,

[#|2007-05-24T11:27:26.411-0400|FINER|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=22;_ThreadName=TP-Processor2;ClassName=com.sun.messaging.jms.ra.ManagedConnectionFactory;MethodName=cleanup():mcId=2;_RequestID=9e1d1bc9-af4e-4491-b0bb-440771259202;|ENTRY|#]

Could you set ejb-container and resource-adapter log levels to FINEST and attach the logs.

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Here are the logs as requested. Let me know if anything else is needed.

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Created an attachment (id=944) Domain, node-agent, and cluster instance log files.

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: The logs do not provide enough clue of what is happening, and i have not been able to reproduce this. Daniel (bug submitter) has helped in the analysis by generating the required log files, appreciate this. But, would need more information and time to debug this, downgrading the priority as this a bit difficult to reproduce.

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: I stripped down the code to keep just the JMS relevant section so that I can share the code with you. I still get the same error/exceptions.

Here it is. If you can't reproduce still, I can share the scripts that I use to install/configure my glassfish instance. If it is any help, the OS on that machine is Fedora Core release 5 (Bordeaux) with Kernel 2.6.15-1.2054_FC5 smp.

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Created an attachment (id=946) Stripped down project with same problem reproduced on bug submitter machine

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: Hi Daniel, sorry for responding after such a long time. The apps you attached were useful, I deployed the app on GF V2 b52, (or beta 3 , b50c).

I was not able to see the exception you are getting , i was able to send a text message successfully to the topic and receive it back (through an MDB) , could you check

1. if you were creating the resources jms/InitialDestination and jms/CollectorConnectionFactory in the target cluster and not the DAS asadmin create-jms-resource ....... --target

2. There seems to be some problem in the byte message sending part of the code i just inserted a code to create a Text message and send it , this seems to working. I tried the bytemessage even in DAS, does not seem to work for me there too

3 try it with b52

-Ramesh

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: Hi Ramesh, sorry for the few lapsing days. I was out of the office. Yes. I do create the JMS resources in the target cluster. Relating to your second point, what problems did you find?

Also, I zipped the scripts that I use to install and configure the AS before I deploy the application. The the archive is somewhat large, so I uploaded to a server where you can download: http://66.165.164.188/collector/

It's for Linux. Simply unzip the file in any directory of your choice. cd into the directory and run the install.sh script with the "das" param, e.g. "./install.sh das"

That should install, configure, and run the AS. DAS is on port 11048.

I was revising the entire procedure, and the only thing out of the ordinary is that I use apache http for load balancing, so I followed the steps in http://blogs.sun.com/dadelhardt/entry/loadbalancing_with_mod_jk_and_glassfish and http://weblogs.java.net/blog/jfarcand/archive/2006/03/running_glassfi_1.html

glassfishrobot commented 17 years ago

@glassfishrobot Commented dhcavalcanti said: sorry, forgot to mention. The ant script uses an extension: http://antelope.tigris.org/

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: Here is what i did

1. Created the resources 2. Deployed your application on a 3 instance cluster. 3. Invoked the service using your client.

I did not get any exception,

If i just kept the byte message part of the code, i did not get any exception but neither did i receive any messages in my MDB which was listening to the topic. I did not get a chance to investigate further here,

I commented out the byte message part and created a text message and sent it using the same session, it worked. As i said iam using Beta 3 build 50e , you could also use V2 trunk build 52.

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: I would not be able to setup an apache load balancer to try this one out. Please check if you can reproduce this on a glassfish cluster (b52) (without LB) and let me know.Also if you have a simpler test case like a text message in the web service it would be easier to narrow it down I tried it on a 3 instance cluster with your client and server applications.

glassfishrobot commented 17 years ago

@glassfishrobot Commented rampsarathy said: please update the issue when you have tried with b52 as per the instructions. until then iam changing the status

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: collector-reproduce.zip Attached By: dhcavalcanti

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: logs.zip Attached By: dhcavalcanti

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: server.log Attached By: dhcavalcanti

glassfishrobot commented 17 years ago

@glassfishrobot Commented Was assigned to rampsarathy

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-3040

glassfishrobot commented 17 years ago

@glassfishrobot Commented Reported by dhcavalcanti

glassfishrobot commented 17 years ago

@glassfishrobot Commented Marked as cannot reproduce on Tuesday, June 26th 2007, 5:32:30 pm