jenkins安装过程中tomcat界面访问问题

渺渺星辰 发布于 2016/11/15 17:04
阅读 1K+
收藏 0
1.系统环境:
  ubutu12.04    vagrant-ubutu(tomcat安装在虚拟机中)
  java: java version "1.8.0_111"
        Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
        Java HotSpot(TM) Client VM (build 25.111-b14, mixed mode)
        
  tomcat:apache-tomcat-9.0.0.M13


2.修改tomcat配置文件配置:
  <Server port="8005" shutdown="SHUTDOWN">
  <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
  <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


3.启动配置文件:


  1).启动返回信息:
Using CATALINA_BASE:   /usr/local/tomcat-8080
Using CATALINA_HOME:   /usr/local/tomcat-8080
Using CATALINA_TMPDIR: /usr/local/tomcat-8080/temp
Using JRE_HOME:        /usr/local/java/jdk1.8.0_111/jre
Using CLASSPATH:       /usr/local/tomcat-8080/bin/bootstrap.jar:/usr/local/tomcat-8080/bin/tomcat-juli.jar
Tomcat started.


2)日志返回信息:
  15-Nov-2016 03:48:00.769 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/9.0.0.M13
15-Nov-2016 03:48:00.773 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 3 2016 20:59:41 UTC
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         9.0.0.0
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.2.0-23-generic-pae
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          i386
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/java/jdk1.8.0_111/jre
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_111-b14
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat-8080
15-Nov-2016 03:48:00.774 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat-8080
15-Nov-2016 03:48:00.775 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat-8080/conf/logging.properties
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat-8080
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat-8080
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat-8080/temp
15-Nov-2016 03:48:00.779 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
15-Nov-2016 03:48:00.975 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
15-Nov-2016 03:48:00.997 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Nov-2016 03:48:01.001 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
15-Nov-2016 03:48:01.002 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Nov-2016 03:48:01.004 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 865 ms
15-Nov-2016 03:48:01.035 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
15-Nov-2016 03:48:01.035 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M13
15-Nov-2016 03:48:01.051 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat-8080/webapps/ROOT
15-Nov-2016 03:48:01.531 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat-8080/webapps/ROOT has finished in 480 ms
15-Nov-2016 03:48:01.532 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat-8080/webapps/docs
15-Nov-2016 03:48:01.565 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat-8080/webapps/docs has finished in 33 ms
15-Nov-2016 03:48:01.566 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat-8080/webapps/examples
15-Nov-2016 03:48:01.922 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat-8080/webapps/examples has finished in 356 ms
15-Nov-2016 03:48:01.923 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat-8080/webapps/host-manager
15-Nov-2016 03:48:01.959 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat-8080/webapps/host-manager has finished in 37 ms
15-Nov-2016 03:48:01.963 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat-8080/webapps/manager
15-Nov-2016 03:48:02.047 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/tomcat-8080/webapps/manager has finished in 83 ms
15-Nov-2016 03:48:02.052 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
15-Nov-2016 03:48:02.063 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
15-Nov-2016 03:48:02.065 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1061 ms


4.使用浏览器在访问界面时候发现无法访问界面。 192.168.9.204:8080


5.查看tomcat进程发现:
ps -ef |grep 8080
root      2673     1  0 03:47 pts/0    00:00:10 /usr/local/java/jdk1.8.0_111/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat-8080/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /usr/local/tomcat-8080/bin/bootstrap.jar:/usr/local/tomcat-8080/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat-8080 -Dcatalina.home=/usr/local/tomcat-8080 -Djava.io.tmpdir=/usr/local/tomcat-8080/temp org.apache.catalina.startup.Bootstrap start
root      2795  1312  0 05:42 pts/0    00:00:00 grep --color=auto 8080


端口状态:
netstat -anltpu | grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN      2673/java


但是有一段时间出现可以连接,于是我就安装了jenkins。将其war文件放到webapps中,重新启动tomcat。但是日志中出现下面的内容:

Nov-2016 09:11:23.712 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
15-Nov-2016 09:11:23.767 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
15-Nov-2016 09:11:23.818 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
15-Nov-2016 09:11:23.857 INFO [localhost-startStop-2] jenkins.model.Jenkins.cleanUp Stopping Jenkins
15-Nov-2016 09:11:23.897 INFO [localhost-startStop-2] jenkins.model.Jenkins$21.onAttained Started termination
15-Nov-2016 09:11:23.917 INFO [localhost-startStop-2] jenkins.model.Jenkins$21.onAttained Completed termination
15-Nov-2016 09:11:23.917 INFO [localhost-startStop-2] jenkins.model.Jenkins._cleanUpDisconnectComputers Starting node disconnection
15-Nov-2016 09:11:23.930 INFO [localhost-startStop-2] jenkins.model.Jenkins._cleanUpShutdownPluginManager Stopping plugin manager
15-Nov-2016 09:11:23.931 INFO [localhost-startStop-2] jenkins.model.Jenkins._cleanUpPersistQueue Persisting build queue
15-Nov-2016 09:11:23.937 INFO [localhost-startStop-2] jenkins.model.Jenkins._cleanUpAwaitDisconnects Waiting for node disconnection completion
15-Nov-2016 09:11:23.938 INFO [localhost-startStop-2] jenkins.model.Jenkins.cleanUp Jenkins stopped
15-Nov-2016 09:11:23.947 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [jenkins] appears to have started a thread named [Computer.threadPoolForRemoting [#3]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
 java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
 java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 java.lang.Thread.run(Thread.java:745)
15-Nov-2016 09:11:23.948 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [jenkins] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@18a6e59]) and a value of type [org.acegisecurity.context.SecurityContextImpl] (value [org.acegisecurity.context.SecurityContextImpl@ffffffff: Null authentication]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
15-Nov-2016 09:11:23.992 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
15-Nov-2016 09:11:23.993 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
15-Nov-2016 09:11:23.994 INFO [Thread-6] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
15-Nov-2016 09:11:23.995 INFO [Thread-6] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]


eg:出现了一个现象,我重启过几次,能出现一次可以出现访问页面。但是当我再次重启之后有不能能够访问了,tomcat是不是很不稳定呀。

 **现在界面又不能访问了,我都要崩溃了。**(不管是jenkins界面还是tomcat的欢迎界面,还是我在webapps中自行定义的html界面都不能访问)


 求大神解释一下这种现象



加载中
返回顶部
顶部