I am using apache-tomcat-8.5.15
and starting(startup.sh
) & stopping(shutdown.sh
) it using the shell scripts contained in its bin/
directory. In my custom shell script file, when I write:
./shutdown.sh
./startup.sh
and run, it seems to work fine. But when I run with
./shutdown.sh && ./startup.sh
it shows
java.net.BindException: Address already in use (Bind failed)
saying that the address is already bound.
Why is this happening? How can I resolve this error?
Or, is there a simple command that can restart tomcat?