Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MapStore config files #186

Merged

Conversation

Gnafu
Copy link
Contributor

@Gnafu Gnafu commented May 12, 2020

No description provided.

geostoreEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=geostore
geostoreVendorAdapter.generateDdl=true
geostoreVendorAdapter.showSql=false

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid the windows-style line endings ? ^M ;)

@Gnafu
Copy link
Contributor Author

Gnafu commented May 13, 2020

@fvanderbiest @landryb I should have fixed everything

@RemiDesgrange
Copy link
Contributor

I launched the composition. I have this trace and 404 when going the /mapstore

 OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Server version:        Apache Tomcat/7.0.94
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Server built:          Apr 10 2019 16:56:40 UTC
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Server number:         7.0.94.0
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: OS Name:               Linux
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: OS Version:            5.6.12-arch1-1
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Architecture:          amd64
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: JVM Version:           1.8.0_212-8u212-b01-1~deb9u1-b01
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: JVM Vendor:            Oracle Corporation
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: CATALINA_BASE:         /usr/local/tomcat
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: CATALINA_HOME:         /usr/local/tomcat
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Xms512m
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Xmx512m
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -XX:MaxPermSize=128m
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Dgeostore-ovr=file:///etc/georchestra/mapstore/geostore-datasource-ovr.properties
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Dignore.endorsed.dirs=
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Dcatalina.base=/usr/local/tomcat
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Dcatalina.home=/usr/local/tomcat
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.VersionLoggerListener log
 INFO: Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
 May 15, 2020 12:39:01 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
 INFO: Loaded APR based Apache Tomcat Native library 1.2.21 using APR version 1.5.2.
 May 15, 2020 12:39:01 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
 May 15, 2020 12:39:01 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
 INFO: OpenSSL successfully initialized (OpenSSL 1.1.0j  20 Nov 2018)
 May 15, 2020 12:39:01 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler ["http-apr-8080"]
 May 15, 2020 12:39:01 PM org.apache.coyote.AbstractProtocol init
 INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 402 ms
 May 15, 2020 12:39:01 PM org.apache.catalina.core.StandardService startInternal
 INFO: Starting service Catalina
 May 15, 2020 12:39:01 PM org.apache.catalina.core.StandardEngine startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.94
 May 15, 2020 12:39:01 PM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deploying web application archive /usr/local/tomcat/webapps/mapstore.war
 May 15, 2020 12:39:02 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
 INFO: validateJarFile(/usr/local/tomcat/webapps/mapstore/WEB-INF/lib/servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
 May 15, 2020 12:39:02 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
 INFO: validateJarFile(/usr/local/tomcat/webapps/mapstore/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
 May 15, 2020 12:39:05 PM org.apache.catalina.startup.TldConfig execute
 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.
 log4j:ERROR Could not read configuration file from URL [file:/usr/local/tomcat/../webapps/mapstore/WEB-INF/classes/log4j.properties].
 java.io.FileNotFoundException: /usr/local/tomcat/../webapps/mapstore/WEB-INF/classes/log4j.properties (No such file or directory)
   at java.io.FileInputStream.open0(Native Method)
   at java.io.FileInputStream.open(FileInputStream.java:195)
   at java.io.FileInputStream.<init>(FileInputStream.java:138)
   at java.io.FileInputStream.<init>(FileInputStream.java:93)
   at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
   at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
   at java.net.URL.openStream(URL.java:1045)
   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:433)
   at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:336)
   at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:72)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
   at org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke(MethodInvokingFactoryBean.java:162)
   at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:152)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5197)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5720)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
   at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)
 log4j:ERROR Ignoring configuration file [file:/usr/local/tomcat/../webapps/mapstore/WEB-INF/classes/log4j.properties].
 May 15, 2020 12:39:09 PM org.apache.catalina.core.StandardContext startInternal
 SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
 May 15, 2020 12:39:09 PM org.apache.catalina.core.StandardContext startInternal
 SEVERE: Context [/mapstore] startup failed due to previous errors
 May 15, 2020 12:39:09 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
 SEVERE: The web application [/mapstore] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
 May 15, 2020 12:39:10 PM org.apache.catalina.startup.HostConfig deployWAR
 INFO: Deployment of web application archive /usr/local/tomcat/webapps/mapstore.war has finished in 8,300 ms
 May 15, 2020 12:39:10 PM org.apache.coyote.AbstractProtocol start
 INFO: Starting ProtocolHandler ["http-apr-8080"]
 May 15, 2020 12:39:10 PM org.apache.coyote.AbstractProtocol start
 INFO: Starting ProtocolHandler ["ajp-apr-8009"]
 May 15, 2020 12:39:10 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 8362 ms

Do I need to do something. Is the latest image need some kind of special conf ?

@landryb
Copy link
Member

landryb commented May 20, 2020

Why not adding a sample new.json ? This way admins have a direct way to edit the default map template..

@fvanderbiest
Copy link
Member

Do I need to do something. Is the latest image need some kind of special conf ?

@Gnafu up, thanks :-)

@Gnafu
Copy link
Contributor Author

Gnafu commented May 26, 2020

Sorry for the late reply, I didn't get the notifications.
I'll have a look at that error and ask the developers about the new.json file

@Gnafu
Copy link
Contributor Author

Gnafu commented May 28, 2020

@RemiDesgrange can you please provide me the steps you did to reproduce the error?

@fvanderbiest
Copy link
Member

I think Remi just followed the steps from https://github.com/georchestra/docker/blob/master/README.md

@RemiDesgrange
Copy link
Contributor

RemiDesgrange commented Jun 2, 2020

Yes François is right. I "just" docker-compose up with this PR: georchestra/docker#58 and this datadir.

Sorry for the late reply.

@Gnafu
Copy link
Contributor Author

Gnafu commented Jun 4, 2020

@RemiDesgrange I updated the PR for the "docker" repo. (georchestra/docker#58)
Now it should work.

Can you please verify?

Thank you

So they can be customized by just editing them in the datadir
@fvanderbiest
Copy link
Member

In addition, can you add a small README in the mapstore subfolder explaining what the json files are for ? Thanks !

Copy link
Contributor

@RemiDesgrange RemiDesgrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it target docker, it should have consoleAppender like here in log4j config file instead of fileAppender.

@Gnafu Gnafu marked this pull request as ready for review July 9, 2020 23:22
@Gnafu
Copy link
Contributor Author

Gnafu commented Jul 9, 2020

@RemiDesgrange consoleAppender is now the default

@landryb
Copy link
Member

landryb commented Aug 27, 2020

@Gnafu what's the status of this PR ? i guess it should probably be updated wrt last changes in mapstore2-georchestra? And backported to 20.0.x too - cc @catmorales @jusabatier

@landryb
Copy link
Member

landryb commented Aug 27, 2020

also i realized this PR targets docker-master, but there should also be one updating master & 20.0.x ? Lost in all those branches...

@fvanderbiest
Copy link
Member

also i realized this PR targets docker-master, but there should also be one updating master & 20.0.x ? Lost in all those branches...

Ideally yes, it should target master, but that's not a problem, we can take care of the cherry-pick and adapt to the non-docker use-case (regarding logging & security proxy config), unless @Gnafu takes care of it too.

When this is done, a backport to the 20.0 and docker-20.0 branches would be a good idea indeed.

@tdipisa
Copy link

tdipisa commented Sep 2, 2020

Dear @landryb @RemiDesgrange and @fvanderbiest, I'm sorry for the late reply. As I already reported here we are resuming the work of @Gnafu since he is not available this period. Correct me if I'm wrong but, as far as I know and @Gnafu reported me some time ago, all is completed for this PR, we only need to check the problem reported by @RemiDesgrange in georchestra/docker#58 and then I think that also this PR can be merged (to consider also a syncup of MS config filed in datadir, see here)

Copy link
Member

@fvanderbiest fvanderbiest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tdipisa
Thanks for resuming the work provided by @Gnafu (hoping he's fine...)
Minor comments to address, and it should be good to go !

name in default postgres connection values
with "OpenStreetMap" offical name
instead of "Open Street Map"
@fvanderbiest fvanderbiest merged commit 583002c into georchestra:docker-master Sep 22, 2020
@fvanderbiest
Copy link
Member

A new PR should be made to port these files to the master branch (in a no-docker context)

@landryb
Copy link
Member

landryb commented Sep 22, 2020

A new PR should be made to port these files to the master branch (in a no-docker context)

and i would say a PR targetting master branch (and 20.x) was more important than one targetting docker-master.. @tdipisa please keep this one on your dashboards :)

@fvanderbiest
Copy link
Member

No, I meant in the current repo.

To make it clearer:

  • branch 20.0 hosts a datadir for a non-dockerized georchestra 20.0.x
  • branch master hosts a datadir for a non-dockerized georchestra master
  • branch docker-20 hosts a datadir for a dockerized georchestra 20.0.x
  • branch docker-master hosts a datadir for a dockerized georchestra master

Between the docker and non-docker setup, at least the log4j config files have to change ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants