Works on Windows, not on Linux

4053
4
04-08-2013 08:20 PM
DavidAskov
New Contributor III
We got our Geoportal running on Windows just fine under Tomcat. Our database is PostgreSQL, and it is on a separate machine.

Now, we want to migrate this to a Tomcat app server running on CentOS (database is staying put). The installation doc for Linux that came with 1.2.2 shows only one tiny Linux-specific change related to harvesting. The geoportal website comes up ok, but when I do a search, I get two errors on the resulting web page.
Error1: Could not get a csw search engine: Did not get key = local in repository com.esri.gpt.framework.context.ConfigurationException: A databaseReference has not been configured for connectionTag:
Error2: Could not perform operation.

In the logs, I see a stack trace error (see attached).

Note that when I read this doc, it may not be the latest version, but apparently there are a lot of setup steps that are not in my 1.2.2 Linux documentation:
http://www.esri.com/~/media/Files/Pdfs/library/whitepapers/pdfs/geoportal-server-setup-on-linux.pdf

So, do I need to do all those steps, or did the new version make them unnecessary? Anything else I'd need to do?

thanks!
0 Kudos
4 Replies
DavidAskov
New Contributor III
Update:
I had an XML error in my gpt.xml. I don't get the error anymore, but I still can't connect to the database.

My questions about the Linux setup are still a concern, in that the present setup instructions that come with the Geoportal look far simpler than the instructions I found online.
0 Kudos
RichardKachelriess
Occasional Contributor
Hi David,

I can't tell exactly what's going on with your install based on the stacktrace.txt file alone. I can't tell if your Geoportal install isn't happy about moving from Windows to Linux or if there are problems with your Linux machine connecting to the PostgreSQL machine.

There are several things that could be causing your problems.

1. Are you using the same version of Tomcat on the Linux machine that you used on the Windows machine?

2. How did you install Tomcat on the Linux machine? Did you install it by using the Linux distribution's repositoriesor by using the core binary distribution from tomcat.apache.org? Hopefully you used the core binary distribution and not the repositories. If you used core binary then all of the Tomcat directories will be stored within one directory, which mirrors the Windows install. If you used the repositories, the Tomcat directories are generally spread throughout the Linux OS instead of kept together in one directory. For example, the <Tomcat>/bin directory will be in the /bin directory, the <Tomcat>/lib directory will be in one of the /lib directories, and the <Tomcat>/webapps and other Tomcat directories will be spread throughout the /usr, /var, /home, or other directories.

3. Are you using the same version of Tomcat on both machines?

4. What did you actually migrate over from the Windows machine to the Linux machine? Was is just the Geoportal app, the webapps folder, or the entire Tomcat install?

5. Did you include the geoportal.xml file from the <Tomcat>/conf/Catalina/localhost directory and the appropriate postgresql jdbc file from the <Tomcat>/lib directory in your migration?

6. Did you update your geoportal.xml and gpt.xml (<Tomcat>/webapps/geoportal/WEB-INF/classes/gpt/config) files for your Linux install? For example, in the gpt.xml file, did you update the location of your lucene directories, such as changing the lucene indexLocation from something like "c:\lucene" for Windows to something like "/usr/local/etc/lucene" for Linux.

7. Did you double check the permissions for the Linux user that's running Tomcat? Does it own or have full permissions to run and modify all the files and directories it needs to, such as all of the Tomcat and lucene directories?

8. Is there anything different/special about your Linux machine's connection to your network that you need to take into account, such as proxies or authentication settings?

9. Is your Linux machine able to access the PostgreSQL machine and the PostgreSQL database at all? If you can, install the PostgreSQL client software (postgresql-client or similar in most Linux distro's repositories) and see if you can connect to the PostgreSQL database using psql. See PostgreSQL's documentation on psql (www.postgresql.org/docs/9.2/static/app-psql.html) for details on how to connect to remote database via psql.

10. Are there any permissions that you need to set on the PostgreSQL machine for it to accept connections from your Linux machine? For example, the pg_hba.conf file in your PostgreSQL machine's <PostgreSQL>/<version>/data directory might be configured to accept connections from your Windows machine but not your Linux machine.

Sorry that there's a lot there and I hope that it all makes sense. There are probably some other things going on that I'm not thinking of right now. I hope this helps you figure out what's going on.

Let me know if you need something clarified or have any questions.

-Richard
0 Kudos
RichardKachelriess
Occasional Contributor
Hi David,

One more thing.

Since you referenced that you used the Linux quick start guide, I wanted to point you to a few more resources.

1. Here is the full documentation for installing the Geoportal Server. In particular, look at the Geoportal Server Installation Guide and Geoportal Server Linux Installation Guide PDFs. They provide a lot more detail than what I put into the quick start guide, such as LDAP authentication and additional configurations.

2. Take a look at the Esri Geoportal Server LiveDVD Demo. I built it using the same setup as the How to Set Up an Esri Geoportal Server on Linux quick start guide. You can compare the set up on the LiveDVD with your installation to see what's different. It runs the 1.2.0 version of the Geoportal, so it won't be exactly the same. You can run the LiveDVD as a virtual machine using VMWare, Oracle Virtualbox, or KVM, which will let you access both the LiveDVD and your host machine if you only have access to one computer.

-Richard
0 Kudos
vinayaggarwal
New Contributor
The phrase "wine is not an emulator" is a reference to the fact that no processor code execution emulation occurs when running a Windows application under Wine. "Emulation" usually refers to the execution of compiled code intended for one processor (such as x86) by interpreting/recompiling software running on a different processor (such as PowerPC). Such emulation is almost always much slower than execution of the same code by the processor for which the code was compiled. In Wine, the Windows application's compiled x86 code runs at full native speed on the computer's x86 processor, just as it does when running under Windows. Windows system services are also supplied by Wine, in the form of wineserver.
0 Kudos