RE: Can't stop tomcat - connection refused

2022-02-16 Thread Neil Aggarwal
Glad you figured it out!

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't stop tomcat - connection refused

2022-02-16 Thread Konstantin Kolinko
ср, 16 февр. 2022 г. в 13:51, Blake McBride :
>
> Problem solved!
>
> I am quite embarrassed because I've had this problem before, solved it
> (with the help of this list), and documented it.  Here are my notes:
>
> tomcat slow startup
>
> The secure random calls may be blocking as there is not enough entropy to
> feed them in /dev/random.
>
> Change /etc/java-8-openjdk/security/java.security
>
> From:  securerandom.source=file:/dev/random
>
> To:  securerandom.source=file:/dev/urandom
>

https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp
see Entropy Source

Adding
-Djava.security.egd=file:/dev/./urandom
to the JAVA_OPTS environment variable in a
$CATALINA_BASE/bin/setenv.sh file is the usual way to solve this
issue.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't stop tomcat - connection refused

2022-02-16 Thread Blake McBride
Problem solved!

I am quite embarrassed because I've had this problem before, solved it
(with the help of this list), and documented it.  Here are my notes:

tomcat slow startup

The secure random calls may be blocking as there is not enough entropy to
feed them in /dev/random.

Change /etc/java-8-openjdk/security/java.security

From:  securerandom.source=file:/dev/random

To:  securerandom.source=file:/dev/urandom

Thanks!

Blake


On Tue, Feb 15, 2022 at 7:18 PM Blake McBride  wrote:

> I have been using this config on a few VPS vendors for more than 10 years
> without anything like this.  I tried the exact same setup on AWS today and
> it worked right away.  I feel pretty sure that the VPS vendor I am trying
> has some sort of problem.  I am working with them to solve it.
>
> Thanks!
>
> Blake
>
>
> On Tue, Feb 15, 2022 at 5:21 PM Neil Aggarwal 
> wrote:
>
>> Looks like tomcat is dying or getting killed.
>> That is strange.  I am running tomcat on a VPS with no problems.
>>
>> Thank you,
>>   Neil
>>
>> --
>> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
>> We offer 30 year loans on single family houses!
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Can't stop tomcat - connection refused

2022-02-15 Thread Blake McBride
I have been using this config on a few VPS vendors for more than 10 years
without anything like this.  I tried the exact same setup on AWS today and
it worked right away.  I feel pretty sure that the VPS vendor I am trying
has some sort of problem.  I am working with them to solve it.

Thanks!

Blake


On Tue, Feb 15, 2022 at 5:21 PM Neil Aggarwal 
wrote:

> Looks like tomcat is dying or getting killed.
> That is strange.  I am running tomcat on a VPS with no problems.
>
> Thank you,
>   Neil
>
> --
> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
> We offer 30 year loans on single family houses!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Can't stop tomcat - connection refused

2022-02-15 Thread Christopher Schultz

Blake,

On 2/15/22 16:58, Blake McBride wrote:

# netstat -plunet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
 User   Inode  PID/Program name
tcp0  0 127.0.0.53:53   0.0.0.0:*   LISTEN
  10119387  632/systemd-resolve
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
  0  22776  798/sshd: /usr/sbin
tcp0  0 127.0.0.1:5432  0.0.0.0:*   LISTEN
  11223212  847/postgres
tcp6   0  0 :::22   :::*LISTEN
  0  22787  798/sshd: /usr/sbin
tcp6   0  0 ::1:5432:::*LISTEN
  11223211  847/postgres
udp0  0 127.0.0.53:53   0.0.0.0:*
 10119386  632/systemd-resolve

On Tue, Feb 15, 2022 at 3:49 PM Blake McBride  wrote:


Thanks, Neil,

I started up tomcat and ran:  curl http://localhost:8080

It returned the page.  Great.

I then ran: ./shutdown.sh

It stopped just fine.  I checked with ps.

I then did ./startup.sh again.

This time the curl command just hung and ./shutdown.sh gave me "Connection
refused" error.

catalina.out shows no errors.


Linux oom killler?

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Can't stop tomcat - connection refused

2022-02-15 Thread Neil Aggarwal
Looks like tomcat is dying or getting killed.
That is strange.  I am running tomcat on a VPS with no problems.

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't stop tomcat - connection refused

2022-02-15 Thread Blake McBride
# netstat -plunet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
User   Inode  PID/Program name
tcp0  0 127.0.0.53:53   0.0.0.0:*   LISTEN
 10119387  632/systemd-resolve
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
 0  22776  798/sshd: /usr/sbin
tcp0  0 127.0.0.1:5432  0.0.0.0:*   LISTEN
 11223212  847/postgres
tcp6   0  0 :::22   :::*LISTEN
 0  22787  798/sshd: /usr/sbin
tcp6   0  0 ::1:5432:::*LISTEN
 11223211  847/postgres
udp0  0 127.0.0.53:53   0.0.0.0:*
10119386  632/systemd-resolve

On Tue, Feb 15, 2022 at 3:49 PM Blake McBride  wrote:

> Thanks, Neil,
>
> I started up tomcat and ran:  curl http://localhost:8080
>
> It returned the page.  Great.
>
> I then ran: ./shutdown.sh
>
> It stopped just fine.  I checked with ps.
>
> I then did ./startup.sh again.
>
> This time the curl command just hung and ./shutdown.sh gave me "Connection
> refused" error.
>
> catalina.out shows no errors.
>
> Thanks!
>
> Blake
>
>
> On Tue, Feb 15, 2022 at 3:42 PM Neil Aggarwal 
> wrote:
>
>> Use something like lynx or curl from the command line to
>> try to connect to the Tomcat instance.
>>
>> Thank you,
>>   Neil
>>
>> --
>> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
>> We offer 30 year loans on single family houses!
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Can't stop tomcat - connection refused

2022-02-15 Thread Blake McBride
Thanks, Neil,

I started up tomcat and ran:  curl http://localhost:8080

It returned the page.  Great.

I then ran: ./shutdown.sh

It stopped just fine.  I checked with ps.

I then did ./startup.sh again.

This time the curl command just hung and ./shutdown.sh gave me "Connection
refused" error.

catalina.out shows no errors.

Thanks!

Blake


On Tue, Feb 15, 2022 at 3:42 PM Neil Aggarwal 
wrote:

> Use something like lynx or curl from the command line to
> try to connect to the Tomcat instance.
>
> Thank you,
>   Neil
>
> --
> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
> We offer 30 year loans on single family houses!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Can't stop tomcat - connection refused

2022-02-15 Thread Neil Aggarwal
Use something like lynx or curl from the command line to
try to connect to the Tomcat instance.

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't stop tomcat - connection refused

2022-02-15 Thread Blake McBride
Thanks, Neil,

Catalina.out shows a normal startup with no errors.

It's the default config.  I am not adding, changing, or deleting any files
from the normal tomcat distro.

Also, I am doing everything as root.

I didn't try connecting locally mainly because I'm on a server.  No GUI.
The fact that I get "Connection refused" locally when I try to shutdown is
about the only indication I have that something is wrong.

Thanks!

Blake


On Tue, Feb 15, 2022 at 3:12 PM Neil Aggarwal 
wrote:

> Maybe better to back up one more step:
>
> Are you sure Tomcat started up correctly?
>
> Thank you,
>   Neil
>
> --
> Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
> We offer 30 year loans on single family houses!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Can't stop tomcat - connection refused

2022-02-15 Thread Neil Aggarwal
Maybe better to back up one more step:

Are you sure Tomcat started up correctly?

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Can't stop tomcat - connection refused

2022-02-15 Thread Neil Aggarwal
> I cannot connect to tomcat (port 8080) externally

Can you connect to it from the local machine?
If that is the case, it may be only listening for local connections.

Thank you,
  Neil

--
Neil Aggarwal, (972) 834-1565, http://www.propfinancing.com
We offer 30 year loans on single family houses!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Can't stop tomcat - connection refused

2022-02-15 Thread Blake McBride
Greetings,

I have been running tomcat for more than ten years.  Today, I tried to
change VPS providers.  I created a Ubuntu server, added Java 8, and
installed tomcat 9.0.58.  I made no configuration or other changes.  I
simply unzipped tomcat and started it up.

I have no firewall running and I can ssh into the machine.

I cannot connect to tomcat (port 8080) externally.  And, when I attempt to
shutdown tomcat via ./shutdown.sh I get "Connection refused".

I tried the exact same sequence on my old VPS provider.  It worked first
time.

The new provider is one of the top-tier providers.  I shouldn't be having
such a problem.  I have put in a ticket with the provider but I thought
someone on this list might say "did you try X?"

I appreciate any suggestions.

Thanks!

Blake McBride