Bug 52467

Summary: "Unable to open the service 'Tomcat7'" when Monitor starts
Product: Tomcat 7 Reporter: denixx baykin <denixx.baykin>
Component: IntegrationAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: normal CC: denixx.baykin
Priority: P2    
Version: 7.0.23   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: How it looks on Win7 Russian
Installation options 0
Installation options 1
Installation options 2
Installation options 3
Installation options 4

Description denixx baykin 2012-01-14 10:20:20 UTC
Created attachment 28151 [details]
How it looks on Win7 Russian

On Windows Vista (I do not test Vista) and on Windows 7 here is a bug when "Monitor Tomcat" starts.
It says "Unable to open the service '%TomcatServiceName%'", where %TomcatServiceName% is a name of Tomcat service.
It needs an checker "Start with administrator privileges" enabled in link options.
Or just every time right mouse button click on the link and start as administrator.

I found in Google the answer: http://www.maplesoft.com/support/faqs/detail.aspx?sid=33857
Comment 1 denixx baykin 2012-01-14 10:28:08 UTC
When Monitor starts after install - it starts normally.
But when Win 7 reboots - it's always say this "Unable" at startup and won't start in tray Monitor icon.
Further Monitor starts manually only.

Sorry me for my English :)
Comment 2 Konstantin Kolinko 2012-01-14 11:30:26 UTC
(In reply to comment #0)
> Created attachment 28151 [details]
> How it looks on Win7 Russian
> 
> On Windows Vista (I do not test Vista) and on Windows 7 here is a bug when
> "Monitor Tomcat" starts.
> It says "Unable to open the service '%TomcatServiceName%'", where
> %TomcatServiceName% is a name of Tomcat service.

Why aren't you citing the entire message? Not every one here can read Russian.

The error message in the attached image says:

[[[
"Application System Error"

Access denied.  (written in Russian, so it comes from OS)
Unable to open the service 'Tomcat7_PingPong'

[OK]
]]]


> It needs an checker "Start with administrator privileges" enabled in link
> options.
> Or just every time right mouse button click on the link and start as
> administrator.
> 
> I found in Google the answer:
> http://www.maplesoft.com/support/faqs/detail.aspx?sid=33857

What options did you use in Tomcat Installer to install the service? (What are the steps to reproduce the issue?)

Note, that there are several known issues with installing Tomcat service into C:\Program Files, as documented in
https://wiki.apache.org/tomcat/FAQ/Windows
Comment 3 denixx baykin 2012-01-14 13:29:25 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > Created attachment 28151 [details]
> > How it looks on Win7 Russian
> > 
> > On Windows Vista (I do not test Vista) and on Windows 7 here is a bug when
> > "Monitor Tomcat" starts.
> > It says "Unable to open the service '%TomcatServiceName%'", where
> > %TomcatServiceName% is a name of Tomcat service.
> 
> Why aren't you citing the entire message? Not every one here can read Russian.
> 
> The error message in the attached image says:
> 
> [[[
> "Application System Error"
> 
> Access denied.  (written in Russian, so it comes from OS)
> Unable to open the service 'Tomcat7_PingPong'
> 
> [OK]
> ]]]
> 
> 

Sorry. I will remember that when I will post something else.

> > It needs an checker "Start with administrator privileges" enabled in link
> > options.
> > Or just every time right mouse button click on the link and start as
> > administrator.
> > 
> > I found in Google the answer:
> > http://www.maplesoft.com/support/faqs/detail.aspx?sid=33857
> 
> What options did you use in Tomcat Installer to install the service? (What are
> the steps to reproduce the issue?)

I will attach screenshots with installation options.

> Note, that there are several known issues with installing Tomcat service into
> C:\Program Files, as documented in
> https://wiki.apache.org/tomcat/FAQ/Windows

I tried to install Tomcat into C:\Tomcat\Tomcat 7.0_Tomcat7_PingPong, this bug stay.
Comment 4 denixx baykin 2012-01-14 13:30:33 UTC
Created attachment 28152 [details]
Installation options 0
Comment 5 denixx baykin 2012-01-14 13:31:05 UTC
Created attachment 28153 [details]
Installation options 1
Comment 6 denixx baykin 2012-01-14 13:31:41 UTC
Created attachment 28154 [details]
Installation options 2
Comment 7 denixx baykin 2012-01-14 13:32:14 UTC
Created attachment 28155 [details]
Installation options 3
Comment 8 denixx baykin 2012-01-14 13:32:43 UTC
Created attachment 28156 [details]
Installation options 4
Comment 9 denixx baykin 2012-01-14 13:44:50 UTC
On Installation options 3 image shown path starts with C:\Program Files\...

I think it starts without error after installation because installer has Administrator privileges. It owns privileges at initialization.

But when OS restarts, link to Monitor have not option "Start with administrator privileges" and if you start Monitor, it can not open started service because service started with system privileges (Local System Account).

> What are the steps to reproduce the issue?

Install the Tomcat on Windows 7 in administrative user account with provided options in images, then reboot the OS and window will be shown.
Comment 10 denixx baykin 2012-01-14 13:50:09 UTC
And, finally, if link to Monitor have "Run this program as an administrator" checkbox enabled, Monitor do not starts. :(
Comment 11 denixx baykin 2012-01-14 13:51:03 UTC
I mean Monitor do not starts automatically. It starts manually only.
Comment 12 Mark Thomas 2012-01-14 20:29:14 UTC
That is UAC being "helpful". There doesn't appear to be an easy way around this. A number of potential workarounds can be found via Google such as this one:
http://www.techrepublic.com/blog/window-on-windows/make-vista-launch-uac-restricted-programs-at-startup-with-task-scheduler/616

Unfortunately, the Windows installer isn't going to be able to automate all of that.

I now have a Windows 7 VM set up so if a solution that is implementable in the installer is identified, I should be able to test it easily. Until then, I simply don't see a way we can fix this.
Comment 13 denixx baykin 2012-01-15 11:38:09 UTC
Thanks for workaround. It works.