Re: [Dhis2-users] [dhis 2.26, pg 9.3, Ubuntu] Continued errors in starting tomcat 8.5
Dear gautam, It seems you tried to upgrade the database with newest version of dhis2.29 which insert bi weekly in periodtype table. So to resolve it just go to database and delete that row with id=678182 which is bi weekly in periodtype table. After that start the tomcat as usual. Thanks On Mon, Jul 9, 2018 at 1:27 PM Gautam Morey wrote: > Hi, > > Due to a out-of-memory crash, we are trying to get our hosted instance > back on track using the same dhis.conf and other configuration that was > working before the crash. However, we are against the wall with the > following error not allowing tomcat to deploy the war. The longer version > of the output log is placed at https://pastebin.com/kwF7Lj0b > > The final termination error is pasted below. > > * INFO 2018-07-09 14:32:49,364 Executing startup routine [2 of 15, > runlevel 2]: PeriodTypePopulator (DefaultStartupRoutineExecutor.java > [localhost-s > tartStop-1]) > * WARN 2018-07-09 14:32:49,369 SQL Warning Code: 0, SQLState: 0 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,369 parse S_3: ROLLBACK > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,369 SQL Warning Code: 0, SQLState: 0 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 StartTransactionCommand > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 bind to S_3 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 ProcessUtility (SqlExceptionHelper.java > [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 > (SqlExceptionHelper.java [localhost-startStop-1]) > * WARN 2018-07-09 14:32:49,370 CommitTransactionCommand > (SqlExceptionHelper.java [localhost-startStop-1]) > * ERROR 2018-07-09 14:32:49,372 org.hibernate.WrongClassException: Object > [id=678182] was not of the specified subclass > [org.hisp.dhis.period.PeriodType] : Discriminator: BiWeekly > at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1816) > at > org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627) > at org.hibernate.loader.Loader.getRow(Loader.java:1556) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:740) > at org.hibernate.loader.Loader.processResultSet(Loader.java:985) > at org.hibernate.loader.Loader.doQuery(Loader.java:943) > at > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349) > at org.hibernate.loader.Loader.doList(Loader.java:2615) > at > org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2460) > at org.hibernate.loader.Loader.list(Loader.java:2422) > at > org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109) > at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1896) > at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:366) > at > org.hisp.dhis.period.hibernate.HibernatePeriodStore.getAllPeriodTypes(HibernatePeriodStore.java:228) > at > org.hisp.dhis.period.PeriodTypePopulator.executeInTransaction(PeriodTypePopulator.java:66) > at > org.hisp.dhis.system.startup.TransactionContextStartupRoutine$1.doInTransaction(TransactionContextStartupRoutine.java:57) > at > org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) > at > org.hisp.dhis.system.startup.TransactionContextStartupRoutine.execute(TransactionContextStartupRoutine.java:52) > at > org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:113) > at > org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:70) > at > org.hisp.dhis.system.startup.StartupListener.contextInitialized(StartupListener.java:71) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792) > at > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) > : > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) > at > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985) > at > org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) > at >
Re: [Dhis2-users] [Dhis2-devs] java.lang.IllegalArgumentException thrown when attempting to launch Event Visualizer
Hi Dan, Thanks for getting back to me - not 100% sure if this is what you mean - but when trying to launch the EV it seems to stop here: [image: image.png] 1. Request URL: http://ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080/api/optionSets.json?fields=id,name,version,options[code,name]=false&_dc=1531169093448 2. Request Method: GET 3. Status Code: 400 4. Remote Address: 18.219.193.229:8080 5. Referrer Policy: no-referrer-when-downgrade 1. Response Headersview source 1. Connection: close 2. Date: Mon, 09 Jul 2018 20:44:53 GMT 3. Transfer-Encoding: chunked 2. Request Headersview source 1. Accept: */* 2. Accept-Encoding: gzip, deflate 3. Accept-Language: en-US,en;q=0.9 4. Connection: keep-alive 5. Cookie: JSESSIONID=6733ECA3C8DC3409FEC2B05909C3EBA6 6. Host: ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080 7. Referer: http://ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080/dhis-web-event-visualizer/index.html 8. User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 9. X-Requested-With: XMLHttpRequest 3. Query String Parametersview parsed 1. fields=id,name,version,options[code,name]=false&_dc=1531169093448 When the dashboard trys to load I get this: 1. Request URL: http://ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080/api/dashboards/IE9rGRCXp0D?fields=:all,dashboardItems[:all,reports[id,displayName],chart[id,displayName],map[id,displayName],reportTable[id,displayName],resources[id,displayName],users[id,displayName]]&_=1531169163096 2. Request Method: GET 3. Status Code: 400 4. Remote Address: 18.219.193.229:8080 5. Referrer Policy: no-referrer-when-downgrade 1. Response Headersview source 1. Connection: close 2. Date: Mon, 09 Jul 2018 20:46:02 GMT 3. Transfer-Encoding: chunked 2. Request Headersview source 1. Accept: application/json, text/javascript, */*; q=0.01 2. Accept-Encoding: gzip, deflate 3. Accept-Language: en-US,en;q=0.9 4. Connection: keep-alive 5. Cookie: JSESSIONID=6733ECA3C8DC3409FEC2B05909C3EBA6 6. Host: ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080 7. Referer: http://ec2-18-219-193-229.us-east-2.compute.amazonaws.com:8080/dhis-web-dashboard-integration/index.html 8. User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 9. X-Requested-With: XMLHttpRequest 3. Query String Parametersview sourceview URL encoded 1. fields: :all,dashboardItems[:all,reports[id,displayName],chart[id,displayName],map[id,displayName],reportTable[id,displayName],resources[id,displayName],users[id,displayName]] 2. _: 1531169163096 If a newer version of 2.26 would address the issue, should I also expect that it would be resolved in 2.29 also? Thanks, Kevin On Mon, Jul 9, 2018 at 4:18 PM Dan Cocos wrote: > Can you share what request is being made from your browser debugging > console? > > There were changes made to Tomcat to correct a CVE wherein disallowed > characters were being accepted when they shouldn’t be, specifically the “|” > character. You may have to upgrade to a more recent revision of 2.26 when > DHIS 2 was updated to no longer expect disallowed characters. > > The Tomcat commit can be found here > https://bz.apache.org/bugzilla/show_bug.cgi?id=62273 > > Dan Cocos > Principal, BAO Systems > dco...@baosystems.com | http://www.baosystems.com | 2900 K Street, Suite > 406, Washington D.C. 20007 > > > On Jul 9, 2018, at 3:50 PM, Kevin Bolger wrote: > > Hi Folks, > > I have deployed DHIS2 v2.26 (but I am seeing this same issue seen on > v2.29) on an AWS EC2 t2.medium instance running Ubuntu v16.04. > The build went fine and I can log into the system with the default account > and was also able to restore an old psql dump I need work on (dump was > taken on a v2.26 system). > > I'm experiencing an issue with both the dashboard and when trying to > launch the event visualizer. > The dashboard does not render anything and the EV looks as though it just > hangs after launching. > > The catalina.out log shows the following entry each time I attempt to > switch between the dashboard and the EV: > > 09-Jul-2018 00:16:10.370 INFO [http-nio-8080-exec-6] > org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request > header > Note: further occurrences of HTTP header parsing errors will be logged at > DEBUG level. > java.lang.IllegalArgumentException: Invalid character found in the > request target. The valid characters are
[Dhis2-users] java.lang.IllegalArgumentException thrown when attempting to launch Event Visualizer
Hi Folks, I have deployed DHIS2 v2.26 (but I am seeing this same issue seen on v2.29) on an AWS EC2 t2.medium instance running Ubuntu v16.04. The build went fine and I can log into the system with the default account and was also able to restore an old psql dump I need work on (dump was taken on a v2.26 system). I'm experiencing an issue with both the dashboard and when trying to launch the event visualizer. The dashboard does not render anything and the EV looks as though it just hangs after launching. The catalina.out log shows the following entry each time I attempt to switch between the dashboard and the EV: 09-Jul-2018 00:16:10.370 INFO [http-nio-8080-exec-6] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:479) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) I searched online and it seems to indicate an issue with the requestTargetAllow property in *catalina.properties* - see the following thread: https://stackoverflow.com/questions/41053653/tomcat-8-is-not-able-to-handle-get-request-with-in-query-parameters/44005213#44005213 I've updated *catalina.properties* as described, stopped the tomcat service, reloaded the daemon and started again but I get the same issue. I believe the psql dump file is good and the restore when ok, because the same archive and restore process on a DHIS2-LIVE local version (2.29) works as expected. Has anyone experienced the same or a similar issue? Any suggestions on how to proceed? Many thanks, Kevin ___ Mailing list: https://launchpad.net/~dhis2-users Post to : dhis2-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-users More help : https://help.launchpad.net/ListHelp
[Dhis2-users] [dhis 2.26, pg 9.3, Ubuntu] Continued errors in starting tomcat 8.5
Hi, Due to a out-of-memory crash, we are trying to get our hosted instance back on track using the same dhis.conf and other configuration that was working before the crash. However, we are against the wall with the following error not allowing tomcat to deploy the war. The longer version of the output log is placed at https://pastebin.com/kwF7Lj0b The final termination error is pasted below. * INFO 2018-07-09 14:32:49,364 Executing startup routine [2 of 15, runlevel 2]: PeriodTypePopulator (DefaultStartupRoutineExecutor.java [localhost-s tartStop-1]) * WARN 2018-07-09 14:32:49,369 SQL Warning Code: 0, SQLState: 0 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,369 parse S_3: ROLLBACK (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,369 SQL Warning Code: 0, SQLState: 0 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 StartTransactionCommand (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 bind to S_3 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 ProcessUtility (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 SQL Warning Code: 0, SQLState: 0 (SqlExceptionHelper.java [localhost-startStop-1]) * WARN 2018-07-09 14:32:49,370 CommitTransactionCommand (SqlExceptionHelper.java [localhost-startStop-1]) * ERROR 2018-07-09 14:32:49,372 org.hibernate.WrongClassException: Object [id=678182] was not of the specified subclass [org.hisp.dhis.period.PeriodType] : Discriminator: BiWeekly at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1816) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627) at org.hibernate.loader.Loader.getRow(Loader.java:1556) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:740) at org.hibernate.loader.Loader.processResultSet(Loader.java:985) at org.hibernate.loader.Loader.doQuery(Loader.java:943) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349) at org.hibernate.loader.Loader.doList(Loader.java:2615) at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2460) at org.hibernate.loader.Loader.list(Loader.java:2422) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1896) at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:366) at org.hisp.dhis.period.hibernate.HibernatePeriodStore.getAllPeriodTypes(HibernatePeriodStore.java:228) at org.hisp.dhis.period.PeriodTypePopulator.executeInTransaction(PeriodTypePopulator.java:66) at org.hisp.dhis.system.startup.TransactionContextStartupRoutine$1.doInTransaction(TransactionContextStartupRoutine.java:57) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.hisp.dhis.system.startup.TransactionContextStartupRoutine.execute(TransactionContextStartupRoutine.java:52) at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:113) at org.hisp.dhis.system.startup.DefaultStartupRoutineExecutor.execute(DefaultStartupRoutineExecutor.java:70) at org.hisp.dhis.system.startup.StartupListener.contextInitialized(StartupListener.java:71) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) : at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) (StartupListener.java [localhost-startStop-1]) * INFO 2018-07-09 14:32:49,422 De-registering jdbc driver: org.postgresql.Driver@25a564f1 (StartupListener.java [localhost-startStop-1]) What could we be doing
Re: [Dhis2-users] [Dhis2-devs] How to upload data values for data elements generated in custom forms
Leke, Have a look at the documentation, it gives the example of the csv import file format: https://docs.dhis2.org/2.27/en/developer/html/dhis2_developer_manual_full.html#webapi_data_values_csv You need to specify data element and category option combo in separate columns. Vlad On Mon, Jul 9, 2018 at 12:36 PM Olaleke Seweje wrote: > Hello all, > Let me paint the scenario. > > I have data elements: Element A, Element B. Category combination: > CategoryCombo C > > CategoryCombo C is attached to both elements and the elements are attached > to a custom form data set. > > So DHIS created 2 new elements > Element A, CatCombo C, > Element B, CatCombo C > > I was not able to get/access the generated elements under Data Elements in > Maintenance app but I accessed through the indicator calculations and got > the UIDs in format xxx.yyy > > Now the problem is if i copy that UID to a data values upload CSV, it > never uploads the data. Rather, it gives error message that the data > element not found or inaccessible. > > So can anyone please help me with making it accessible/usable in an upload > csv? > > I have attached a sample of my data values file. > > Thanks. > > -- > Regards, > Leke Seweje > ___ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : dhis2-d...@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~dhis2-users Post to : dhis2-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-users More help : https://help.launchpad.net/ListHelp
[Dhis2-users] How to upload data values for data elements generated in custom forms
Hello all, Let me paint the scenario. I have data elements: Element A, Element B. Category combination: CategoryCombo C CategoryCombo C is attached to both elements and the elements are attached to a custom form data set. So DHIS created 2 new elements Element A, CatCombo C, Element B, CatCombo C I was not able to get/access the generated elements under Data Elements in Maintenance app but I accessed through the indicator calculations and got the UIDs in format xxx.yyy Now the problem is if i copy that UID to a data values upload CSV, it never uploads the data. Rather, it gives error message that the data element not found or inaccessible. So can anyone please help me with making it accessible/usable in an upload csv? I have attached a sample of my data values file. Thanks. -- Regards, Leke Seweje dataelement,period,orgunit,catoptcombo,attroptcombo,value,storedby,lastupd,comment lDed9LpPrea.nlitsTEEcJm,201806,VKrJhGAoShN,,,1,admin,, lDed9LpPrea.nlitsTEEcJm,201806,hDk0RCxDoyI,,,0,admin,,___ Mailing list: https://launchpad.net/~dhis2-users Post to : dhis2-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-users More help : https://help.launchpad.net/ListHelp