Erro de uso de porta do Tomcat ao executar um projeto java no Netbeans

1. Erro de uso de porta do Tomcat ao executar um projeto java no Netbeans

Miqueias Azevedo
myqueyas

(usa Ubuntu)

Enviado em 15/11/2018 - 23:31h

Olá, pessoal

Estou começando a estudar java e sou novo com as ferramentas descritas aqui.

Estou tentando executar um projeto java através da IDE Netbeans com o Tomcat, mas ao executar o projeto o processo sempre é interrompido dizendo que a porta configurada para o servido Tomcat está sendo utilizada, independente da porta que eu configure.

Já pesquisei bastante sobre o assunto, verifiquei os serviços que usam as portas que eu configurei, matei os processos deste serviços, mas o erro permanece. Já reinstalei todo o ambiente e até formatei meu computador..rs..não por isso, mas vale a pena dizer.

Falha na iniciação do Tomcat, a porta do servidor 9999 está em uso.
/var/www/html/AplicacaoBibliotecaWeb/trunk/BibliotecaWeb/nbproject/build-impl.xml:1045: Erro de Implantação:Falha na iniciação do Tomcat, a porta do servidor 9999 está em uso.
Verifique o log do servidor para obter mais detalhes.
FALHA NA CONSTRUÇÃO (tempo total: 3 segundos)

Seguem abaixo o conteúdo de alguns arquivos envolvido no processo.

SERVER.XML ------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8020" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->


<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector connectionTimeout="20000" port="9999" protocol="HTTP/1.1" redirectPort="8445"/>
<!--8443-->
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
-->
<Connector port="8010" protocol="AJP/1.3" redirectPort="8444" />


<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine defaultHost="localhost" name="Catalina">

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->

<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log" suffix=".txt"/>

</Host>
</Engine>
</Service>
</Server>

FIM SERVER.XML------------------------- -----------------------------------

CATALINA.OUT ----------------------------------------------------------------------TAIL

ProtocolHandler ["http-nio-8889"]
15-Nov-2018 23:13:55.167 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:13:55.171 INFORMAÇÕES [main] org.apache.catalina.startup.Catalina.start Server startup in 1027 ms
15-Nov-2018 23:15:41.199 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8889"]
15-Nov-2018 23:15:41.204 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:15:41.255 INFORMAÇÕES [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
15-Nov-2018 23:15:41.274 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8889"]
15-Nov-2018 23:15:41.275 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:15:41.278 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8889"]
15-Nov-2018 23:15:41.279 INFORMAÇÕES [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:15:41.536 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.539 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.539 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.539 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.540 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.541 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.541 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.541 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.541 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.542 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/var/lib/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.542 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:41.542 ADVERTÊNCIA [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
15-Nov-2018 23:15:42.032 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.30 (Ubuntu)
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 13 2018 20:23:56 UTC
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.30.0
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.15.0-39-generic
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-oracle/jre
15-Nov-2018 23:15:42.033 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_191-b12
15-Nov-2018 23:15:42.034 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
15-Nov-2018 23:15:42.034 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /var/lib/tomcat8
15-Nov-2018 23:15:42.034 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/tomcat8
15-Nov-2018 23:15:42.034 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
15-Nov-2018 23:15:42.034 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseConcMarkSweepGC
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
15-Nov-2018 23:15:42.035 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
15-Nov-2018 23:15:42.036 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/var/lib/tomcat8
15-Nov-2018 23:15:42.036 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat8
15-Nov-2018 23:15:42.036 INFORMAÇÕES [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
15-Nov-2018 23:15:42.036 INFORMAÇÕES [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/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
15-Nov-2018 23:15:42.190 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9999"]
15-Nov-2018 23:15:42.201 INFORMAÇÕES [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Nov-2018 23:15:42.207 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:15:42.209 INFORMAÇÕES [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Nov-2018 23:15:42.209 INFORMAÇÕES [main] org.apache.catalina.startup.Catalina.load Initialization processed in 638 ms
15-Nov-2018 23:15:42.234 INFORMAÇÕES [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
15-Nov-2018 23:15:42.234 INFORMAÇÕES [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.30 (Ubuntu)
15-Nov-2018 23:15:42.242 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
15-Nov-2018 23:15:43.209 INFORMAÇÕES [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15-Nov-2018 23:15:43.246 INFORMAÇÕES [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/ROOT] has finished in [1,003] ms
15-Nov-2018 23:15:43.249 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-9999"]
15-Nov-2018 23:15:43.264 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8010"]
15-Nov-2018 23:15:43.279 INFORMAÇÕES [main] org.apache.catalina.startup.Catalina.start Server startup in 1069 ms

FIM CATALINA.OUT --------------------------------------------------------------------------------------------


Desde já, muito obrigado a todos.



  






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts