Index of / Hasan Ünlü KILINÇ

Fantastic World and Software Fetishist

Science & Art & Philosophy

Contact Me

Name Date
Apache Tomcat Port’u Değiştirme

Apache Tomcat Port’u Değiştirme

apacheTomcatMerhaba arkadaşlar Stack Over Flow da gezinirken Mkyong‘un sitesinde gördüm gayette güzel anlatmış benim işime yaradı bende sizin için anlatayım dedim. Çeşitli sebeblerden dolayı Tomcat portunu değiştirme ihtiyacı duyabilirsiniz.  Veya aşağıdaki gibi bir hata ile karşılaşıyorsanız portunuz kullanılıyorsa değiştirme ihtiyacı duyabilirsiniz.

“Several ports (8080, 8009) required by Tomcat v7.0 Server at localhost are already in use by some other application. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

How to rectify this error.”

 

1) Tomcat  kurulum dosyasının içinde  server.xml dosyasını buluyoruz  dosyanın içinde /conf/ de olabilir

2) Aşağıdaki metine benzer  ver açıklama arıyorsunuz

 <!-- Define a non-SSL HTTP/1.1 Connector on port 8180 -->
    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

veya

  <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

3) Tomcat server xml dosyası 8080 portun üzerinde çalışıyor olabilir. Connector port=”8080″ ifadesini değiştiriyoruz.

Örnek:

 <Connector port="8181" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" /></pre>

Artık serverimizin durumu 8181 portunun üzerinde çalışıyor.

4) server.xml dosyasını kaydedip çıkıyoruz. Tomcat serverini Restart ediyoruz.

About Post Author


Tags: , , , , , ,


Leave a Reply