Ticket #636 (closed clarification: fixed)

Opened 1 year ago

Last modified 1 year ago

problems migratiing stage databases to live for testing

Reported by: russ Assigned to: ronald
Priority: critical Milestone:
Component: topaz-mulgara Version: 0.8
Keywords: Cc:
Blocking: Blocked By:

Description

i did this:

-copied /var/lib/topaz/data/mulgara from plosone-stage to mulgara-dev -copied /var/lib/topaz/data/fedora from plosone-stage to fedora-dev -used fedora-rebuld to rebuild mysql on fedora-dev

then i fired everything up and tried to do a migration, but i get the following errors when is start topaz:

topaz.log:

org.mulgara.itql.ItqlInterpreterException: org.mulgara.query.QueryException: Couldn't create local database

mulgara.log:

2007-09-13 10:05:51,866 INFO  Startup> Host name aliases for this server are: [localhost, 127.0.0.1, 192.168.1.10, mulgara-dev.localdomain] [http-9091-Processor25 Startup]
2007-09-13 10:05:51,866 WARN  Database> Unable to set the host names for Server Info [http-9091-Processor25 org.mulgara.resolver.Database]
Caused by: java.lang.IllegalStateException: Host names have already been set

i checked permissions in /var/lib/topaz/data and they are all topaz.topaz.

is there some issue with moving a mulgara store from server to server? a step i need to take to reset the host name of the database? do i need to export the database and copy that file instead?

thanks!

Dependency Graph

Change History

(follow-up: ↓ 12 ) 09/13/07 10:19:15 changed by amit

Hmmm...this is a known problem with Mulgara which everyone has been screaming for them to fix and I think Andrae finally made some check ins yesterday (but that will not help us right now). Details are here http://mulgara.org/jira/browse/MGR-58.

Yes, I believe you will need to export the data, but Ronald will probably know better.

09/13/07 10:22:15 changed by russ

okay, i'll try and dig up the export instructions to give it a go for now. good to know it's (potentially) not all my fault :)

09/13/07 10:29:56 changed by amit

Directs a Mulgara server to write out a backup file that can later be restored. The general syntax is as follows:

backup server#model to [local|remote] file;

Where:

  • server is the URI of a complete Mulgara server to back up.
  • #model is an individual model to back up (optional).
  • local or remote specifies that the backup file is written locally on the client or remotely on server's filesystem, respectively. If not specified, the default is remote.
  • file is the URI of the backup file.

Note - Backups of individual models are written in RDF format while servers are written in a modified compressed (gzip) N3 format. This is because groups of models cannot be represented in RDF.

For example:

backup <rmi://mysite.com/server1> to <file:/tmp/serverbackup.gz>;

and

backup <rmi://mysite.com/server1> to remote <file:/tmp/serverbackup.gz>;

are equivalent. Both commands write the server backup file remotely on the server's filesystem.

backup <rmi://mysite.com/server1#mymodel> to local <file:/tmp/modelbackup.rdf>;

writes the model backup file locally on the client.

Use the restore command to restore server backups and use the create and load commands to restore model backups.

09/13/07 10:32:15 changed by russ

yes, i got that far but i can't figure out my mulgara uri.

i tried the following:

but kept getting the error

org.mulgara.itql.parser.ParserException: [1,1] expecting: EOF

09/13/07 10:38:49 changed by russ

09/13/07 10:44:48 changed by russ

backup <local:///topazproject> to <file:/tmp/serverbackup.gz>

seems to be doing the trick...

09/13/07 10:47:55 changed by amit

This is what I did:

backup <local:///topazproject> to remote <file:/tmp/server.backup>;

(follow-up: ↓ 14 ) 09/13/07 10:48:58 changed by russ

so now when i restore, do i need to drop the existing db...i will try that first...

09/13/07 10:57:22 changed by russ

itql> restore <local:///topazproject> from <file:/tmp/serverbackup.gz>;
2007-09-13 10:56:01,393 WARN  AttachmentsImpl> Exception:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.IllegalArgumentException: The char '0x14' after 'restore &lt;local:///' is not a valid XML character.

hmm...

(follow-up: ↓ 13 ) 09/13/07 10:57:59 changed by russ

itql> restore <rmi://mulgara-dev.localdomain:9091/topazproject> from <file:/tmp/serverbackup.gz>;

seems to be doing something...

09/13/07 11:27:27 changed by russ

  • status changed from new to closed.
  • resolution set to fixed.

okay, we're good! thanks for your help. i'll wiki this on the plos side...

(in reply to: ↑ 1 ) 09/13/07 16:32:10 changed by ronald

Replying to amit:

Hmmm...this is a known problem with Mulgara which everyone has been screaming for them to fix and I think Andrae finally made some check ins yesterday (but that will not help us right now). Details are here http://mulgara.org/jira/browse/MGR-58. Yes, I believe you will need to export the data, but Ronald will probably know better.

No, we are not affected by this because we use SOAP to connect to mulgara, and on mulgara we use the local:... scheme (i.e. which has no hostname and is therefore portable).

The "Unable to set the host names" message is normal and can be ignored. There must've been something else in the mulgara logs besides the two messages you listed.

(in reply to: ↑ 10 ) 09/13/07 16:35:40 changed by ronald

Replying to russ:

itql> restore <rmi://mulgara-dev.localdomain:9091/topazproject> from <file:/tmp/serverbackup.gz>;

seems to be doing something...

Oh oh, no, this is wrong. We may be lucky that this works, but I think it may also mess things up. Use

itql> restore <local:///topazproject> from <file:/tmp/serverbackup.gz>;

(in reply to: ↑ 8 ) 09/13/07 16:38:29 changed by ronald

Replying to russ:

so now when i restore, do i need to drop the existing db...i will try that first...

No, restore will complete replace the original stuff. Though if you remove the actual db files first, i.e. start mulgara on an empty directory, you'll get the smallest disk usage.

(follow-up: ↓ 18 ) 09/15/07 15:39:50 changed by russ

  • status changed from closed to reopened.
  • resolution deleted.

i tried what ronald suggests, but got an error - see comment 9...

09/15/07 18:06:08 changed by amit

  • owner changed from ronald to russ.
  • status changed from reopened to new.

Russ, I can bet you had a typo error in itqlrun earlier and tried to use the 'history' to get it to run again. 'history' in itqlrun is a bit iffy and I have had quite a few problems. Just type it again and try and the problem should not happen. I have tried it a few times between snape and black and have not had this problem.

09/17/07 09:31:23 changed by russ

  • owner changed from russ to ronald.

sounds good - or, actually it sounds like a reasonable theory with a bad consequence.

if my previous restore failed for some reason then i'll need to do another migration before i can test the full plosone corpus on my single box, which is cutting things a little tight for this week's upgrade.

is there any way to tell if what it did was also an okay thing to do?

(in reply to: ↑ 15 ) 09/17/07 12:09:59 changed by ronald

Replying to russ:

i tried what ronald suggests, but got an error - see comment 9...

0x14 is ctrl-t - somehow you got a control character in there. So retype from scratch, or copy paste from here.

09/17/07 12:58:32 changed by russ

  • status changed from new to closed.
  • resolution set to fixed.

okay, i know what i did wrong and i agree with your diagnosis of why the right thing didn't work :(

don't know if what i did also worked, but we'll find out in a few hours on ticket #637

i've since gotten the correct restore to work successfully on my single box dev.

thanks for your help.

i'm making a note for myself to try and reproduce my errors with copying the actual database instead of backup/restore, since ronald says this shouldn't be an issue either.