Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-19 Thread James H. H. Lampert

Fellow List members:

In the end, this morning, having been told that getting the development 
instance running under Java 8 had become a priority, and knowing that 
Tomcat was running under Apache (and also learning that Apache itself 
wasn't running under a service name containing recognizable words like 
"httpd" or "apache"), I ultimately just switched the setenv.sh to use 
Java 8, and stopped and restarted the instance (a course of action I'd 
regarded as a slightly risky last resort unless I was directed to do so 
by people who knew Tomcat and Apache better than I).


It came up quickly enough, and Manager showed Tomcat as running under 
Java 8.


--
JHHL

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



Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

James,

On 12/18/18 17:34, James H. H. Lampert wrote:
> On the Debian List, "deloptes" brought up the subect of 
> "openjdk-8-jdk-headless"; could that be relevant?

The "headless" version has fewer package dependencies because it does
not provide all of the GUI support. You can still do things like image
manipulation without a "console", and that's called "headless".

The "headless" package would only be necessary if your application
were particularly poorly-written. It might be a good idea to replace
the "regular one" with the "headless" one simply to reduce the number
of installed packages that must be maintained. But it's unlikely to
cause any errors.

> Emmanuel Bourg asked about the other instances, that are running
> Tomcat 8 under Java 8; they are all derived from Google's Tomcat-8 
> pre-installed image.

No changes to Tomcat itself... just switching from Java 7 to Java 8?

Do you have anything in server.xml that mentions specific class names
that might be missing from Java 8? Maybe some custom
JreMemoryLeakPreventionListener config or something?

The "Address already in use (bind failed)" usually just means that
Tomcat is already running.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwaX7IACgkQHPApP6U8
pFjafA//dkvyaizRBwtf9vwgjRYM54hmKNu1GAWW0A0fc6TxK7dWA7vi9pbsNXid
JFB6B5ulhOeagKvQBW1ukx7A46m2qBIk8fnU4SMLPmxgyL427L1vZcXXqSkom67Z
jX2sYKH1kxbF6yonTMY2XRgG+LjSxCD8pNt0vBqss6K4bjGQ4ndDExqWQTVd+dF0
UMQU9wkafTiLZ7bQKHHQvovwkMpn35SX4WVY2AyTlwfhKYJKoDciSZuxy0ab1AhA
kSp5D/PylV+utjTQG26+efGZan85bEIxpO4Lfi0v4eySu516cOiZIzGPEk663nN8
HBztzMleDfYjff5hzTmmCu2fZOS4VBDhZr0vkZvHC7OjL74be2azNJiXsvhZ7Obc
3qoYg0FrsKf/Kia/+BiwcOh8xU4qGxYylSXHLiXQVnrYLD9Bdr8JUT4eFkv1bMya
DLLLM+e+hrcmK05vshawYPSGWC3BHA+mMYQ+p49zneTRksSw9AgWsZdXcc+Anm8+
EHRF+kVUIjovaD0h6Xglofleft+9ORjDUQDFi5crSlYeGsTiuSpd4RoCwCdvjOak
gmBCWve4pxXCWBzDKVX+sSk3HYHUbWVwQ7tk3XaN/DuaCuWjQtEGmnGixQE0/67r
J6gyH3qmaJCpQ/GGYRIPI7E4m66JT4skAkY5TUzajNcLOOvcws0=
=Ij3J
-END PGP SIGNATURE-

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



Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread James H. H. Lampert

On 12/18/18, 2:49 PM, Caldarale, Charles R wrote:

The above indicates you have a Tomcat (or something much like it) already
running...


You would think so, and yet if I switch the JAVA_HOME line in setenv.sh 
to Java 7, it launches just fine. . . .


WAIT A SECOND!

Port 443 is open, and the Tomcat server is responding on it, even after 
I do a "service tomcat8 stop"!


I suddenly remember how much reconfiguring I had to do on the production 
servers, with the pre-installed Tomcat, to get it to front-end itself, 
rather than the default of running through Apache. And I'm also starting 
to remember how hard it is to find where things are in Apache, which is 
WHY I switched to the Tomcat front-ending itself configuration I was 
already familiar with on AS/400s.


It looks like Tomcat isn't running independently on this box, but rather 
running behind/under Apache!


But that doesn't explain why, if I set the JAVA_HOME line in setenv.sh 
to Java 7, "service tomcat8 start" seems to work fine, but if I set it 
to Java 8, it produces error messages.


Can anybody point me in the right direction?

--
JHHL

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



RE: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Caldarale, Charles R
> From: James H. H. Lampert [mailto:jam...@touchtonecorp.com] 
> Subject: Re: Tomcat 8 runs under Java 7, but not Java 8

> Excerpt from the relevant time period, catalina.2018-12-18.log:

> > 18-Dec-2018 20:18:55.419 SEVERE [main]
org.apache.catalina.core.StandardServer.await 
> > StandardServer.await: create[localhost:8005]:
> >  java.net.BindException: Address already in use (Bind failed)

> > 18-Dec-2018 20:31:12.604 SEVERE [main]
org.apache.coyote.AbstractProtocol.init Failed 
> > to initialize end point associated with ProtocolHandler
["https-jsse-nio-443"]
> >  java.net.BindException: Address already in use

> > 18-Dec-2018 20:31:55.545 SEVERE [main]
org.apache.catalina.core.StandardServer.await 
> > StandardServer.await: create[localhost:8005]:
> >  java.net.BindException: Address already in use (Bind failed)

The above indicates you have a Tomcat (or something much like it) already
running...

  - 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.



smime.p7s
Description: S/MIME cryptographic signature


Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread James H. H. Lampert

On 12/18/18, 12:50 PM, Mark Thomas wrote:

They don't appear to be very helpful.

They certainly didn't suggest anything to me.


What do the Tomcat logs show? catalina.-mm-dd.log is likely to be
the most useful but check them all.


Dear Mr. Thomas, et al:

Excerpt from the relevant time period, catalina.2018-12-18.log:

18-Dec-2018 20:18:55.419 SEVERE [main] 
org.apache.catalina.core.StandardServer.await StandardServer.await: 
create[localhost:8005]:
 java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at 
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:440)
at org.apache.catalina.startup.Catalina.await(Catalina.java:744)
at org.apache.catalina.startup.Catalina.start(Catalina.java:690)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

18-Dec-2018 20:18:55.420 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing 
ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:18:55.426 INFO [main] 
org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
18-Dec-2018 20:18:55.590 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping 
ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:18:55.590 INFO [main] org.apache.coyote.AbstractProtocol.destroy 
Destroying ProtocolHandler ["https-jsse-nio-443"]
18-Dec-2018 20:31:11.502 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/common/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.509 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/common], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.509 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.510 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.513 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/server/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/server], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.515 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/shared/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/var/lib/tomcat8/shared], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:11.516 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: 
[false], canRead: [false]
18-Dec-2018 20:31:11.517 WARNING [main] 
org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with 
directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], 
canRead: [false]
18-Dec-2018 20:31:12.212 WARNING [main] 
org.apache.catalina.startup.SetAllPropertiesRule.begin 
[SetAllPropertiesRule]{Server/Service/Connector} Setting property 'bufferSize' 
to '1024' did not find a matching property.
18-Dec-2018 20:31:12.360 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version:
Apache Tomcat/8.5.14 (Debian)
18-Dec-2018 20:31:12.361 INFO [main] 

Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Emmanuel Bourg
Hi James,

Le 18/12/2018 à 21:40, James H. H. Lampert a écrit :
> I just installed Java 8 (not as the default JRE) on a Google Compute
> Debian 8 instance that has been running Tomcat 8 under Java 7.

I assume you are using the tomcat8 package from the distribution. Tomcat
on Debian 8 Jessie is a bit old (but still receives security fixes), I
recommend upgrading to Debian 9 where you'll be able to use the latest
8.5 version from the stretch-backports repository (and soon tomcat9 too).


> If I change setenv.sh to add
>> JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"

Note that on Debian the JAVA_HOME variable is typically set in the
/etc/defaut/tomcat8 file.


> and I try to "service tomcat8 start," I get
> 
>> Job for tomcat8.service failed because the control process exited with
>> error code.
>> See "systemctl status tomcat8.service" and "journalctl -xe" for details.

This version of the Tomcat package doesn't have really useful
information in the systemd log unfortunately. This changed with the
version 8.5.32-2 of the package which now provides a proper systemd
service file. So in your case you should look into
/var/log/tomcat8/catalina.out instead.


> If I leave the JAVA_HOME in there, but change it to refer to the Java 7
> directory, it works fine.
> 
> What am I doing wrong? Tomcat 8 runs just fine on our other Google
> Compute instances, and they *only* have Java 8.

How did you install Java 8? From the jessie-backports repository?

Emmanuel Bourg

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



Re: Tomcat 8 runs under Java 7, but not Java 8

2018-12-18 Thread Mark Thomas
On 18/12/2018 20:40, James H. H. Lampert wrote:
> I just installed Java 8 (not as the default JRE) on a Google Compute
> Debian 8 instance that has been running Tomcat 8 under Java 7.
> 
> If I change setenv.sh to add
>> JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
> 
> and I try to "service tomcat8 start," I get
> 
>> Job for tomcat8.service failed because the control process exited with
>> error code.
>> See "systemctl status tomcat8.service" and "journalctl -xe" for details.

They don't appear to be very helpful.

What do the Tomcat logs show? catalina.-mm-dd.log is likely to be
the most useful but check them all.

Mark

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