Triage
From MeLibraries Wiki
This page is intended to give IT staff an overview of the ME library system and tips for diagnosing issues.
Contents
Outline
ME libraries is a simple client server model. The web site melibraries.ca is the server for the system in several respects. It houses a database of IPs that it references to the various ME library clients, one at each library. The clients receive requests from the web site server and return responses based on those requests.
Server: 'hello 207.10.0.143, who is customer 12345'? 207.10.0.143: 'hello server, customer 12345 is ...'.
There are several moving parts involved in this request, response conversation.
- Is the ME server running at the library.
- To determine check services. For Windows, literally check services to make sure a service called ' Metro' is running. If not, try restarting the server. On Unix machines run the 'make check' command.
- If services fail to start the most common problem is a configuration error. Check the configuration files for spelling mistakes, and missing values.
- The server at the library must also be able to hear incoming requests from the website. Frequently there are firewall rules that forbid traffic to the ME local server except from the specific ME library's web site, and even then, only on port 2004 (usually). The port your ME server expects to be contacted on is contained in the environment.properties file.
- Is the melibraries.ca working correctly? An admin should be able to login to the server, once there the database is stored locally, and can be accessed through the mysql workbench or from the command line.
- Sometimes the file system is in read only mode. Are any of your partitions full? You can try to just restart the server and do a FSCK (check disk) on the melibraries.ca server.
Testing local server is alive with telnet
- From another station you can telnet to the library's ME server with:
ilsdev@ilsdev1:~/projects$ telnet 127.0.0.1 2004 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. XK0 status OK use 'XX0' to hangup. XY0 {"code":"UNKNOWN","responseMessage":"java.lang.IllegalStateException: Not a JSON Object: \"XY0\"","customer":"null"} XX0 XX0 Connection closed by foreign host.
This is an example of a successful connection.
Services under Windows
Services under Unix
ilsdev@ilsdev1:~/metro$ make check #################### cat /home/ilsdev/metro/logs/metro.out Wed Feb 03 08:40:04 MST 2016 initializing service... Wed Feb 03 08:40:04 MST 2016 starting service, server version: 0.9.05_02 Metro (MeCard) server version 0.9.05_02 Wed Feb 03 08:40:05 MST 2016 CONFIG: dir set to '/home/ilsdev/metro/config/' #################### cat /home/ilsdev/metro/logs/metro.err Still running according to PID file /home/ilsdev/metro/logs/metro.pid, PID is 16161 Service exit with a return value of 122 #################### ps aux | grep metro ilsdev 16158 0.0 0.0 17040 404 ? Ss 08:40 0:00 jsvc.exec -home /usr/lib/jvm/java-7-openjdk-amd64 -cp /home/ilsdev/metro/dist/lib/ commons-daemon- 1.0.15.jar:/home/ilsdev/metro/dist/MeCard.jar -user ilsdev -outfile /home/ilsdev/metro/logs/metro.out -errfile /home/ilsdev/metro/logs/metro.err -pidfile /home/ilsdev/metro/logs/metro.pid mecard.MetroService -c /home/ilsdev/metro/config ilsdev 16161 7.7 2.6 1350436 27060 ? Sl 08:40 0:00 jsvc.exec -home /usr/lib/jvm/java-7-openjdk-amd64 -cp /home/ilsdev/metro/dist/lib/ commons-daemon- 1.0.15.jar:/home/ilsdev/metro/dist/MeCard.jar -user ilsdev -outfile /home/ilsdev/metro/logs/metro.out -errfile /home/ilsdev/metro/logs/metro.err -pidfile /home/ilsdev/metro/logs/metro.pid mecard.MetroService -c /home/ilsdev/metro/config ilsdev 16231 0.0 0.0 4440 620 pts/0 S+ 08:40 0:00 /bin/sh -c ps aux | grep metro ilsdev 16233 0.0 0.0 11740 900 pts/0 S+ 08:40 0:00 grep metro netstat -an | grep 2004 tcp 0 0 0.0.0.0:2004 0.0.0.0:* LISTEN