[Geoserver-users] Geoserver 2.22RC does not write log into file

Hi,

I wonder why Geoserver does not write log into a file with version 2.22RC that is installed on Linux from war. The default data_dir fallback is in use and therefore the log file should be ‘/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log’. But when we start Geoserver and use it we can see only this one line in the UI About & Status – GeoServer Logs:

01 Nov 09:00:30 CONFIG [geoserver.logging] - Log4j 2 configuration set to GEOSERVER_DEVELOPER_LOGGING.xml

Logging works as supposed with 2.22RC that I installed from bin-zin on Windows. On the Linux server the logging is OK with pre-log4j 2 version 2.20 but both 2.21 and 2.22RC create just that one line log. Any suggestions about what to try next? The production data_dir will not be at /var/lib/tomcat9/webapps/geoserver22/data/ but we use the defaults for fast testing.

-Jukka Rahkonen-

Jukka:

To troubleshoot logging I have our logging init code using the same logger as Log4J configuration:

-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=DEBUG

Or change the start of your logging profile to:

Try starting with that and maybe we can learn more?

Jody

···


Jody Garnett

  1. Trying now:
  • macOS 13.0
  • Tomcat 9.0.68
  • geoserver-22-RC-war
  1. The war contains license html files, but no top-level RUNNING or README instructions (not sure why)

  2. Out of the box logs are going to webapps/geoserver/logs/geoserver.log

  3. Changing to GEOSERVER_DEVELOPER_LOGGING.xml

  4. So many TRACE logs it is very busy …

So I cannot produce this problem locally

Q: Is your tomcat running as different user? Does it have permission to create geoserver.log? Have you enabled tomcat sandboxing to prevent apps modifying webapps folder?

···


Jody Garnett

Hi,

My colleague sent this information about our system. Geoserver installation was made out of the box with a war file.

-Red Hat Enterprise Linux Server release 7.8 (Maipo)

-Apache Tomcat/9.0.62

-geoserver-22-RC-war

Things tested:

“-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=DEBUG” and “”

without improvement to the problem.

Restarting tomcat or switching the logging profile generates following line to “geoserver.log”:

04 Nov 14:49:26 CONFIG [geoserver.logging] - Log4j 2 configuration set to DEFAULT_LOGGING.xml

Since that no more lines appear into the log file.

“chmod 777” to complete “data” directory did not change anyting.

Tomcat is running on tomcat user and complete “webapps/geoserver22” directory is owned by tomcat:tomcat.

Tomcat sandboxing is not enabled.

Pre geoserver 2.21.x versions have no problems with log writing on this system.

I noticed one difference to your test. You wrote that “3. Out of the box logs are going to webapps/geoserver/logs/geoserver.log”. In our case the out of the box logs are pointing inside the automatically created data directory, “/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log”.

-Jukka Rahkonen-

···

Lähettäjä: Jody Garnett jody.garnett@anonymised.com
Lähetetty: tiistai 1. marraskuuta 2022 19.44
Vastaanottaja: Rahkonen Jukka jukka.rahkonen@anonymised.com
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Geoserver 2.22RC does not write log into file

  1. Trying now:
  • macOS 13.0

  • Tomcat 9.0.68

  • geoserver-22-RC-war

  1. The war contains license html files, but no top-level RUNNING or README instructions (not sure why)

  2. Out of the box logs are going to webapps/geoserver/logs/geoserver.log

  3. Changing to GEOSERVER_DEVELOPER_LOGGING.xml

  4. So many TRACE logs it is very busy …

So I cannot produce this problem locally

Q: Is your tomcat running as different user? Does it have permission to create geoserver.log? Have you enabled tomcat sandboxing to prevent apps modifying webapps folder?

Jody Garnett

On Tue, 1 Nov 2022 at 00:56, Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

I wonder why Geoserver does not write log into a file with version 2.22RC that is installed on Linux from war. The default data_dir fallback is in use and therefore the log file should be ‘/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log’. But when we start Geoserver and use it we can see only this one line in the UI About & Status – GeoServer Logs:

01 Nov 09:00:30 CONFIG [geoserver.logging] - Log4j 2 configuration set to GEOSERVER_DEVELOPER_LOGGING.xml

Logging works as supposed with 2.22RC that I installed from bin-zin on Windows. On the Linux server the logging is OK with pre-log4j 2 version 2.20 but both 2.21 and 2.22RC create just that one line log. Any suggestions about what to try next? The production data_dir will not be at /var/lib/tomcat9/webapps/geoserver22/data/ but we use the defaults for fast testing.

-Jukka Rahkonen-


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi all,
I’ve made a quick test with Apache Tomcat 9.0.55, GeoServer 2.22-RC, data dir still placed in the war file (the default one, not externalized).
Changed the logging configuration to DEFAULT, PRODUCTION and GEOSERVER_DEVELOPER_LOGGING, changed also the location
of the target file name as an extra test, in all cases I’m getting new lines being logged into the log file…

Cheers
Andrea

On Mon, Nov 7, 2022 at 8:26 AM Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

My colleague sent this information about our system. Geoserver installation was made out of the box with a war file.

-Red Hat Enterprise Linux Server release 7.8 (Maipo)

-Apache Tomcat/9.0.62

-geoserver-22-RC-war

Things tested:

“-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=DEBUG” and “”

without improvement to the problem.

Restarting tomcat or switching the logging profile generates following line to “geoserver.log”:

04 Nov 14:49:26 CONFIG [geoserver.logging] - Log4j 2 configuration set to DEFAULT_LOGGING.xml

Since that no more lines appear into the log file.

“chmod 777” to complete “data” directory did not change anyting.

Tomcat is running on tomcat user and complete “webapps/geoserver22” directory is owned by tomcat:tomcat.

Tomcat sandboxing is not enabled.

Pre geoserver 2.21.x versions have no problems with log writing on this system.

I noticed one difference to your test. You wrote that “3. Out of the box logs are going to webapps/geoserver/logs/geoserver.log”. In our case the out of the box logs are pointing inside the automatically created data directory, “/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log”.

-Jukka Rahkonen-

Lähettäjä: Jody Garnett <jody.garnett@anonymised.com…>
Lähetetty: tiistai 1. marraskuuta 2022 19.44
Vastaanottaja: Rahkonen Jukka <jukka.rahkonen@anonymised.com>
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Geoserver 2.22RC does not write log into file

  1. Trying now:
  • macOS 13.0

  • Tomcat 9.0.68

  • geoserver-22-RC-war

  1. The war contains license html files, but no top-level RUNNING or README instructions (not sure why)

  2. Out of the box logs are going to webapps/geoserver/logs/geoserver.log

  3. Changing to GEOSERVER_DEVELOPER_LOGGING.xml

  4. So many TRACE logs it is very busy …

So I cannot produce this problem locally

Q: Is your tomcat running as different user? Does it have permission to create geoserver.log? Have you enabled tomcat sandboxing to prevent apps modifying webapps folder?

Jody Garnett

On Tue, 1 Nov 2022 at 00:56, Rahkonen Jukka <jukka.rahkonen@anonymised.com…6847…> wrote:

Hi,

I wonder why Geoserver does not write log into a file with version 2.22RC that is installed on Linux from war. The default data_dir fallback is in use and therefore the log file should be ‘/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log’. But when we start Geoserver and use it we can see only this one line in the UI About & Status – GeoServer Logs:

01 Nov 09:00:30 CONFIG [geoserver.logging] - Log4j 2 configuration set to GEOSERVER_DEVELOPER_LOGGING.xml

Logging works as supposed with 2.22RC that I installed from bin-zin on Windows. On the Linux server the logging is OK with pre-log4j 2 version 2.20 but both 2.21 and 2.22RC create just that one line log. Any suggestions about what to try next? The production data_dir will not be at /var/lib/tomcat9/webapps/geoserver22/data/ but we use the defaults for fast testing.

-Jukka Rahkonen-


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

Hi,

We made more testing and used GS 2.22RC on Tomcat 7 instead of Tomcat 9. Still no writing into the log file. But then we found a couple of RedHat servers that do write log into file. The specifications of the log-writing servers are:

java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64

Apache Tomcat/7.0.76

Red Hat Enterprise Linux Server release 7.8 (Maipo)

Linux 3.10.0-1127.13.1.el7.x86_64

Those servers have different Linux kernel but wouldn’t it be odd if that would make a difference? The kernel on the not-log-writing servers is

Linux 3.10.0-1127.el7.x86_64

-Jukka Rahkonen-

···

Lähettäjä: Andrea Aime <andrea.aime@…10949…>
Lähetetty: keskiviikko 9. marraskuuta 2022 11.59
Vastaanottaja: Rahkonen Jukka jukka.rahkonen@anonymised.com
Kopio: Jody Garnett jody.garnett@anonymised.com; geoserver-users@anonymised.comists.sourceforge.net
Aihe: Re: [Geoserver-users] Geoserver 2.22RC does not write log into file

Hi all,

I’ve made a quick test with Apache Tomcat 9.0.55, GeoServer 2.22-RC, data dir still placed in the war file (the default one, not externalized).

Changed the logging configuration to DEFAULT, PRODUCTION and GEOSERVER_DEVELOPER_LOGGING, changed also the location

of the target file name as an extra test, in all cases I’m getting new lines being logged into the log file…

Cheers

Andrea

On Mon, Nov 7, 2022 at 8:26 AM Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

My colleague sent this information about our system. Geoserver installation was made out of the box with a war file.

-Red Hat Enterprise Linux Server release 7.8 (Maipo)

-Apache Tomcat/9.0.62

-geoserver-22-RC-war

Things tested:

“-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=DEBUG” and “”

without improvement to the problem.

Restarting tomcat or switching the logging profile generates following line to “geoserver.log”:

04 Nov 14:49:26 CONFIG [geoserver.logging] - Log4j 2 configuration set to DEFAULT_LOGGING.xml

Since that no more lines appear into the log file.

“chmod 777” to complete “data” directory did not change anyting.

Tomcat is running on tomcat user and complete “webapps/geoserver22” directory is owned by tomcat:tomcat.

Tomcat sandboxing is not enabled.

Pre geoserver 2.21.x versions have no problems with log writing on this system.

I noticed one difference to your test. You wrote that “3. Out of the box logs are going to webapps/geoserver/logs/geoserver.log”. In our case the out of the box logs are pointing inside the automatically created data directory, “/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log”.

-Jukka Rahkonen-

Lähettäjä: Jody Garnett <jody.garnett@anonymised.com>
Lähetetty: tiistai 1. marraskuuta 2022 19.44
Vastaanottaja: Rahkonen Jukka <jukka.rahkonen@anonymised.com>
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] Geoserver 2.22RC does not write log into file

  1. Trying now:
  • macOS 13.0

  • Tomcat 9.0.68

  • geoserver-22-RC-war

  1. The war contains license html files, but no top-level RUNNING or README instructions (not sure why)

  2. Out of the box logs are going to webapps/geoserver/logs/geoserver.log

  3. Changing to GEOSERVER_DEVELOPER_LOGGING.xml

  4. So many TRACE logs it is very busy …

So I cannot produce this problem locally

Q: Is your tomcat running as different user? Does it have permission to create geoserver.log? Have you enabled tomcat sandboxing to prevent apps modifying webapps folder?

Jody Garnett

On Tue, 1 Nov 2022 at 00:56, Rahkonen Jukka <jukka.rahkonen@anonymised.com> wrote:

Hi,

I wonder why Geoserver does not write log into a file with version 2.22RC that is installed on Linux from war. The default data_dir fallback is in use and therefore the log file should be ‘/var/lib/tomcat9/webapps/geoserver22/data/logs/geoserver.log’. But when we start Geoserver and use it we can see only this one line in the UI About & Status – GeoServer Logs:

01 Nov 09:00:30 CONFIG [geoserver.logging] - Log4j 2 configuration set to GEOSERVER_DEVELOPER_LOGGING.xml

Logging works as supposed with 2.22RC that I installed from bin-zin on Windows. On the Linux server the logging is OK with pre-log4j 2 version 2.20 but both 2.21 and 2.22RC create just that one line log. Any suggestions about what to try next? The production data_dir will not be at /var/lib/tomcat9/webapps/geoserver22/data/ but we use the defaults for fast testing.

-Jukka Rahkonen-


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail