VS: Tomcat accesslogs / Geoserver
Hi Christopher, Thanks for your fast answer. I'm quite new with Tomcat and HTTP. But as you said, Geoserver is taking care of the authentication itself. So this is the problem and we are not able to log the username in the access logs. I think we have to focus then on the Geoserver own logging. With best regards Ville Jussila -Alkuperäinen viesti- Lähettäjä: Christopher Schultz [mailto:ch...@christopherschultz.net] Lähetetty: 2. lokakuuta 2017 17:31 Vastaanottaja: users@tomcat.apache.org Aihe: Re: Tomcat accesslogs / Geoserver -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jussila, On 10/2/17 9:18 AM, Jussila Ville wrote: > We are running Geoserver 2.11.1 with Java 1.8.0_131 on Tomcat 8.0.44. > > I have tried before Geoserver's own mailing list without any help, so > now I try this one. Geoserver is a map engine to publish raster and > vector data in the Internet. More information can be found here > http://geoserver.org/ > > We are not able to record the username in the Tomcat Accesslog. > Geoserver has it's monitor plugin and Auditlogs, which we have > installed and logs are running nicely with recorded username. In the > Tomcat's accesslog they don't show up no matter what I try. We prefer > more using Tomcat's access logs, as we are not satisfied Geoservers > format. > > Here are parameters for the AccessLogValve in Tomcat > 8.0\conf\server.xml file > > directory="D:\Data\GeoServer\Tomcat_logs" > prefix="localhost_access_log" suffix=".txt" pattern="%a > %{X-Forwarded-FOR}i %u %t "%r" %s %b" /> > > I have tried to replace "%u" parameter with different kinds of > syntaxes example "%{username}s", "%{userName}s", "%{remoteUser}s", > "%{remoteuser}s", but none of them had solved the problem. Not even > replacing "s" with "i". With {Authorization}i, I was able to record > that Geoserver is using Basic authentication as it is set in UI. > > Can you help me? Is it possible that Geoserver is using its own built-in HTTP Basic authentication instead of having Tomcat handle authentication? If so, Tomcat knows nothing about the user, etc. and can't log anything about them in the access log. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlnSTY4ACgkQHPApP6U8 pFjXDQ/+LWYJutG9VsGs6mBN1kVem2J70hiavDRAN//pkrloH6q/U5wlYEXBrmTf vacFeMtOmjOeu8rOmh94Pg1GTH+kMS1qEu9/IlAebToH6HZzJ7ZPo8Zguo7H7nPv xVPk/urPwfeGlH5WZX+PWj52OI5pHq8NTDhMrNi0CftQIaCDSH43Di+CpfTlBa/Z HBMFXTjCFdYpZ1oN1zvGOYkwiQsK8HUEOZ41Dfc/YR4/oiSotLNE4Td6dsDOMrj1 /VpLOlpTEn8UrdpbddvZKb8axd4kyVdMQ7wGRsHSxiV54p1h9LZPC9T+OwCdmHsF 5TR31xfrYbIwTabRCnnekGeA3cXDsoRTK5xcdIuWw5aJVgvbQJFWslb4Vnmx0CYJ lkwQS5SXWBLlWH3LsJxXxfQ60WJ/kv9UZ3maN4EMvL8CerwaWLXq1tUIo9lIMDFt xPjuz+ZLvgKi+CFQvK+Y8y3K/laVGBIwRawqYl+5NMCFtvwbmC3mW0kDs6srEQvi ZRloXpE9J/SHwcQIeR1kadkmIq5fQsBM1JeEugdH4ZyJdBO307lUZvPnld+/7xPp Q9Fuw7dBRsjXr2okN4t7yFP7Oxw9yXOoTFS+zutX6bc7BQ0tmThacbCz9YdDetTS t9ZHPrlDu8sRDqQR+CAr6Tu+oMDQBS1I7CTx8FIqboahsnruW3g= =+oGU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat accesslogs / Geoserver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jussila, On 10/2/17 9:18 AM, Jussila Ville wrote: > We are running Geoserver 2.11.1 with Java 1.8.0_131 on Tomcat > 8.0.44. > > I have tried before Geoserver's own mailing list without any help, > so now I try this one. Geoserver is a map engine to publish raster > and vector data in the Internet. More information can be found here > http://geoserver.org/ > > We are not able to record the username in the Tomcat Accesslog. > Geoserver has it's monitor plugin and Auditlogs, which we have > installed and logs are running nicely with recorded username. In > the Tomcat's accesslog they don't show up no matter what I try. We > prefer more using Tomcat's access logs, as we are not satisfied > Geoservers format. > > Here are parameters for the AccessLogValve in Tomcat > 8.0\conf\server.xml file > > directory="D:\Data\GeoServer\Tomcat_logs" > prefix="localhost_access_log" suffix=".txt" pattern="%a > %{X-Forwarded-FOR}i %u %t "%r" %s %b" /> > > I have tried to replace "%u" parameter with different kinds of > syntaxes example "%{username}s", "%{userName}s", "%{remoteUser}s", > "%{remoteuser}s", but none of them had solved the problem. Not even > replacing "s" with "i". With {Authorization}i, I was able to record > that Geoserver is using Basic authentication as it is set in UI. > > Can you help me? Is it possible that Geoserver is using its own built-in HTTP Basic authentication instead of having Tomcat handle authentication? If so, Tomcat knows nothing about the user, etc. and can't log anything about them in the access log. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlnSTY4ACgkQHPApP6U8 pFjXDQ/+LWYJutG9VsGs6mBN1kVem2J70hiavDRAN//pkrloH6q/U5wlYEXBrmTf vacFeMtOmjOeu8rOmh94Pg1GTH+kMS1qEu9/IlAebToH6HZzJ7ZPo8Zguo7H7nPv xVPk/urPwfeGlH5WZX+PWj52OI5pHq8NTDhMrNi0CftQIaCDSH43Di+CpfTlBa/Z HBMFXTjCFdYpZ1oN1zvGOYkwiQsK8HUEOZ41Dfc/YR4/oiSotLNE4Td6dsDOMrj1 /VpLOlpTEn8UrdpbddvZKb8axd4kyVdMQ7wGRsHSxiV54p1h9LZPC9T+OwCdmHsF 5TR31xfrYbIwTabRCnnekGeA3cXDsoRTK5xcdIuWw5aJVgvbQJFWslb4Vnmx0CYJ lkwQS5SXWBLlWH3LsJxXxfQ60WJ/kv9UZ3maN4EMvL8CerwaWLXq1tUIo9lIMDFt xPjuz+ZLvgKi+CFQvK+Y8y3K/laVGBIwRawqYl+5NMCFtvwbmC3mW0kDs6srEQvi ZRloXpE9J/SHwcQIeR1kadkmIq5fQsBM1JeEugdH4ZyJdBO307lUZvPnld+/7xPp Q9Fuw7dBRsjXr2okN4t7yFP7Oxw9yXOoTFS+zutX6bc7BQ0tmThacbCz9YdDetTS t9ZHPrlDu8sRDqQR+CAr6Tu+oMDQBS1I7CTx8FIqboahsnruW3g= =+oGU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat accesslogs / Geoserver
Hi List, We are running Geoserver 2.11.1 with Java 1.8.0_131 on Tomcat 8.0.44. I have tried before Geoserver's own mailing list without any help, so now I try this one. Geoserver is a map engine to publish raster and vector data in the Internet. More information can be found here http://geoserver.org/ We are not able to record the username in the Tomcat Accesslog. Geoserver has it's monitor plugin and Auditlogs, which we have installed and logs are running nicely with recorded username. In the Tomcat's accesslog they don't show up no matter what I try. We prefer more using Tomcat's access logs, as we are not satisfied Geoservers format. Here are parameters for the AccessLogValve in Tomcat 8.0\conf\server.xml file I have tried to replace "%u" parameter with different kinds of syntaxes example "%{username}s", "%{userName}s", "%{remoteUser}s", "%{remoteuser}s", but none of them had solved the problem. Not even replacing "s" with "i". With {Authorization}i, I was able to record that Geoserver is using Basic authentication as it is set in UI. Can you help me? With best regards Mr. Ville Jussila Cadastral Surveyor City of Helsinki Finland
Re: TomcatCon Where (and when) next?
On Fri, Sep 29, 2017 at 3:03 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Mark, > > On 9/27/17 5:14 PM, Mark Thomas wrote: >> All, >> >> TomcatCon London 2017 took place yesterday and was even more >> successful than hoped. We sold 16 tickets for a full day of content >> from 3 Tomcat committers. >> >> I'd like to take this opportunity to once again thank our >> sponsors. >> >> Liferay generously provided the venue - including all the >> associated organisation. This provided us with a very nice venue, >> removed a significant amount of the organisational overhead and >> also removed all of the financial risk to the PMC members >> organising the event. >> >> c2b2 generously purchased 2 tickets and contributed towards the >> other expenses (speaker travel expenses, buying a microphone so we >> could record some of the sessions, name badges, etc,). >> >> We were able to record 4 out of the 6 sessions and these will be >> uploaded to YouTube and linked from the Tomcat website hopefully by >> the end of the week. >> >> As planned, the event generated a sufficient surplus to underwrite >> the next event. With this in mind, thoughts are already turning to >> future events. >> >> We are looking for suggestions for possible locations for the next >> event. Please add your suggestions to this thread. >> >> Some points to keep in mind: >> >> - Events close to one or more Tomcat committters will generally >> have lower overheads due to reduced travel costs. At this point >> that probably means Europe if the event runs without sponsorship. >> >> - Sponsorship to cover speaker travel and/or to provide a venue >> increases the options available with regard to location. I was >> serious when I said in a previous thread that the next event could >> be in India if a sponsor offered to provide a venue and cover >> speaker travel. >> >> If you'd like to discuss sponsorship options privately, please feel >> free to contact me off-list. >> >> With regards to timing, the aim is to try and organise one of >> these events every couple of months. That probably means we need to >> start thinking about event N+1 and N+2 in parallel. >> >> I look forward to your suggestions, > > Washington, DC would be a lovely place to have a TomcatCon. :) +1, it's only an hour flight for me :) > I'd be happy to organize the event. Not too many Tomcat committers in > the area, but lots of ASF folks are here, including jimjag (though his > schedule is sometimes awkward). We held a BarCampApache here in 2012 > on a Saturday and got ~45 attendees. Tomcat would probably have a > smaller draw from that crowd, but there might be more locals who would > be more interested in a more focused set of topics rather than the > wide-ranging chaos that often accompanies a BarCamp. > > There are quite a few big internet companies with presences around > here (e.g. Living Social, Facebook, etc.) but I'm not sure which ones > utilize Tomcat within their technology stack. They may be willing to > give us some meeting space, however, since most of those companies end > up being "friends of open source" even if they aren't > directly-benefiting from one particular tool. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlnOmOcACgkQHPApP6U8 > pFjK4Q//a+0pdGDS0licweHyD7fjAlfKri9i8nhVM0qTDhi9UpuPKufWJ+mqs401 > OSCSDW4LbhKZhq2S2AQn28usHEXhdQFuuNDIlaOfNMSvoPdp8y4f7FBz2a1zYyAc > RfMSoUl/S0npXvkaG2wHtIhuT4T3TBh7i7JnkDd9mtL5AD6bDYh4oKPHIiDtGebs > FLhR4kK4EbGRGPJS+xH31xbQyKxIzC6Lf54BXHiYA89LCmXb3zs0ZU9IrCEl5NIj > fTcsMaOu3rjxt4j6397keksmJy9fAtF47NLYGgk9US6p8hVZxnXEyUmE5un7s/RU > iICNzkvuUFF3MxQXq2huPuoBCFy5nm0Q4msLNdE5l7pBBwvbklUzsNPghIS5CD0J > lNlhdIFRZYFc7/JdrUOH4JHLg1187c6MrIEz9Yg9RteAE8oHj2u/KhBwGXk5kV2D > I9Ug4+A0pobMUN5aYI56+3ln51u2rIKSta7s7iwdoFC3DpS7EZHCYaSA23gGuuPO > LckRQR1XG5icdcLhKrs9abwKWsl97SzZ+G+eS15XlfP36ZMSquVctsC8RM/7y4cB > UWZFhh0Caim9+bX7g9gvuf2FhOwS6JnCE0kW8+2R9zrSQ0Wy3LyHuPEgWUdVirUS > UHcIQeiPsUqe5hhgG5XaLk0r9dnz7mgut6m0tCcOM/chg3XDVVk= > =xJiL > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help needed - JPA probem - No connection specified with project
On Fri, 9/29/17, Konstantin Kolinko wrote: Subject: Re: Help needed - JPA probem - No connection specified with project To: "Karen Goh" Cc: "Tomcat Users List" Date: Friday, September 29, 2017, 9:16 PM >> >> 1. See a link to Eclipse IDE FAQ here: >> >> https://wiki.apache.org/tomcat/FAQ/Developing#Q6 The actual Tomcat configuration that is running is in ".metadata/.plugins/org.eclipse.wst.server.core" directory (the Eclipse Web Tools FAQ should provide more pointers). There may be situations when it becomes stale. >> 2. See the >> following thread on how to turn on "Publish module >> context to separate XML files" option in Eclipse. >> >> By default >> (without that option) Eclipse IDE places >> elements into server.xml, which is a rather >> discourage practice. >> >> http://markmail.org/message/7zkyocvph56b6t6q > > OK. I managed to turn on "Publish module context..but my problem of context not bound is still there. > >> 3. >> Documentation on Context: >> >> http://tomcat.apache.org/tomcat-8.0-doc/config/context.html >> >> The element in >> your context.xml has a lot of attributes that >> should not be there, starting with >> "debug". What (bad) example were >> they copied from? > > 4. The current version of > Tomcat 8.0 is 8.0.46. > There were security > fixes in Java as well (8u141 was a security update > in July 2017) > > Also EOL date for Tomcat 8.0 has been > announced. Users are advised to > migrate to > 8.5. > http://tomcat.apache.org/tomcat-80-eol.html > > Hi kolinko, I have now installed Tomcat 8.5.20 but same problem. Even if it is "the same problem", it 'd better if you provide the actual log messages and stacktraces. Those differ between versions. Here's my latest error in which I really don't know what have cause the JPA no connection is specified : INFO: Starting service Catalina Oct 02, 2017 3:53:51 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/8.0.29 Oct 02, 2017 3:53:52 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor C:\Users\Karen Goh Seow Hui\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\conf\Catalina\localhost\Hi5S.xml Oct 02, 2017 3:53:53 PM org.apache.catalina.startup.SetContextPropertiesRule begin WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Hi5S' did not find a matching property. Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance INFO: Name = hi5 Ignoring unknown property: value of "" for "description" property Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance INFO: Name = hi5 Ignoring unknown property: value of "" for "mappedName" property Oct 02, 2017 3:53:58 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 2017-10-02 15:53:59,962 localhost-startStop-1 ERROR Error processing element Configuration ([Configuration: null]): CLASS_NOT_FOUND 2017-10-02 15:54:00,324 localhost-startStop-1 ERROR No ConnectionSource provided: connectionSource 2017-10-02 15:54:00,327 localhost-startStop-1 ERROR Unable to inject fields into builder class for plugin type class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender, element Jdbc. org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element Jdbc are invalid at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:198) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617) at org.apache.logging.log4j.core.LoggerCont
Re: Setting up Embedded Tomcat to honor Servlet 3.0 Annotations
On 02/10/17 07:23, Brian Toal wrote: > I want to decouple my solution from web.xml completely, so the goal is to > have the container to scan all jars on the classpath and look for Servlet > 3.0 annotations and do the necessary (register servlet context listeners, > filters, servlets, etc). In the code below, the container starts, but none > of the corresponding annotations are processed. I have various jars on the > classpath that contain implementations of the Servlet 3.0 annotation. I'm > most certain I'm missing the configuration that is required to get Tomcat > to do the scanning and processing, but i'm not aware of what that would > be. What code do I need to add to get the container to scan all jars on > the classpath for Servlet 3.0 annotations and register the various found > artifacts with the container? If you use addContext(), you have to do all of that yourself. Take a look at the difference in the Tomcat class between addContext() and addWebapp(). You probably also want to take a look at org.apache.catalina.startup.ContextConfig Mark > > Here's a snippet of what my code looks like so far. See [1] for full > source. > > > public void start(ApplicationContext acac) { > try { > Tomcat tomcat = new Tomcat(); > tomcat.setPort(8080); > // init http connector > tomcat.getConnector(); > File base = new File("."); > Context ctx = tomcat.addContext("", base.getAbsolutePath()); > ServletContext servletContext = ctx.getServletContext(); > tomcat.start(); > tomcat.getServer().await(); > } catch (LifecycleException e) { > throw new RuntimeException("Unable to launch tomcat ", e); > } > } [1] - https://github.com/toaler/container/blob/master/ > container-webapp-tomcat/src/main/java/container/webapp/ > tomcat/TomcatWebContainer.java > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org