You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2016/05/16 20:25:37 UTC

Windows Service won't launch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I'm upgrading a client's system from Tomcat 7 to Tomcat 8 as part of a
new release of our software. I've got Tomcat 8 installed using the
32-bit ZIP file, and the Windows Services have been re-created from
scratch using tomcat8w.exe. They are running 64-bit Windows but a
32-bit JVM.

When I try to launch the service, I get an error "Incorrect function"
in the event log, and the service does not start. I can launch Tomcat
from the command-line successfully, so this is not a problem with
Tomcat per se, nor my application. It's got to be a problem with my
configuration of the Windows Service.

I'm tempted to tell them "Install a 64-bit JVM" and use the 64-bit
service-runner, but I'd prefer to get it working before I tell them
they have to change everything ;)

Any suggestions for what to look for?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXOizBAAoJEBzwKT+lPKRYNhkQAKeKijhlZXLjqe/wzk9bKB88
xGyFofi78uGtPI1fgznyjU0RifizVqY3EbuVvpycTCcxutRRhoIxI3HWuEq1ZCB8
nL7VSoA1gAG2d2+Bn/sWH7be6swkUNnUWH90HffdEZCPGMPg61S1EX00pmDDSJyK
UcXLzuPu8FvHdenuxkNFNqvcyjccTSjoZ0h6FF4L7XXxXbsuCosi4fpVabJ5yKq4
AWLlsh3Qwf5cUsneNhmVzMyBrOX/3fHEYixDdKPmcQM5BdaD9Rdfaq9ESH/JVjns
hy4wB/b4YKYWUZB+3iW1Ukav+zwYmRNdRQZdk2P6zQJ6zC8AgF4vHOI8vLsV2fB+
j4w2LmSi4pV8VIW1Sb5UzkPSeMp+r196H1/2PDE8JmXOGKpLXD8wgfY62erCJelF
+np6dTJd/OkTjjVcps3lF9b6bTpcokAu5xRXhjHrlxtq3H/77/ujfcvZ0qz2wlYx
EiG0ZgT8pe2yR4bntdoMIl2xGhBFyw4rmZgRLX9ClMwtMV516N5VTLzitQ7ll5Sf
5MjsYhdIH+Pc8fmUMGqjDiEGMURs2cE2nuIIrcFvDUkaaqYN0v3BegZNStp3Zatq
GjTnGO1ykXF/xi7WwsGc8DgrfpuRYLTAyl9fG13+/9Q2JIQ82xwyh0dIZ6CxB/ph
SHeeYTldIF9sab0F3B40
=BZgJ
-----END PGP SIGNATURE-----

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


Re: Windows Service won't launch

Posted by David Kerber <dc...@verizon.net>.
On 5/16/2016 4:25 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> All,
>
> I'm upgrading a client's system from Tomcat 7 to Tomcat 8 as part of a
> new release of our software. I've got Tomcat 8 installed using the
> 32-bit ZIP file, and the Windows Services have been re-created from
> scratch using tomcat8w.exe. They are running 64-bit Windows but a
> 32-bit JVM.
>
> When I try to launch the service, I get an error "Incorrect function"
> in the event log, and the service does not start. I can launch Tomcat
> from the command-line successfully, so this is not a problem with
> Tomcat per se, nor my application. It's got to be a problem with my
> configuration of the Windows Service.
>
> I'm tempted to tell them "Install a 64-bit JVM" and use the 64-bit
> service-runner, but I'd prefer to get it working before I tell them
> they have to change everything ;)
>
> Any suggestions for what to look for?

I'd check first for incorrectly-delimited parameters in the service 
definition.  Missing quotes or some such thing.  I would have said in 
any .properties .cfg or .ini files, but you say it runs ok from the cmd 
line.   I've seen this error before, but can't recall the exact 
circumstances at the moment.


>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXOizBAAoJEBzwKT+lPKRYNhkQAKeKijhlZXLjqe/wzk9bKB88
> xGyFofi78uGtPI1fgznyjU0RifizVqY3EbuVvpycTCcxutRRhoIxI3HWuEq1ZCB8
> nL7VSoA1gAG2d2+Bn/sWH7be6swkUNnUWH90HffdEZCPGMPg61S1EX00pmDDSJyK
> UcXLzuPu8FvHdenuxkNFNqvcyjccTSjoZ0h6FF4L7XXxXbsuCosi4fpVabJ5yKq4
> AWLlsh3Qwf5cUsneNhmVzMyBrOX/3fHEYixDdKPmcQM5BdaD9Rdfaq9ESH/JVjns
> hy4wB/b4YKYWUZB+3iW1Ukav+zwYmRNdRQZdk2P6zQJ6zC8AgF4vHOI8vLsV2fB+
> j4w2LmSi4pV8VIW1Sb5UzkPSeMp+r196H1/2PDE8JmXOGKpLXD8wgfY62erCJelF
> +np6dTJd/OkTjjVcps3lF9b6bTpcokAu5xRXhjHrlxtq3H/77/ujfcvZ0qz2wlYx
> EiG0ZgT8pe2yR4bntdoMIl2xGhBFyw4rmZgRLX9ClMwtMV516N5VTLzitQ7ll5Sf
> 5MjsYhdIH+Pc8fmUMGqjDiEGMURs2cE2nuIIrcFvDUkaaqYN0v3BegZNStp3Zatq
> GjTnGO1ykXF/xi7WwsGc8DgrfpuRYLTAyl9fG13+/9Q2JIQ82xwyh0dIZ6CxB/ph
> SHeeYTldIF9sab0F3B40
> =BZgJ
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: Windows Service won't launch

Posted by Leo Donahue <do...@gmail.com>.
Chris,

On Mon, May 16, 2016 at 3:25 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> All,
>
> I'm upgrading a client's system from Tomcat 7 to Tomcat 8 as part of a
> new release of our software. I've got Tomcat 8 installed using the
> 32-bit ZIP file, and the Windows Services have been re-created from
> scratch using tomcat8w.exe. They are running 64-bit Windows but a
> 32-bit JVM.
>

I just tried the following.

Windows 7 64 bit OS
x86 jdk1.8.0.92
I ran service.bat for Tomcat 8.0.33 32 bit.  (Tomcat 32 bit, jvm 32 bit)
No problems starting the service.

Windows 7 64 bit OS
x86 jdk1.8.0.92
I ran service.bat for Tomcat 8.0.33 64 bit. (Tomcat 64 bit, jvm 32 bit)
Incorrect Function in event viewer when trying to start the service.


>
> When I try to launch the service, I get an error "Incorrect function"
> in the event log, and the service does not start.


And I'm reading your statement above which says your environment is 32 bit
for both Tomcat 8 and the jvm.  Interesting.

I've never installed windows services using the Tomcat8w.exe directly on
the command line.  I've always used the service.bat, but I take all the
defaults in service.bat.

And off-topic speaking of defaults, in service.bat, why aren't these values
the same?
    --JvmMs 128
    --JvmMx 256


> I can launch Tomcat
> from the command-line successfully, so this is not a problem with
> Tomcat per se, nor my application. It's got to be a problem with my
> configuration of the Windows Service.
>
> I'm tempted to tell them "Install a 64-bit JVM" and use the 64-bit
> service-runner, but I'd prefer to get it working before I tell them
> they have to change everything ;)
>
> Any suggestions for what to look for?
>
> Thanks,
> - -chris
>
>