cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill a single Java thread ID?

Former Member
0 Kudos

All

How to kill a single Java thread ID without recycling the entire Java process, via SMICM or jcmon?

Kindly let me know if there any method followed for the same.

Regards

Jim

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Login to http://<hostname>:50000/nwa/start-stop.

2.Goto Java EE Services.

3.Search for service <thread>

4.Restart this service.

5.Go back to MMC and refresh . All red threads will become green.

*If NWA is not accessible , then the service has to be restarted from telnet .*

1.login through putty or if it is wondows go to cmd

2.Give command telnet localhost 50008

3.login via j2ee_admin & master pwd

4.STOPSERVICE <Thread>

5.STARTSERVICE <Thread>

6.Refresh in MMC

Former Member
0 Kudos

Hi

Thanks for your response. However I have few more queries on this:

1) How to identify the service, associated for java threads that are shown under SMICM ?

2) We are not able to associate or find the threads in NWA. How to find them?

Regards

James

Former Member
0 Kudos

Hello,

I have the same problem. I have a NW'04 Java Stack in which one thread has been running for several days and I would like to kill it.

I have telnetted but I cannt find the correct syntax. The information I have is: "SAPEngine_Application_Thread[impl:3]_15" but stopservice SAPEngine_Application_Thread[impl:3]_15

stopservice SAPEngine_Application_Thread_15

do not work. I cannot seem to figure out what to put in and in the meantime CPU is going up and GC is also still extremely frequent.

Former Member
0 Kudos

Hello,

I have the same problem. I have a NW'04 Java Stack in which one thread has been running for several days and I would like to kill it.

I have telnetted but I cannt find the correct syntax. The information I have is: "SAPEngine_Application_Thread[impl:3]_15" but stopservice SAPEngine_Application_Thread[impl:3]_15

stopservice SAPEngine_Application_Thread_15

do not work. I cannot seem to figure out what to put in and in the meantime CPU is going up and GC is also still extremely frequent.

Answers (1)

Answers (1)

iavor_petkov
Explorer
0 Kudos

Hi,

There is no way to stop a thread gracefully in Java.

Check the javadoc of http://docs.oracle.com/javase/6/docs/api/java/lang/Thread.html#stop() - it is similar also in earlier releases of Java.

Correspondingly there are no tools, commands or UI in the Java server which allow or try to do this.

The startservice/stopservice commands try to stop and start Java AS services (and you cannot stop core services).

The stopapp/startapp commands will try to stop and start Java EE applications deployed on the Engine but will not stop any threads which are currently executing in those applications. This will especially not help you if due to faulty coding the application has fallen into an infinite loop or deadlock.

Best Regards,

Iavor