[CWB] CQPweb: Problems with registry location

Hardie, Andrew a.hardie at lancaster.ac.uk
Thu Sep 14 02:44:22 CEST 2023


I can shed light.

“gkmnnndo86k” is a cached query, presumably from before your migration (it’s a base36 number derived from unix time, used as a primary key in the database; this time is approx. 4 months ago).  This is why queries that don’t happen to be in cache don’t trigger the problem.

CQP query files incorporate the path of the registry. That is why CQP is reverting to your old reg path when it tries to access a pre-transfer cached query.

Solutions: (1) if your users do not have saved queries that they care about, just nuke the entire query cache.

Or, (2) do a search-and-replace of the old reg path to the new in all the files in the cached-data directory.

Queries are binary files, so some text tools will complain about being asked to perform a text operation on them. In case it helps: the registry path is stored in the query file as a null-terminated string beginning on the 5th byte of the file.

best

Andrew.

From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Simon Meier-Vieracker
Sent: Wednesday, September 13, 2023 10:43 AM
To: cwb at sslmit.unibo.it
Subject: Re: [CWB] CQPweb: Problems with registry location

Oh, and even more strange: The corpus DOES work with other queries. And it also works when I change to the CQP syntax. Might have something to do with the Simple Query Language translation??



Am 13.09.2023 um 11:35 schrieb Meier-Vieracker, Simon <simon.meier-vieracker at tu-dresden.de<mailto:simon.meier-vieracker at tu-dresden.de>>:

Hi,

we had some problems with our CQPweb server (v3.2.43) after server migration but could fix it. However, we changed the location of the registry files. It works with some corpora, but with others it doesn’t, giving the error:


cl_new_corpus: can't locate <ascom> in /home/service/registry

CQP Error:

Corpus ``gkmnnndo86k'' is undefined

/home/service/registry is in fact the old location. I checked the config.ini where the registry location is correctly indicated. Where can I tell CQPweb for this corpus ascom to look for the registry in the correct location /var/local/cqpweb/registry/? And how can I check where the strange corpus name „gkmnnndo86k“ comes from?

I also include the whole PHP debugging backtrace below.

Thanks and best regards
Simon





array(6) {
 [1]=>
 array(4) {
   ["file"]=>
   string(56) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/exiterror-lib.php"
   ["line"]=>
   int(380)
   ["function"]=>
   string(9) "exiterror"
   ["args"]=>
   array(1) {
     [0]=>
     array(5) {
       [0]=>
       string(69) "CQP reports an error! The CQP program sent back these error messages:"
       [1]=>
       string(19) "**** CQP ERROR ****"
       [2]=>
       string(61) "cl_new_corpus: can't locate  in /home/service/registry"
       [3]=>
       string(10) "CQP Error:"
       [4]=>
       string(35) "Corpus ``gkmnnndo86k'' is undefined"
     }
   }
 }
 [2]=>
 array(4) {
   ["file"]=>
   string(46) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/cqp.php"
   ["line"]=>
   int(1798)
   ["function"]=>
   string(13) "exiterror_cqp"
   ["args"]=>
   array(1) {
     [0]=>
     array(4) {
       [0]=>
       string(19) "**** CQP ERROR ****"
       [1]=>
       string(61) "cl_new_corpus: can't locate  in /home/service/registry"
       [2]=>
       string(10) "CQP Error:"
       [3]=>
       string(35) "Corpus ``gkmnnndo86k'' is undefined"
     }
   }
 }
 [3]=>
 array(7) {
   ["file"]=>
   string(46) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/cqp.php"
   ["line"]=>
   int(1850)
   ["function"]=>
   string(11) "shout_error"
   ["class"]=>
   string(3) "CQP"
   ["object"]=>
   object(CQP)#215 (21) {
     ["has_been_disconnected":"CQP":private]=>
     bool(false)
     ["process":"CQP":private]=>
     resource(4) of type (process)
     ["pipe":"CQP":private]=>
     array(3) {
       [0]=>
       resource(1) of type (stream)
       [1]=>
       resource(2) of type (stream)
       [2]=>
       resource(3) of type (stream)
     }
     ["last_registry_invoked":"CQP":private]=>
     string(26) "/var/local/cqpweb/registry"
     ["major_version"]=>
     int(3)
     ["minor_version"]=>
     int(5)
     ["revision_version"]=>
     int(0)
     ["revision_version_flagged_beta":"CQP":private]=>
     bool(false)
     ["compile_date"]=>
     NULL
     ["version_string"]=>
     string(17) "CQP version 3.5.0"
     ["status":"CQP":private]=>
     int(1)
     ["error_handler":"CQP":private]=>
     string(13) "exiterror_cqp"
     ["error_message":"CQP":private]=>
     array(4) {
       [0]=>
       string(19) "**** CQP ERROR ****"
       [1]=>
       string(61) "cl_new_corpus: can't locate  in /home/service/registry"
       [2]=>
       string(10) "CQP Error:"
       [3]=>
       string(35) "Corpus ``gkmnnndo86k'' is undefined"
     }
     ["EOL":"CQP":private]=>
     string(1) "
"
     ["progress_handler":"CQP":private]=>
     bool(false)
     ["gzip_path":"CQP":private]=>
     string(0) ""
     ["debug_mode":"CQP":private]=>
     bool(false)
     ["unbuffered_output_pending":"CQP":private]=>
     bool(false)
     ["pretty_suspended":"CQP":private]=>
     bool(false)
     ["corpus_charset":"CQP":private]=>
     int(0)
     ["last_set_corpus":"CQP":private]=>
     string(5) "ASCOM"
   }
   ["type"]=>
   string(2) "->"
   ["args"]=>
   array(0) {
   }
 }
 [4]=>
 array(7) {
   ["file"]=>
   string(46) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/cqp.php"
   ["line"]=>
   int(1143)
   ["function"]=>
   string(20) "check_pipe_for_error"
   ["class"]=>
   string(3) "CQP"
   ["object"]=>
   object(CQP)#215 (21) {
     ["has_been_disconnected":"CQP":private]=>
     bool(false)
     ["process":"CQP":private]=>
     resource(4) of type (process)
     ["pipe":"CQP":private]=>
     array(3) {
       [0]=>
       resource(1) of type (stream)
       [1]=>
       resource(2) of type (stream)
       [2]=>
       resource(3) of type (stream)
     }
     ["last_registry_invoked":"CQP":private]=>
     string(26) "/var/local/cqpweb/registry"
     ["major_version"]=>
     int(3)
     ["minor_version"]=>
     int(5)
     ["revision_version"]=>
     int(0)
     ["revision_version_flagged_beta":"CQP":private]=>
     bool(false)
     ["compile_date"]=>
     NULL
     ["version_string"]=>
     string(17) "CQP version 3.5.0"
     ["status":"CQP":private]=>
     int(1)
     ["error_handler":"CQP":private]=>
     string(13) "exiterror_cqp"
     ["error_message":"CQP":private]=>
     array(4) {
       [0]=>
       string(19) "**** CQP ERROR ****"
       [1]=>
       string(61) "cl_new_corpus: can't locate  in /home/service/registry"
       [2]=>
       string(10) "CQP Error:"
       [3]=>
       string(35) "Corpus ``gkmnnndo86k'' is undefined"
     }
     ["EOL":"CQP":private]=>
     string(1) "
"
     ["progress_handler":"CQP":private]=>
     bool(false)
     ["gzip_path":"CQP":private]=>
     string(0) ""
     ["debug_mode":"CQP":private]=>
     bool(false)
     ["unbuffered_output_pending":"CQP":private]=>
     bool(false)
     ["pretty_suspended":"CQP":private]=>
     bool(false)
     ["corpus_charset":"CQP":private]=>
     int(0)
     ["last_set_corpus":"CQP":private]=>
     string(5) "ASCOM"
   }
   ["type"]=>
   string(2) "->"
   ["args"]=>
   array(0) {
   }
 }
 [5]=>
 array(7) {
   ["file"]=>
   string(57) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/concordance-ui.php"
   ["line"]=>
   int(812)
   ["function"]=>
   string(7) "execute"
   ["class"]=>
   string(3) "CQP"
   ["object"]=>
   object(CQP)#215 (21) {
     ["has_been_disconnected":"CQP":private]=>
     bool(false)
     ["process":"CQP":private]=>
     resource(4) of type (process)
     ["pipe":"CQP":private]=>
     array(3) {
       [0]=>
       resource(1) of type (stream)
       [1]=>
       resource(2) of type (stream)
       [2]=>
       resource(3) of type (stream)
     }
     ["last_registry_invoked":"CQP":private]=>
     string(26) "/var/local/cqpweb/registry"
     ["major_version"]=>
     int(3)
     ["minor_version"]=>
     int(5)
     ["revision_version"]=>
     int(0)
     ["revision_version_flagged_beta":"CQP":private]=>
     bool(false)
     ["compile_date"]=>
     NULL
     ["version_string"]=>
     string(17) "CQP version 3.5.0"
     ["status":"CQP":private]=>
     int(1)
     ["error_handler":"CQP":private]=>
     string(13) "exiterror_cqp"
     ["error_message":"CQP":private]=>
     array(4) {
       [0]=>
       string(19) "**** CQP ERROR ****"
       [1]=>
       string(61) "cl_new_corpus: can't locate  in /home/service/registry"
       [2]=>
       string(10) "CQP Error:"
       [3]=>
       string(35) "Corpus ``gkmnnndo86k'' is undefined"
     }
     ["EOL":"CQP":private]=>
     string(1) "
"
     ["progress_handler":"CQP":private]=>
     bool(false)
     ["gzip_path":"CQP":private]=>
     string(0) ""
     ["debug_mode":"CQP":private]=>
     bool(false)
     ["unbuffered_output_pending":"CQP":private]=>
     bool(false)
     ["pretty_suspended":"CQP":private]=>
     bool(false)
     ["corpus_charset":"CQP":private]=>
     int(0)
     ["last_set_corpus":"CQP":private]=>
     string(5) "ASCOM"
   }
   ["type"]=>
   string(2) "->"
   ["args"]=>
   array(1) {
     [0]=>
     string(20) "cat gkmnnndo86k 0 49"
   }
 }
 [6]=>
 array(4) {
   ["file"]=>
   string(56) "/var/www/tu-dresden_gsw_ali/cqpweb/ascom/concordance.php"
   ["line"]=>
   int(1)
   ["args"]=>
   array(1) {
     [0]=>
     string(57) "/var/www/tu-dresden_gsw_ali/cqpweb/lib/concordance-ui.php"
   }
   ["function"]=>
   string(7) "require"
 }
}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20230914/5580a64f/attachment-0001.html>


More information about the CWB mailing list