mmisw / mmiorr

Unmaintained old MMI ORR system (v2) -- New development at https://github.com/mmisw/orr
2 stars 1 forks source link

update AllegroGraph #342

Closed carueda closed 9 years ago

carueda commented 9 years ago

We've been using AG 4.11 for a good while now. In general, satisfactory (especially if compared with previous releases we used, #281), but we have recently started to note some memory issues (lots of consumed memory that required a restart of the AG server). Also, during some of the work with the orr-ont prototype, we have noted issues with the AG HTTP endpoint. So, seems about time to do an update, not to mention the many bug fixes described in the AG release notes. So, the request here is to update the AG server to v5.0, as well as the corresponding libraries used by the Ont code.

carueda commented 9 years ago

Just downloaded 4.14 (5.0 doesn't seem to be available yet)

/opt/MMI-ORR/Downloads/agraph-4.14.1-1.x86_64.rpm

carueda commented 9 years ago

Temporarily installed AG 4.14.1 on a separate location to do tests.

One particular operation failing with 4.11 is the loading of statements into the triple store using the HTTP interface:

$ curl -i --user uu:pp --header "Content-type:application/rdf+xml" -X POST  'http://mmisw.org:10035/repositories/mmiorr/statements?url=http://mmisw.org/ont/mmitest/misc'
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=UTF-8
Date: Sun, 01 Feb 2015 20:37:38 GMT
Server: AllegroServe/1.3.19
Transfer-Encoding: chunked
Connection: keep-alive

MALFORMED DATA: [in Sax parser] parse of
#<multivalent hiper socket connected from mmisw.tamucc.edu/49873 to
  mmisw.tamucc.edu/80 @ #x101a1dee62>
failed
filename nil, position 1

The exact same operation works with 4.14.1 (note the different port for this testing):

curl -i --user uu:pp --header "Content-type:application/rdf+xml" -X POST  'http://mmisw.org:20035/repositories/mmiorr/statements?url=http://mmisw.org/ont/mmitest/misc'
HTTP/1.1 200 OK
Cache-control: max-age=0, must-revalidate
Content-Type: text/plain; charset=UTF-8
Date: Sun, 01 Feb 2015 20:39:23 GMT
Server: AllegroServe/1.3.28
Transfer-Encoding: chunked
Connection: keep-alive
x-handler-backtrace: ->p51463-d0dbf4c4bebd17ec/p51463-31949e2424b40762->p52077-532a494e54f432a7

39
carueda commented 9 years ago

Several tests via the Ont service (v2.2.1) interacting with the AG Server 4.14.1 worked well.

(Note, Ont still uses the AG client library for 4.11; presumably the underlying HTTP interface has not changed so we should be good. If issues are noted, we would just need to rebuild Ont with updated AG client libraries.)

So, I completed the update. The key commands:

Stop previous AG version:

$ sudo rpm -qa | grep -i agraph
agraph-4.11-1.x86_64

$ sudo /sbin/service agraph stop

Install new version:

$ sudo rpm -Ui agraph-4.14.1-1.x86_64.rpm

$ sudo rpm -qa | grep -i agraph
agraph-4.14.1-1.x86_64

Configure: We basically keep the previous configuration except for a new location for data and settings:

$ sudo /usr/bin/configure-agraph
...
Location of configuration file to create:
[/etc/agraph/agraph.cfg]:

It appears that you already have an AllegroGraph configuration file:
/etc/agraph/agraph.cfg
Would you like to overwrite it with a new configuration?:
[n]: y
Directory to store data and settings:
[/var/lib/agraph]: /opt/MMI-ORR/workspace/agraph4.14.1
/opt/MMI-ORR/workspace/agraph4.14.1 does not exist.
Would you like me to create it?:
[y]:
Directory to store log files:
[/var/log/agraph]:
Location of file to write server process id:
[/var/run/agraph/agraph.pid]:
User to run as:
[agraph]:
...
SuperUser account name:
[super]:
SuperUser account password:
SuperUser account password (again):
Instance timeout seconds:
[604800]:

/etc/agraph/agraph.cfg has been created.
...

Check start at boot time:

$ sudo /sbin/chkconfig --list agraph
agraph          0:off   1:off   2:off   3:on    4:on    5:on    6:off

Start AG:

$ sudo /sbin/service agraph start

Create "mmiorr" repository:

$ http -a uu:pp put :10035/repositories/mmiorr

Finally, ran command to populate the new triple store. All OK according to catalina.out.