Apache Tomcat: starting, stopping and killing processes

STOPPING:
 /opt/apache/apache-tomcat-6.0.26/webapps $ ../bin/shutdown.sh
Using CATALINA_BASE:   /opt/apache/apache-tomcat-6.0.26
Using CATALINA_HOME:   /opt/apache/apache-tomcat-6.0.26
Using CATALINA_TMPDIR: /opt/apache/apache-tomcat-6.0.26/temp
Using JRE_HOME:        /Library/Java/Home/
Using CLASSPATH:       /opt/apache/apache-tomcat-6.0.26/bin/bootstrap.jar
Mar 31, 2010 11:13:58 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.(Socket.java:372)
at java.net.Socket.(Socket.java:186)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)

CHECKING IF STILL RUNNING:
 /opt/apache/apache-tomcat-6.0.26/webapps $ ps aux | grep tomcat
uki       3086  57.9  6.8  1506508 143136 s000  U    11:12AM   0:22.70 /Library/Java/Home//bin/java -Djava.util.logging.config.file=/opt/apache/apache-tomcat-6.0.26/conf/logging.properties -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache/apache-tomcat-6.0.26/endorsed -classpath /opt/apache/apache-tomcat-6.0.26/bin/bootstrap.jar -Dcatalina.base=/opt/apache/apache-tomcat-6.0.26 -Dcatalina.home=/opt/apache/apache-tomcat-6.0.26 -Djava.io.tmpdir=/opt/apache/apache-tomcat-6.0.26/temp org.apache.catalina.startup.Bootstrap start
uki       3120   0.2  0.0   590540    204 s000  U+   11:14AM   0:00.00 grep tomcat

KILL A PROCESS:
 /opt/apache/apache-tomcat-6.0.26/webapps $ kill 3086

CHECKING IF STILL RUNNING:
 /opt/apache/apache-tomcat-6.0.26/webapps $ ps aux | grep tomcat
uki       3122   0.9  0.0   600020    472 s000  R+   11:14AM   0:00.00 grep tomcat


STARTING:
ill-lt20220@(Wed Mar 31 11:14:27) /opt/apache/apache-tomcat-6.0.26/webapps $ ../bin/startup.sh 
Using CATALINA_BASE:   /opt/apache/apache-tomcat-6.0.26
Using CATALINA_HOME:   /opt/apache/apache-tomcat-6.0.26
Using CATALINA_TMPDIR: /opt/apache/apache-tomcat-6.0.26/temp
Using JRE_HOME:        /Library/Java/Home/
Using CLASSPATH:       /opt/apache/apache-tomcat-6.0.26/bin/bootstrap.jar
ill-lt20220@(Wed Mar 31 11:14:33) /opt/apache/apache-tomcat-6.0.26/webapps $ ps aux | grep tomcat
uki       3132  49.5  3.6  1504832  74680 s000  U    11:14AM   0:06.14 /Library/Java/Home//bin/java -Djava.util.logging.config.file=/opt/apache/apache-tomcat-6.0.26/conf/logging.properties -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache/apache-tomcat-6.0.26/endorsed -classpath /opt/apache/apache-tomcat-6.0.26/bin/bootstrap.jar -Dcatalina.base=/opt/apache/apache-tomcat-6.0.26 -Dcatalina.home=/opt/apache/apache-tomcat-6.0.26 -Djava.io.tmpdir=/opt/apache/apache-tomcat-6.0.26/temp org.apache.catalina.startup.Bootstrap start
uki       3134   0.0  0.0   590736    308 s000  R+   11:14AM   0:00.00 grep tomcat
ill-lt20220@(Wed Mar 31 11:14:41) /opt/apache/apache-tomcat-6.0.26/webapps $


CHECKING THE LOG:

/opt/apache/apache-tomcat-6.0.26/webapps $ tail -f ../logs/catalina.out
Mar 31, 2010 11:15:12 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory work
Mar 31, 2010 11:15:12 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 31, 2010 11:15:12 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 31, 2010 11:15:12 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/88  config=null
Mar 31, 2010 11:15:12 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 36930 ms





As an Amazon Associate I earn from qualifying purchases.

Mac: location of hosts file

The hosts file on Mac is located at: /private/etc/hosts
The easiest way to modify it is using pico, you need to have WRITE permissions to do so.

 ~ $ cd /private/etc/
 /private/etc $ pico hosts



As an Amazon Associate I earn from qualifying purchases.

Eclipse: show line numbers

This is simple stuff, but it is frustrating when you want to show line numbers and cannot find the setting:

On Mac:

Eclipse -> Preferences -> General -> Editors -> Text Editors -> Show line numbers






As an Amazon Associate I earn from qualifying purchases.

IE8 and Windows7 hacked easily

I don't think anything with Windows is really safe...

http://www.computerworld.com/s/article/9174101/Hacker_busts_IE8_on_Windows_7_in_2_minutes


I wonder if Mac vulnerabilities would be found this easy if we put effort towards it or does everyone just like to pick on Microsoft?


As an Amazon Associate I earn from qualifying purchases.

Evanescence "My Immortal"

>

I'm so tired of being here
Suppressed by all my childish fears
And if you have to leave
I wish that you would just leave
'Cause your presence still lingers here
And it won't leave me alone

These wounds won't seem to heal
This pain is just too real
There's just too much that time cannot erase

When you cried I'd wipe away all of your tears
When you'd scream I'd fight away all of your fears
And I held your hand through all of these years
But you still have
All of me

You used to captivate me
By your resonating light
Now I'm bound by the life you left behind
Your face it haunts
My once pleasant dreams
Your voice it chased away
All the sanity in me

These wounds won't seem to heal
This pain is just too real
There's just too much that time cannot erase

I've tried so hard to tell myself that you're gone
But though you're still with me
I've been alone all along


As an Amazon Associate I earn from qualifying purchases.

Virus test file (it is save to use)

In case you write a code to test your anti-virus software you will need a "test virus file" that does not actually wipe out your computer, you can download it from this site...

http://eicar.org/


As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles