So to explain everything...
I had a perfectly working instance of tomcat7 working with an application in one of my directories. There were no problems.
I then switched it to wifi rather than the ethernet, and it stopped working. So I fixed my networking issue (set a static wifi ip), and tried but it still wouldn't work. Switched it back to ethernet and it didn't go back. So I went and sudo rm -r my-apache-folder and tried to reinstall. Nothing. Decided to then use apt-get to install tomcat7 and still nothing. Before it was due to JRE_HOME and JAVA_HOME not being set, and that might still be a problem but tomcat says it's running when it definitely isn't.
I don't want to flood you with server.xml or something like that until I'm asked to, so please help me and I'll respond efficiently, been working on this small problem for a week or 2 now, been using every aid on the internet to no avail.
port 8080 isn't running tomcat:
pi@raspberrypi:/$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 15286/apache2
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2334/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2293/sshd
Tomcat7 is "running":
pi@raspberrypi:/$ sudo service tomcat7 restart
[ ok ] Stopping Tomcat servlet engine: tomcat7.
[ ok ] Starting Tomcat servlet engine: tomcat7.
My java directories set in /etc/environment:
pi@raspberrypi:/etc/tomcat7$ $JRE_HOME
-bash: /usr/lib/jvm/java-6-openjdk-armhf/: Is a directory
pi@raspberrypi:/etc/tomcat7$ $JAVA_HOME
-bash: /usr/lib/jvm/java-6-openjdk-armhf/jre/: Is a directory
when i ran ps -ef|grep catalina:
pi@raspberrypi:/etc/tomcat7$ ps -ef|grep catalina
pi 28778 2542 0 22:36 pts/0 00:00:00 grep catalina
last 26 lines of 'catalina.out':
04-Mar-2015 21:58:47 org.apache.catalina.startup.Catalina start
INFO: Server startup in 57199 ms
04-Mar-2015 21:58:47 org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.<init>(ServerSocket.java:202)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
at org.apache.catalina.startup.Catalina.await(Catalina.java:757)
at org.apache.catalina.startup.Catalina.start(Catalina.java:703)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
04-Mar-2015 21:58:47 org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8081"]
04-Mar-2015 21:58:49 org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
04-Mar-2015 21:58:50 org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8081"]
04-Mar-2015 21:58:52 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8081"]
/etc/hosts:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
Aucun commentaire:
Enregistrer un commentaire