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
- Trying now:
-
macOS 13.0
-
Tomcat 9.0.68
-
geoserver-22-RC-war
-
The war contains license html files, but no top-level RUNNING or README instructions (not sure why)
-
Out of the box logs are going to webapps/geoserver/logs/geoserver.log
-
Changing to GEOSERVER_DEVELOPER_LOGGING.xml
-
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!
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