Pages

Google ads Horizontal

Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Wednesday, June 7, 2017

kill tomcat linux

* process_name="prmbodev"
* ps -eaf | grep $process_name
* export pid=` ps -eaf | grep  $process_name | grep -v "grep"| awk 'NR==1{print $2}' | cut -d' ' -f1`;kill -9 $pid
* ps -eaf | grep $process_name

linux tomcat port open

* logged in as root user
* iptables -L -n -t nat
* iptables -I INPUT -p tcp -m tcp --dport 9020 -j ACCEPT
* service iptables save

Saturday, May 20, 2017

Kill tomcat service running on any port, Windows

1) Go to (Open) Command Prompt (Press Window + R then type cmd Run this).
2) Run following commands
For all listening ports

netstat -aon | find /i "listening"

Apply port filter

netstat -aon |find /i "listening" |find "8080"

Finally with the PID we can run the following command to kill the process

Copy PID from result set

taskkill /F /PID

Ex: taskkill /F /PID 189

Done !!!

ref: http://stackoverflow.com/questions/42084188/kill-tomcat-service-running-on-any-port-windows

Thursday, April 6, 2017

Let me share the simple way to enable the remote debugging mode in tomcat with eclipse (Windows)

Step 1: open bin/startup.bat file
Step 2: add the below lines for debugging with JDPA option (it should starting line of the file )

  • set JPDA_ADDRESS=9090
  • set JPDA_TRANSPORT=dt_socket

Step 3: in the same file .. go to end of the file modify this line -

    call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
    instead of line
    call "%EXECUTABLE%" start %CMD_LINE_ARGS%

step 4: then just run bin>startup.bat (so now your tomcat server run in remote mode with port 9090).

step 5: after that lets connect your source project by eclipse IDE with remote client.

step6: In the Eclipse IDE go to "debug Configuration"

step7:click "remote java application" and on that click "New"

step8. in the "connect" tab set the parameter value

   project= your source project
   connection Type: standard (socket attached)
   host: localhost
   port:9090

step9: click apply and debug.

so finally your eclipse remote client is connected with the running tomcat server (debug mode).

Hope this approach might be help you.

Ref: Link