Skip to content

Troubleshooting FAQ

Richard Stanley edited this page Aug 14, 2017 · 5 revisions

Troubleshooting OpenInfoMan

Which OS versions are supported?

The only supported version for installation is Ubuntu 14.x. The manual installation is outdated and requires updating. (Pull requests are welcome!). Please use the Ubuntu/Debian packaging available from the apt repository.

Where are log files for OpenInfoMan?

  • OpenInfoMan logs are located in /var/log/upstart/openinfoman.log
  • BaseX logs are located in /var/lib/openinfoman/data/.logs/
tail -f /var/log/upstart/openinfoman.log
tail -f /var/lib/openinfoman/data/.logs/*

What processes is OpenInfoMan running?

A web server on port 8984 and 8985 (for graceful shutdown) and the database engine on port 1984. The classpath JAR files are in /var/lib/openinfoman/lib. Check the classpath running the application:

ps -ef | grep java

Ensure that the ports are listening:

$ sudo netstat --tcp --listening --program
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
...
tcp6       0      0 [::]:8984               [::]:*                  LISTEN      10905/java
tcp6       0      0 [::]:8985               [::]:*                  LISTEN      10905/java
tcp6       0      0 [::]:1984               [::]:*                  LISTEN      10905/java

How can I do a graceful stop and start of OpenInfoMan?

Use the upstart service (/etc/init/openinfoman.conf) to stop and start openinfoman. Starting the service increases the heap size then calls the BaseX web application (/var/lib/openinfoman/bin/basexhttp). Stopping the OpenInfoMan service sends a call for the graceful shutdown of the web server then stops the other processes.

Root user privileges are needed to stop/start OpenInfoMan.

sudo service openinfoman stop
sudo service openinfoman start

Who is the oi user/group?

A disabled user oi and oi group owns OpenInfoMan. Check permissions in /var/lib/openinfoman. All files and folders should be owned and under group oi. If a module needs to be installed via the command line REPL (/var/lib/openinfoman/bin/basex) then it should be done as that user. Either assign a password with sudo passwd oi to enable it then switch user with su - oi, or switch to the oi user with sudo -u oi -i.

What's up with namespaces?

Namespaces exist in programming to avoid name collisions by limiting scope to a particular context. XML namespaces use the xmlns attribute to prefix elements. In OpenInfoMan, a hiearchical namespace is defined. Some namespaces resolve to external services, like DNS. But, the OpenInfoMan namespace does not resolve to URL paths or domains.

Further, modules are written into paths determined by their namespace. If a module is installed using the REPL, the namespace URI is rewritten to a local file path.

How do I load stored queries?

From here We have reengineered how stored queries are loaded within OpenInfoMan so that the BaseX can be better optimize their execution (in particular when parallelizing expensive functions). Currently there is no web interface to reload stored queries.

If you are running OpenInfoMan using the Ubuntu packaging, you should be able to (re)load a stored function by doing the following:

cd /var/lib/openinfoman && sudo -u oi php resources/scripts/install_stored_function.php /path/to/your/stored_function.xml

This will result in two things: Installation of XQuery module that acts as a wrapper for the stored function somewhere under /var/lib/openinfoman/repo/com/github/openhie/openinfoman/stored-function.

The somewhere depends on the name of the stored function, for example urn-ihe-iti-csd-2014-stored-function-facility-search.xqm

Installation of RestXQ module for the stored function under /var/lib/openinfoman/webapp to handle inbound requests. For example take a look at page_urn:ihe:iti:csd:2014:stored-function:facility-search.xqm which will use the XQuery module created above.