Under system account, Tomcat starts even with shutdown port conflict

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Under system account, Tomcat starts even with shutdown port conflict

Tou Vue
Hello,

I have a question regarding how Tomcat starts up under the system account
and local user account in Windows. I had a Tomcat service that would start
fine under the system account, but once I configured it to start under the
local user account, I received a JVM_Bind exception. I looks like the
Tomcat was not able to access the shutdown port configured.

I figured it was a port conflict, another service was using the same port.
So, I changed the port so there was no conflict, and Tomcat started up okay
again. But I'm still wondering why Tomcat was able to start up with the
system account even with the same port conflict.

Any suggestions would be appreciated.

Thank You,
Tou Vue
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Under system account, Tomcat starts even with shutdown port conflict

Coty Sutherland
On Thu, Jun 8, 2017 at 11:21 AM, Tou Vue <[hidden email]> wrote:

> Hello,
>
> I have a question regarding how Tomcat starts up under the system account
> and local user account in Windows. I had a Tomcat service that would start
> fine under the system account, but once I configured it to start under the
> local user account, I received a JVM_Bind exception. I looks like the
> Tomcat was not able to access the shutdown port configured.
>
> I figured it was a port conflict, another service was using the same port.
> So, I changed the port so there was no conflict, and Tomcat started up okay
> again. But I'm still wondering why Tomcat was able to start up with the
> system account even with the same port conflict.

Are you sure it was a port conflict and that the port wasn't somehow
protected by the OS?

> Any suggestions would be appreciated.
>
> Thank You,
> Tou Vue

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Under system account, Tomcat starts even with shutdown port conflict

Tou Vue
Tomcat was able to access the same port if I turned off the other service.
So I don't think it's protected.

Thank You,
Tou Vue

On Thu, Jun 8, 2017 at 10:26 AM, Coty Sutherland <[hidden email]>
wrote:

> On Thu, Jun 8, 2017 at 11:21 AM, Tou Vue <[hidden email]> wrote:
> > Hello,
> >
> > I have a question regarding how Tomcat starts up under the system account
> > and local user account in Windows. I had a Tomcat service that would
> start
> > fine under the system account, but once I configured it to start under
> the
> > local user account, I received a JVM_Bind exception. I looks like the
> > Tomcat was not able to access the shutdown port configured.
> >
> > I figured it was a port conflict, another service was using the same
> port.
> > So, I changed the port so there was no conflict, and Tomcat started up
> okay
> > again. But I'm still wondering why Tomcat was able to start up with the
> > system account even with the same port conflict.
>
> Are you sure it was a port conflict and that the port wasn't somehow
> protected by the OS?
>
> > Any suggestions would be appreciated.
> >
> > Thank You,
> > Tou Vue
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Under system account, Tomcat starts even with shutdown port conflict

Igor Cicimov
In reply to this post by Tou Vue
If you are trying to run it on port <1024 you need authbind enabled

On 9 Jun 2017 1:21 am, "Tou Vue" <[hidden email]> wrote:

> Hello,
>
> I have a question regarding how Tomcat starts up under the system account
> and local user account in Windows. I had a Tomcat service that would start
> fine under the system account, but once I configured it to start under the
> local user account, I received a JVM_Bind exception. I looks like the
> Tomcat was not able to access the shutdown port configured.
>
> I figured it was a port conflict, another service was using the same port.
> So, I changed the port so there was no conflict, and Tomcat started up okay
> again. But I'm still wondering why Tomcat was able to start up with the
> system account even with the same port conflict.
>
> Any suggestions would be appreciated.
>
> Thank You,
> Tou Vue
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Under system account, Tomcat starts even with shutdown port conflict

Caldarale, Charles R
> From: Igor Cicimov [mailto:[hidden email]]
> Subject: Re: Under system account, Tomcat starts even with shutdown port conflict

> If you are trying to run it on port <1024 you need authbind enabled

Read the original message.  The OP is running on Windows, not Linux, so there are no restrictions on port usage.  Some other process is using the port.

Since there are multiple ways to stop Tomcat (especially when running as a Windows service), non-availability of the shutdown port is not considered fatal.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Under system account, Tomcat starts even with shutdown port conflict

Tou Vue
Found out this is working as designed.

You can follow the link to where I answered my own question...
https://stackoverflow.com/questions/44400047/starting-
tomcat-with-local-user-causes-jvm-bind-exception/44442109#44442109

According to https://msdn.microsoft.com/en-us/library/windows/desktop/
ms740621(v=vs.85).aspx

If both application are in the same user context then both can bind to the
same port if one of the application is using the invalid address. (0.0.0.0)

If both application are in different user context then we get the exception.
Thank You,

*Tou Vue*
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Under system account, Tomcat starts even with shutdown port conflict

Dave Fisher-5
You should still be consistent about how you start Tomcat in Windows. Look into reboot situations. Look into file permissions if your app writes any files. These are other places where you can get inconsistent results.

I've always used Ubuntu or Solaris in production to narrow these issues. Always worked with the project distros since Tomcat e.

Regards,
Dave

Sent from my iPhone

> On Jun 9, 2017, at 1:55 PM, Tou Vue <[hidden email]> wrote:
>
> Found out this is working as designed.
>
> You can follow the link to where I answered my own question...
> https://stackoverflow.com/questions/44400047/starting-
> tomcat-with-local-user-causes-jvm-bind-exception/44442109#44442109
>
> According to https://msdn.microsoft.com/en-us/library/windows/desktop/
> ms740621(v=vs.85).aspx
>
> If both application are in the same user context then both can bind to the
> same port if one of the application is using the invalid address. (0.0.0.0)
>
> If both application are in different user context then we get the exception.
> Thank You,
>
> *Tou Vue*


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...