rpbouman / xmondrian

A java web archive (.WAR) to easily deploy and run the mondrian OLAP engine. Includes example schemas and datasets, client libraries, and web-frontends.
Apache License 2.0
20 stars 6 forks source link

The source code is required for debugging. #3

Closed dmitry-sloutskov closed 8 years ago

dmitry-sloutskov commented 8 years ago

Hi Roland, I took your solution, but got an error at run time, which I can not understand. Could you post the full source code of the solution, not only WAR-file?

http://localhost:8080/xmondrian/xavier/index.html xmodrian-error

rpbouman commented 8 years ago

@dmitry-sloutskov thanks for posting the issue. Look, the source code is not part of xmondrian. Xmondrian is only a distro. If you want mondrian source code, go to https://github.com/pentaho/mondrian.

That said, I sincerely doubt that "source code is required for debugging" is the real issue. The error indicates mondrian can't establish a connection. I'd sooner try to find some configuration error.

I'm a little bit puzzled as to why you got this error at all. xmondrian comes pre-configured and in all scenarios where I deployed it, I never saw this.

In what server did you deploy this? Please check your server log. There must be more info in there.

dmitry-sloutskov commented 8 years ago

For me, too, do not understand the cause of this error. Here is a log of my server. mondrian.zip

rpbouman commented 8 years ago

Dmitry, did you bother to check the log yourself? I'm seeing this:

2016-07-02 14:28:55,629 INFO [hsqldb.db.HSQLDB5187597468.ENGINE] Database closed 2016-07-02 14:28:55,643 FATAL [hsqldb.db.HSQLDB5187597468.ENGINE] could not reopen database org.hsqldb.HsqlException: java.lang.OutOfMemoryError: Java heap space .... ... Caused by: java.lang.OutOfMemoryError: Java heap space 2016-07-02 14:28:55,704 WARN [mondrian.olap.MondrianServer] Failed getting connection. Skipping mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while creating SQL connection: Jdbc=jdbc:hsqldb:res:/hsqldb-foodmart/foodmart

In other words, you need to give your server more memory.

dmitry-sloutskov commented 8 years ago

Roland, you're saying that the 8GB is not enough for the test database? The process memory does not rise above 500Mb. What should configure for the run of your assembly? On this server, working Pentaho test environment.

rpbouman commented 8 years ago

Dmitry, please - be a little more constructive, ok? Don't tell me I'm saying something I didn't.

Xmondrian comes with 2 test databases - foodmart, and steelwheels, which is much smaller. By default, it will load foodmart, but you can easily switch to steelwheels by navigating into the expanded xmondrian dir in your webapps folder and renaming

xmondrian/WEB-INF/datasources - steelwheels.xml

to

xmondrian/WEB-INF/datasources.xml

I, as well as others, have been able to run Xmondrian out of the box, with zero manual configuration on a variety of java servers, including jetty, tomcat and tiny java web server. These servers all run with their default configuration, and they certainly do not use 8Gb - more like 1Gb, and that's for the entire server process.

(For your convenience, I just checked. Tiny Java Web Server runs at about 75 MB after starting up. After initializing XMondrian with foodmart, it's about 750Mb. With steelwheels its about 130Mb. So to remove any doubt, if you think I was telling you you need 8Gb to run the test databases, then I can wholeheartedly correct you with a clear conscience: it's at most 675Mb with foodmart, and say 60Mb with steelwheels. I hope that helps)

Now, for some reason, you deployed XMondrian on Pentaho. That's fine, and there is no reason why that shouldn't work. That said, I do wonder why you'd want to do that, since Pentaho already ships a mondrian instance (2 actually), and loads a whole bunch of other stuff as well. Xmondrian was created for those people that are not interested in running such a heavy server.

You mentioned that "In this process, the memory does not rise above 500Mb." I respectfully doubt that. If that is true, then I suspect your server ran out of memory before properly starting the server. If you doubt what I am saying here, please take a look at this line from the pentaho bi server startup script:

https://github.com/pentaho/pentaho-platform/blob/master/assembly/package-res/biserver/start-pentaho.bat#L17

As you might notice, it starts with an initial heap size of 2Gb. So, if you are running into memory problems, then I suggest you check your Pentaho instance. From where I am sitting everything seems to point in that direction rather than xmondrian.

Best regards, and good luck,

Roland.

dmitry-sloutskov commented 8 years ago

Ronald, I'm sorry, but English is not my native language. I am sincerely sorry if we do not properly understand each other.

I would like to inform you that on that server has 8GB RAM and on it installed Pentaho.

Pentaho - works fine, but your assembly - causes OutOfMemory exception.

I installed on a single server and Pentaho your assembly, because this server for testing solutions. I understand that the simultaneous operation of these products at the grocery server - does not make sense.

rpbouman commented 8 years ago

Dmitry - no worries :) Let's get to solving this issue.

Ok - so I think my misunderstanding is this: you mentioned 8 Gb and I assumed you assigned that 8Gb to the java process. But now I'm thinking that maybe your machine has 8 Gb physically available.

If that is the case, then you can try to up the amount of memory available to the Pentaho process. You can do that by modifying the start-pentaho script I pointed to in my prior reply. Lookup the documentation of the java executable and review the documentation of the Xmx and Xms parameters.

Documentation is here https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html

It should be enough to only increase the value of the Xmx parameter.

Alternatively, try to deploy it on a standalone java server with no extra stuff installed. Tomcat, Jetty, and Tiny Java Web server are all great options. I'm partial to the latter (http://tjws.sourceforge.net/) since it is really quite tiny and easy to run.

dmitry-sloutskov commented 8 years ago

Yes, a server has 8 GB of physical memory. Java settings are set by default. Available around 5GB. I can allow Java 1GB. Do you think this will be enough?

rpbouman commented 8 years ago

Dmitry, Like I just wrote, a recent Pentaho server will take 2G to get started. So no 1G is not enough. But if you use a plain jetty, tomcat or tiny java server (see everything I wrote in this thread) then 1G will be enough.

Please, take some time to play with the memory settings. None of this has to do with Xmondrian, everything has to do with running java. Please read up on that.

For Pentaho 6.1, default settings are to

On Sun, Jul 3, 2016 at 10:14 PM, Dmitry Sloutskov notifications@github.com wrote:

Yes, a server has 8 GB of physical memory. Java settings are set by default. Available around 5GB. I can allow Java 1GB. Do you think this will be enough?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rpbouman/xmondrian/issues/3#issuecomment-230172844, or mute the thread https://github.com/notifications/unsubscribe/AAngk0tnF5GEH8DrU8Q6TFvI_qH3gHoIks5qSBgKgaJpZM4JDqUQ .

Roland Bouman blog: http://rpbouman.blogspot.com/ twitter: @rolandbouman linkedin: http://www.linkedin.com/profile/view?id=5142800&trk=tab_pro

Author of "Pentaho Solutions" (Wiley, ISBN: 978-0-470-48432-6 http://tinyurl.com/lvxa88) and "Pentaho Kettle Solutions" (Wiley, ISBN: 978-0-470-63517-9 http://tinyurl.com/33r7a8m)