In this entry I will discuss some Pentaho (PCI) post-installation tasks. All these are also described in the Pentaho Quick start Guide.
Running the PCI as a server
A demo environment with samples is nice, but it's even nicer when you can offer the samples right at the fingertips of your audience. Suppose you want let a business play around with some of the samples: you certainly do not want to force them to crawl behind your demo machine. That would be like going to a restaurant and find out that they've only got one plate to eat from, so that all the customers need to queue before they can have dinner.
In order to allow the PCI to be accessed from a remote client, we need to edit a configuration file: the
web.xmlfile. You can find it in the
WEB-INF/web.xmlfile contains a so-called java servlet web application deployment descriptor. That's just what the Pentaho BI platform is - a web application based on java servlet technology. For the PCI, the servlet container happens to be JBoss.
Anyway, once you found the
web.xmlfile, it's probably a good idea to make a copy before you start editing. You can open file with any text-based editor. Search for the string
base-url. You should end up finding a fragment such as this:
So, we've located the parameter with the name
base-urland it's value is now
http://localhost:8080/pentaho. We need to change the hostname (now: localhost) to either the DNS-name or the IP address of our server. It is probably a wise idea to use a DNS-name instead of the IP address, so here we go:
http://%My Computer's Name%:8080/pentaho
Now, save the file and (Re)start the server (using the
start-pentahoscript). Test if your modification was successful by navigating to http://%My Computer's Name%/pentaho. Of course, you should also test if it still works when you try it from a remote machine. If that is not the case, it's most likely that this is due to a firewall that blocks remote requests or outbound responses on port 8080.
If nothing happens, or when you get an error message, you most likely made a typo. Besides comparing with the old
web.xmlfile, you can monitor the output of the
start-pentahoscript. Any errors will be output by the script and it might give you a hint as to what's wrong.
Ok, so now we can reach our pentaho demo environment from a remote machine.
You can also configure the server to use a port other than 8080. For example, port 80, the default http port, seems a sensible choice. This would allow users to connect to the much friendlier-looking url:
http://%My Computer's Name%/pentaho.
To modify the server port, you must modify the pentaho web app configuration file (the
web.xmlfile we've just been editing) accordingly. So, again, we edit the value of the
base-urlparameter, deleting the
:8080bit so that it reads:
http://%My Computer's Name%/pentaho
We also need to modify the server configuration file. According to page 10 of the Pentaho Advanced Install guide, this corresponds to the
server.xmlfile that is located in the
directory. Again, make a copy of the original first, and store it somewhere safe. Then, you can open the original with a regular text editor. Once you've opened it, you should look for the fragment that defines the HTTP connector. The lines look something like this:
Just modify the
portattribute of the
Connectorelement so that it reads
80. Save the file and (re)start the server with the
It is worth noting that this this did not work for me at first. I got the following error:
20:07:13,234 ERROR [Http11Protocol] Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:80
This indicates that another application is already using this port. Now, usually this would be another HTTP server, but I thought of that and made sure none of the other webservers I have installed were running. Finally, I found that Skype was using port 80. The issue was solved by configuring skype not to use port 80. (For everybody laughing their eyeballs out: this option was on by default.)
In my previous blog entry, I mentioned that not all of the packaged samples will run out of the box. For example, this is the case with the Bursting examples.
To configure mail, we need to edit the
email_config.xmlfile which resides in the directory:
Again it's best to make a copy of the file first. Then, open it with a plain text editor.
If you want to use a google mail adres, I recommend you discard the original
email_config.xml. Then, rename the
email_config_gmail.xmlfile in the same directory to
In most cases, you'll need to provide values for only these elements:
- mail.smtp.host - provide the name of your smtp server
- mail.userid - the user name
- mail.password - the password for this mail
The config files have excellent inline comments and it should not be a problem to set this up.
When you're done, start pentaho if you did not already do so. Changing the mail configuration does not require a restart as far as I can tell.
Now, navigate to the Bursting Examples section. From there, follow the sequence of instructions to test if the workflow engine is working correctly. You can tell that it does when you see that your mailbox is being spammed by your pentaho demoserver.
Ok, so far we've just been busy setting up the pentaho BI platform: installing and configuring. Next time, we will get ourselves some development tools, and actually build our first MySQL sample.