How to disable remote shutdown in Tomcat
Examples:
- change the port number from default to different one (not recommended)
- change the shutdown command (partially recommended)
- change port number to -1 (recommended)
By default Tomcat listens on port 8005 for SHUTDOWN command. When such message is received, all applications within this context are shutdown. By default it is bound to loopback interface, though not accessible from external network. For security reasons I’d strongly advise to disable this functionality if it is not needed, just in case some user might shutdown the service on purpose or by accident.
We can find this definition in the server.xml file
$CATALINA_HOME/conf/server.xml<Server port="8005" shutdown="SHUTDOWN">
You might have ‘address’ variable in this line. This indicates possible usage of multiple NIC (http://en.wikipedia.org/wiki/Network_interface_controller
We can prevent shutting down on specific port by changing these values.
EXAMPLE 1:
Change the settings in the server.xml file from:
<Server port="8005" shutdown="SHUTDOWN">
To:
<Server port="8008" shutdown="SECRETCOMMAND">
From now on, only SECRETCOMMAND command will shutdown the instance. All other commands (including SHUTDOWN) will fail.
Result:
[me@me ~]$ telnet 192.168.1.3 8005
Trying 192.168.1.3...
Connected to 192.168.1.3.
Escape character is '^]'.
SHUTDOWN
Connection closed by foreign host.
|
Response (by default- catalina.out file) :
WARNING: StandardServer.await: Invalid command 'SHUTDOWN' received
|
EXAMPLE 2:
Change the settings in the server.xml file from:
<Server port="8005" shutdown="SHUTDOWN">To
<Server port="8001" shutdown="SHUTDOWN">From now on only SHUTDOWN command issued on port 8001 (if not used by other application) will shutdown the instance. Port 8005 will not be used by this instance.
Result:
[me@me ~]$ telnet 192.168.1.3 8005
Trying 192.168.1.3...
telnet: connect to address 192.168.1.3: Connection refused
|
EXAMPLE 3 (recommended):
Change the settings in the server.xml file from:
<Server port="8005" shutdown="SHUTDOWN">To
<Server port="-1" shutdown="SHUTDOWN">This will disable SHUTDOWN service/ command for good :)
Result:
[me@me ~]$ telnet 192.168.1.3 8005
Trying 192.168.1.3...
telnet: connect to address 192.168.1.3: Connection refused
|
Good tutorial you can look here
ReplyDeleteIt should be noted that when you disable the shutdown port your catalina.bat/sh and shutdown.bat/sh won't work anymore since they are using these ports to shut down the tomcat.
ReplyDeleteSo in this case when we want to update application how to shutdown tomcat safely?
DeleteThis can get me out of my tomcat issues. Thanks.
ReplyDeletemark emails on tomcat
Is your Gemini transaction time expired? Well, you don’t have to worry as if once the Gemini transaction created, it never expires but it may stuck due to high/low fee or due to traffic. Or else, you can reach Gemini support number for help and guidance related to the same. The skilled and talented customer experts are always at 24/7 continuous service. The support team will guide you in steps and also provide alternatives so that such errors don’t occur in future. Call customer care executive and resolve the queries at every point in time.
ReplyDeleteİstanbul
ReplyDeleteSivas
Kırıkkale
Zonguldak
Iğdır
CV5V
Balıkesir
ReplyDeleteBursa
Mersin
Konya
Van
QVU
çankırı evden eve nakliyat
ReplyDeletekırşehir evden eve nakliyat
kütahya evden eve nakliyat
hakkari evden eve nakliyat
antalya evden eve nakliyat
ZDX3G
siirt evden eve nakliyat
ReplyDeleteadıyaman evden eve nakliyat
kastamonu evden eve nakliyat
artvin evden eve nakliyat
malatya evden eve nakliyat
WR6ZSL
3AD07
ReplyDeleteÜnye Koltuk Kaplama
Aksaray Şehirler Arası Nakliyat
Zonguldak Şehir İçi Nakliyat
Siirt Lojistik
Bilecik Şehir İçi Nakliyat
Muğla Parça Eşya Taşıma
Çerkezköy Çekici
Ankara Asansör Tamiri
Mamak Fayans Ustası
D8350
ReplyDeleteMamak Boya Ustası
Karaman Şehir İçi Nakliyat
Silivri Parke Ustası
Iğdır Lojistik
Çerkezköy Çamaşır Makinesi Tamircisi
Ardahan Şehirler Arası Nakliyat
Hakkari Parça Eşya Taşıma
Binance Güvenilir mi
Çerkezköy Halı Yıkama
AE19D
ReplyDeleteÇerkezköy Çilingir
Eryaman Fayans Ustası
Pursaklar Boya Ustası
Çerkezköy Oto Elektrik
Bayburt Evden Eve Nakliyat
Afyon Evden Eve Nakliyat
Isparta Parça Eşya Taşıma
Denizli Parça Eşya Taşıma
Amasya Parça Eşya Taşıma
7B58A
ReplyDeleteSatoshi Coin Hangi Borsada
Ünye Oto Boya
Bibox Güvenilir mi
Iğdır Şehirler Arası Nakliyat
Siirt Şehir İçi Nakliyat
Kastamonu Şehirler Arası Nakliyat
Ünye Kurtarıcı
İstanbul Parça Eşya Taşıma
Kilis Şehir İçi Nakliyat
5E97C
ReplyDeletebinance
91CCA
ReplyDeletediyarbakır canlı sohbet sitesi
kırıkkale görüntülü sohbet
telefonda kadınlarla sohbet
niğde görüntülü sohbet uygulamaları ücretsiz
balıkesir rastgele sohbet
kocaeli ücretsiz sohbet odaları
telefonda görüntülü sohbet
çankırı en iyi görüntülü sohbet uygulaması
yozgat muhabbet sohbet
0FF0D
ReplyDeletenevşehir telefonda kadınlarla sohbet
bartın mobil sohbet bedava
canlı sohbet
sohbet sitesi
canli sohbet
burdur seslı sohbet sıtelerı
bartın görüntülü sohbet odaları
kırklareli yabancı sohbet
sohbet chat
E0D58
ReplyDeletecanli sohbet
giresun sohbet siteleri
mersin sesli sohbet sitesi
hatay sesli sohbet siteler
düzce telefonda görüntülü sohbet
Muğla Görüntülü Sohbet Ücretsiz
Niğde Mobil Sohbet Bedava
niğde mobil sohbet siteleri
sesli sohbet odası
9B736
ReplyDeletekocaeli canli sohbet
Antep Sohbet Siteleri
trabzon sesli sohbet odası
tekirdağ en iyi sesli sohbet uygulamaları
Çanakkale Görüntülü Sohbet Siteleri
muhabbet sohbet
Adana Telefonda Kadınlarla Sohbet
istanbul canlı görüntülü sohbet siteleri
şırnak bedava görüntülü sohbet
24B72
ReplyDeleteedirne canlı görüntülü sohbet
Ardahan Görüntülü Canlı Sohbet
eskişehir bedava sohbet siteleri
görüntülü sohbet ücretsiz
sinop seslı sohbet sıtelerı
Gümüşhane Ücretsiz Sohbet Odaları
malatya en iyi sesli sohbet uygulamaları
çanakkale rastgele sohbet odaları
Siirt Sesli Görüntülü Sohbet
شركة تسليك مجاري بالدمام dr7JvArUpg
ReplyDeleteافضل شركة مكافحة حشرات YERsO5Vsnw
ReplyDelete