Forum OpenACS Q&A: Unable to login after upgrade to OpenACS 5.1

I've upgraded my dev server to OpenACS 5.1, and I'm unable to log in at this point.

The files have been updated, but not the database. After updating the files, I restarted the server, and attempted to log in.

I type in my email address and password, and then I get this error message, with the Email section highlighted in red:

Operation Authenticate is not implemented in 'local' implementation of contract 'auth_authentication'

Any idea of how I should proceed? I'd really like to log in and upgrade my site. I'll put this in the FAQ if it is answered here. :)

Collapse
Posted by Jade Rubick on
Oh, and if it matters, yes, I do have acs-authentication installed, and this was originally an OpenACS 5 install, not an upgrade from a previous system.
Collapse
Posted by Ola Hansson on
Jade,

Make sure you have the zzz-postload.tcl script in the global tcl/ dir. Then restart the server. I actually think you'll have to restart the server twice.

I came across this after I'd upgraded to 5.0.4 ... then I removed the zzz-postload script. There was never any problem when upgrading from 5.0.4 to 5.1.

Collapse
Posted by Jade Rubick on
Jeff has been helping me out on IRC.

He pointed out this discussion:

https://openacs.org/irc/log/2004-03-05#T14-54-39-1

in which aegrumet ran into this problem on Oracle. I'm on Postgres, which makes this a little interesting.

The actual error from the error log is as follows:

[07/May/2004:11:34:01][9677.5126][-conn:ibr::2] Error: Error getting parameters for impl_id 286: Operation GetParameters is not implemented in 'local' implementation of contract 'auth_password'
Operation GetParameters is not implemented in 'local' implementation of contract 'auth_password'
    while executing
"error "Operation $operation is not implemented in '$impl' implementation of contract '$contract'""
    (procedure "acs_sc_call" line 9)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -impl_id $impl_id  -operation GetParameters"
    invoked from within
"set parameters [acs_sc::invoke  -error  -impl_id $impl_id  -operation GetParameters]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "
[07/May/2004:11:34:02][9677.5126][-conn:ibr::2] Error: Error invoking CanRetrievePassword operation for authority_id 9:
Operation CanRetrievePassword is not implemented in 'local' implementation of contract 'auth_password'
    while executing
"error "Operation $operation is not implemented in '$impl' implementation of contract '$contract'""
    (procedure "acs_sc_call" line 9)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -contract "auth_password"  -impl_id $impl_id  -operation CanRetrievePassword
  -call_args [list $parameters]"
    (procedure "auth::password::CanRetrievePassword" line 11)
    invoked from within
"auth::password::CanRetrievePassword  -authority_id $authority_id"
    invoked from within
"set result_p [auth::password::CanRetrievePassword  -authority_id $authority_id]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "

Collapse
Posted by Jade Rubick on
I put the zzz-postload.tcl script in the global tcl directory and restarted twice. I get a couple of error messages:

[07/May/2004:12:15:49][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-automated-testing/tcl/test/acs-automated-testing-procs.tcl:
Invalid switch: "-libraries"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_example {
    A simple test case demonstrating the use of tclwebtest (HTTP level t..."
    (file "/var/lib/aolserver/ibr/packages/acs-automated-testing/tcl/test/acs-automated-testing-procs.tcl" line 9)
    invoked from within
"source $__file "

[07/May/2004:12:15:49][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl:
Invalid switch: "-procs"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case \
    -procs {
        lang::util::replace_temporary_tags_with_lookups
        lang::catalog::export_messages_to_file
        lang::catalog::parse
        lang::..."
    (file "/var/lib/aolserver/ibr/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl" line 467)
    invoked from within
"source $__file "

[07/May/2004:12:15:49][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl:
Invalid switch: "-error_level"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case -cats {} -error_level notice acs_tcl__tcl_file_common_errors {
    Test all known tcl files for successful parsing "(in the [info com..."
    (file "/var/lib/aolserver/ibr/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl" line 719)
    invoked from within
"source $__file "

[07/May/2004:12:15:49][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-
tcl/tcl/test/html-conversion-procs.tcl:
Invalid switch: "-bugs"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case -cats {api smoke} -bugs 386 -error_level warning  \
    ad_html_to_text_clipped_link {

    Test if it converts clipped links.

} {
..."
    (file "/var/lib/aolserver/ibr/packages/acs-tcl/tcl/test/html-conversion-procs.tcl" line 24)
    invoked from within
"source $__file "

[07/May/2004:12:16:05][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-
service-contract/tcl/acs-service-contract-init.tcl:
wrong # args: should be "acs_sc_proc contract operation impl"
    while executing
"acs_sc_proc $impl_contract_name $impl_operation_name $impl_name $impl_alias $impl_pl"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $code_block "
    ("1" arm line 1)
    invoked from within
"switch $errno {
                0 {
                    # TCL_OK
                }
                1 {
                    # TCL_ERROR
              ..."
    ("while" body line 20)
    invoked from within
"while { [db_getrow $db $selection] } {
            incr counter
            if { [info exists array_val] } {
                unset array_val
        ..."
    ("uplevel" body line 5)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
        set selection [db_exec select $db $full_statement_name $sql]

        set counter 0
        while { [db_getrow $..."
    (procedure "db_foreach" line 36)
    invoked from within
"db_foreach impl_operation {
    select ia.impl_contract_name,
          ia.impl_operation_name,
          ia.impl_name,
          ia.impl_alias,
..."
    (file "/var/lib/aolserver/ibr/packages/acs-service-contract/tcl/acs-service-contract-init.tcl" li
ne 2)
    invoked from within
"source $__file "

[07/May/2004:12:16:05][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/lars
-blogger/tcl/blogger-api-init.tcl:
invalid command name "xmlrpc::register_proc"
    while executing
"xmlrpc::register_proc blogger.newPost"
    (file "/var/lib/aolserver/ibr/packages/lars-blogger/tcl/blogger-api-init.tcl" line 9)
    invoked from within
"source $__file "

[07/May/2004:12:16:05][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/lars
-blogger/tcl/metaweblog-api-init.tcl:
invalid command name "xmlrpc::register_proc"
    while executing
"xmlrpc::register_proc metaWeblog.newPost"
    (file "/var/lib/aolserver/ibr/packages/lars-blogger/tcl/metaweblog-api-init.tcl" line 10)
    invoked from within
"source $__file "

[07/May/2004:12:16:13][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-
tcl/tcl/test/acs-tcl-test-procs.tcl:
Invalid switch: "-error_level"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case -cats {} -error_level notice acs_tcl__tcl_file_common_errors {
    Test all known tcl files for successful parsing "(in the [info com..."
    (file "/var/lib/aolserver/ibr/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl" line 719)
    invoked from within
"source $__file "

[07/May/2004:12:16:13][10003.1024][-main-] Error: Error sourcing /var/lib/aolserver/ibr/packages/acs-
tcl/tcl/test/html-conversion-procs.tcl:
Invalid switch: "-bugs"
    while executing
"aa_register_case__arg_parser"
    (procedure "aa_register_case" line 1)
    invoked from within
"aa_register_case -cats {api smoke} -bugs 386 -error_level warning  \
    ad_html_to_text_clipped_link {

    Test if it converts clipped links.

} {
..."
    (file "/var/lib/aolserver/ibr/packages/acs-tcl/tcl/test/html-conversion-procs.tcl" line 24)
    invoked from within
"source $__file "

[07/May/2004:12:16:15][10003.1024][-main-] Notice: Loading messages in file /var/lib/aolserver/ibr/pa
ckages/acs-kernel/catalog/acs-kernel.en_US.ISO-8859-1.xml
WARNING:  Error occurred while executing PL/pgSQL function apm_package_version__new
WARNING:  line 34 at SQL statement
[07/May/2004:12:16:18][10003.1024][-main-] Error: Ns_PgExec: result status: 7 message: ERROR:  Cannot
insert a duplicate key into unique index apm_package_vers_ver_uri_un

[07/May/2004:12:16:18][10003.1024][-main-] Error: apm_package_install: Error installing Kernel versio
n 5.0.4: Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning ro
ws.")

ERROR:  Cannot insert a duplicate key into unique index apm_package_vers_ver_uri_un

SQL:
                select apm_package_version__new(
                        NULL,
                        'acs-kernel',
                        '5.0.4',
                        'https://openacs.org/repository/download/apm/acs-kernel-5.0.4.apm';,
                        'Routines and data models providing the foundation for OpenACS-based Web serv
ices.',
                        'text/html',
                        'The OpenACS kernel contains the core datamodel create and drop scripts for s
uch things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.',
                        '2004-03-10',
                        'OpenACS',
                        'http://openacs.org';,
                        NULL,
                        't',
                        't'
                      );

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  Cannot insert a duplicate key into unique index apm_package_vers_ver_uri_un

SQL:
                select apm_package_version__new(
                        NULL,
                        'acs-kernel',
                        '5.0.4',
                        'https://openacs.org/repository/download/apm/acs-kernel-5.0.4.apm';,
                        'Routines and data models providing the foundation for OpenACS-based Web serv
ices.',
                        'text/html',
                        'The OpenACS kernel contains the core datamodel create and drop scripts for s
uch things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.',
                        '2004-03-10',
                        'OpenACS',
                        'http://openacs.org';,
                        NULL,
                        't',
                        't'
                      );

    while executing
"ns_pg_bind 0or1row nsdb0 {
                select apm_package_version__new(
                        :version_id,
                        :package_key,
                        :version_name,
                        :version_uri,
                        :summary,
                        :des..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
      ..."
    invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
                ns_log Debug "PLPGSQL: bypassed anon function"
etc.

same thing for acs-lang

same thing for acs-service-contract

Now I'm trying to hack my site so that I can login in and get around the service contract issue, which is what this seems to be?

Collapse
Posted by Jade Rubick on
Well, it seems this was some sort of CVS issue. I ended up "rolling back" my upgrade, and re-upgrading.

However, I then logged out, and logged back in, and now I'm getting a different error.

wrong # args: should be "AcsSc.auth_authentication.authenticate.local username username password password parameters parameters"

In the error.log:

[07/May/2004:16:23:50][11069.7176][-conn:ibr::4] Error: Error invoking CanRetrievePassword operation for authority_id 9:
wrong # args: should be "AcsSc.auth_password.canretrievepassword.local parameters parameters"
    while executing
"AcsSc.auth_password.canretrievepassword.local {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -contract "auth_password"  -impl_id $impl_id  -operation CanRetrievePassword
-call_args [list $parameters]"
    (procedure "auth::password::CanRetrievePassword" line 11)
    invoked from within
"auth::password::CanRetrievePassword  -authority_id $authority_id"
    invoked from within
"set result_p [auth::password::CanRetrievePassword  -authority_id $authority_id]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "
[07/May/2004:16:23:50][11069.7176][-conn:ibr::4] Error: Error invoking CanResetPassword operation for authority_id 9:
wrong # args: should be "AcsSc.auth_password.canresetpassword.local parameters parameters"
    while executing
"AcsSc.auth_password.canresetpassword.local {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -contract "auth_password"  -impl_id $impl_id  -operation CanResetPassword  -c
all_args [list $parameters]"
    (procedure "auth::password::CanResetPassword" line 11)
    invoked from within
"auth::password::CanResetPassword  -authority_id $authority_id"
    invoked from within
"set result_p [auth::password::CanResetPassword  -authority_id $authority_id]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "
[07/May/2004:16:23:50][11069.7176][-conn:ibr::4] Error: auth::authenticate: error invoking authentication driver for authority_id = 9: wrong # args: should be "AcsSc.auth_authentication.authenticate.local
username username password password parameters parameters"
    while executing
"AcsSc.auth_authentication.authenticate.local mailto:jader@bread.com mysecretpassword {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -impl_id $impl_id  -operation Authenticate  -call_args [list $username $password $parameters]"
    (procedure "auth::authentication::Authenticate" line 13)
    invoked from within
"auth::authentication::Authenticate  -username $username  -authority_id $authority_id  -password $password"
    invoked from within
"array set result [auth::authentication::Authenticate  -username $username  -authority_id $authority_id  -password $password]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "

I've done a diff of my directory and the latest openacs-5-1 branch. The only difference is in the .info file. It says it is a different version. But the code itself it all the same (I've diffed all the directories within acs-authentication.

Looking at it more, it appears that somehow my merged code wasn't imported back in. I followed the directions, but perhaps it's because there was more than a day that passed between my commit and merge, or because of my earlier screwup. Another thing that might have caused it is putting -kk in the merge. It appears that nothing changes when I do so, but when I manually go through and resolve conflicts (taking a lot of time!), it seems to import and then merge correctly.

The perils of not knowing what you're doing are especially keen with CVS.

Collapse
Posted by Ola Hansson on
Well, it does sound like something went wrong with the merge. After all, you're not supposed to be needing the zzz-postload.tcl script when upgrading from a fresh 5.0 install (I guess I should have read your second posting more closely).

When it comes to upgrading the code base by means of cvs import/merge etc. there are a few similar but slightly different approaches floating around which, in my experience, can cause some confusion ... Generally, I've found Andrew Grumet's cvs document very clear but still exhaustive enough to give you an understanding of what is going on. https://openacs.org/projects/dotlrn/dotlrn-doc/dotlrn-cvs

FWIW, these are the steps I took when I (AFAICT) successfully installed and, two years later, upgraded a couple of my sites:

cvs -d /localrep import -m "importing 4.5b" mysite OpenACS oacs-4-5-b

Check out one of the working copies:
cvs -d /localrep checkout mysite -d mysite-dev

[Add and commit some custom code ...]

2 years later: Along comes OpenACS 5.0!

cvs -d /localrep import -m "importing 5.0" mysite OpenACS openacs-5-0-compat

22 conlicts (say)

Ouch! However, we won't have this many conflicts to sort out after we have merged thanks to -kk.

Time to merge:

cd /tmp (or some other temporary location 😊

cvs -d /localrep checkout -kk -j oacs-4-5-b -j openacs-5-0-compat -d temp-checkout mysite

cd temp-checkout
cvs -qn update > /tmp/LOG 2>&1

Open the /tmp/LOG in emacs. Mark the beginning and place the cursor at the end of the text and do: M-x sort-lines ...

You should now see a "C" at the beginning of the line for each conlict, and they will probably be fewer than indicated before - again thanks to the -kk flag above.

Manually resolve the conflicts by editing the affected files.

Now *commit* the edited files:

(from /tmp/temp-checkout/)
cvs commit -m "Resolved conflicts during merge"

Finally update your real working copies (start with your development copy if you have one and once it has been verified to work well update the staging and/or production copies).

Then when 5.1 came I checked it out from openacs.org and imported it just as I did with 5.0. But when I merged, this time I used (approximately) this command and these -j tags:

cvs -d /localrep checkout -kk -j openacs-5-0-compat -j openacs-5-1-compat -d temp-checkout mysite

I *think* this is a correct way to do it (it seems to have worked well for me), but if anything I am doing is incorrect, please let me know!

Collapse
Posted by Torben Brosten on
Jade, I'm getting the same problem after upgrading.

I just swapped the full -r oacs-5-1 openacs-4 files from versions a few weeks ago.

The problem disappears when I swap the old oacs-5-1 back in and restart.. but swapping the new files in again just brings the problem back.

How did you resolve this?

Collapse
Posted by Torben Brosten on
Oops.. Didn't see that the message was part of thread.

the problem I'm getting:

  wrong # args: should be "AcsSc.auth_authentication.authenticate.local username password parameters"...

And if I try to create a new user:

Error in include template "/usr/local/www/bitscafe.com/openacs-5.0.2/packages/acs-subsite/lib/user-new": can't use empty string as operand of "!"

suggestions much appreciated,

Torben

Collapse
Posted by Malte Sussdorff on
Increase the version number of acs-subsite and acs-authentication. Try to upgrade. If this does not help, exectute the apm-callback procedure for upgrade manually by adding it to e.g. zzz-postload.tcl.

MAKE SURE TO ONLY DO THIS ONCE !!!!

Otherwise you will end up with multiple additional parameters in acssc and you will have to remove them manually. This is due to the fact that the apm-callback-procs.tcl for the upgrade is calling a procedure which is not there once you make the upgrade and this breaks your system.

Already a message has been send to the OCT about this, here is a copy for reference:

The acs_authentification update is screwed as the service contracts are not renewed during an update. Not to mention that the new parameter "self-registration" is not added during the upgrade.

It would be good if core changes are made, that touch

- The data modell
- The Service Contracts
- Parameters

if one does not only test the install but also the upgrade path.

...

Furthermore, maybe I'm missing something, but the apm-callback "after upgrade" function is called after you say "upgrade" for a package. Saying upgrade though will not reload the files in the /tcl directory, namely not /apm-callback-procs.tcl

I assume it is therefore unwise to call a procedure defined in apm-callback-procs.tcl if the to be called procedure is not reloaded first....

Collapse
Posted by Malte Sussdorff on
Just in case people keep stumbling over this. Here is a step by step guide.
  • Copy this code from /packages/acs-authentication/tcl/apm-callback-procs.tcl to /tcl/zzz-postload.tcl, or, if you run .LRN, /packages/dotlrn/tcl/zzz-postload.tcl

    
     # this is a direct update to the SC tables, we should expect a new
     # API for handling updates on SC, but since there's no one yet,
     # we'll do this way now .... (roc)
    
     set sc_change [list {auth_authentication.Authenticate.InputType} {auth_password.ChangePassword.InputType} {auth_password.ResetPassword.InputType}]
     set element_msg_type_name integer
    
     foreach msg_type_name $sc_change {
      set msg_type_id [db_string get_msg_type_id { select msg_type_id from acs_sc_msg_types where msg_type_name = :msg_type_name }]
      set element_pos [db_string get_pos { select max(element_pos) from acs_sc_msg_type_elements where msg_type_id = :msg_type_id }]
      incr element_pos
     
      acs_sc::msg_type::element::new \
       -msg_type_name $msg_type_name \
       -element_name authority_id \
       -element_msg_type_name $element_msg_type_name \
       -element_msg_type_isset_p f \
       -element_pos $element_pos
            
     }
    
    
  • Restart you server once
  • Remove zzz-postload.tcl
Collapse
Posted by Yves Goldberg on
I made a cvs update (no db chaqnges) and can't login anymore after restarting.

I have another error message than above. Here there seems to be too many arguments to authenticate.

In the login box (in red) I get:
=====
called "AcsSc.auth_authentication.authenticate.local" with too many arguments
=====

and in the log:
=====
[27/Aug/2004:08:30:58][27829.1078693168][-conn1-] Error: auth::authenticate: error invoking authentication driver for authority_id = 9: called "AcsSc.auth_authentication.authenticate.local" with too many arguments
    while executing
"AcsSc.auth_authentication.authenticate.local mailto:someone@goldberg.be password {} 9
"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -impl_id $impl_id  -operation Authenticate  -call
_args [list $username $password $parameters $authority_id"
    (procedure "auth::authentication::Authenticate" line 13)
    invoked from within
"auth::authentication::Authenticate  -username $username  -authority_id $a
uthority_id  -password $password"
    invoked from within
"array set result [auth::authentication::Authenticate  -username $username
-authority_id $authority_id  -password $password]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "
====

would anyone have a clue about how to fix this?

Thank you.
Yves.

Collapse
Posted by Deds Castillo on
Yves,

That error should also be resolved the code Malte posted.  You can safely do the steps he provided.  If you have developer support installed you can actually just copy the code and paste in into the developer support shell then restart without needing to create the postload file.

Collapse
Posted by Yves Goldberg on
Hi Deds. Thanks for your answer.

I tried that already and this doesn't work.

Then I ereased the DB and recovered it from backup and still unable to login (same error).

What has to manually be erased and in what table exactly?

((what a pain !!)

TIA.

Yves.

Collapse
Posted by Yves Goldberg on
Hello,

anyone could help me with this? It's almost a week I can't access my website anymore.

TIA
Yves.

Collapse
Posted by Malte Sussdorff on
This is fairly strange. When did you last update?

Are you using external authentification, did you add any drivers there, or is this strictly local?

Collapse
Posted by Yves Goldberg on
Thanks Malte for your answer. I don't understand what happened.

I made another "cvs update -d" in the root directory of this instance and I can log again.

I guess there was mixed code somewhere.

Anyway Thanks again.

Yves.

Collapse
Posted by Jade Rubick on
I got this again when upgrading to OpenACS 5.1.2 from 5.1.1

I tried Malte's method to fix it, and it didn't work.

I think the issue is when your database hasn't been upgraded, but you have upgraded your files. If you restart and try to log in before upgrading the database, perhaps then it doesn't allow you to log in?

That's my theory right now, anyway.

I'm going to revert the code to OpenACS 5.1.1 and see if that let's me log in.

I tried it, and it didn't work:

cd packages
cvs update -r openacs-5-1-1 acs*

(tried logging in, didn't work)
svc -t /service/myservice
(tried logging in, didn't work)

Any other ideas?

Collapse
Posted by Jade Rubick on
It looks like I'm running into the same issue as Yves:

[10/Nov/2004:12:45:30][16900.7176][-conn:ibr::4] Error: auth::authenticate: error invoking authentication driver for authority_id = 9: wrong # args: should be "AcsSc.auth_authentication.authenticate.local username password parameters"
    while executing
"AcsSc.auth_authentication.authenticate.local mailto:jader@bread.com mysecretpassword {} 9"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call -error=$error_p $contract $operation $call_args $impl"
    (procedure "acs_sc::invoke" line 17)
    invoked from within
"acs_sc::invoke  -error  -impl_id $impl_id  -operation Authenticate  -call_args [list $username $password $parameters $authority_id]"
    (procedure "auth::authentication::Authenticate" line 13)
    invoked from within
"auth::authentication::Authenticate  -username $username  -authority_id $authority_id  -password $password"
    invoked from within
"array set result [auth::authentication::Authenticate  -username $username  -authority_id $authority_id  -password $password]"
    ("uplevel" body line 2)
    invoked from within
"uplevel $body "
...

And if I try to add a new user:

[10/Nov/2004:12:57:00][16900.3076][-conn:ibr::0] Error: Error in include template "/var/lib/aolserver/ibr/packages/acs-subsite/lib/user-new": can't use empty string as operand of "!"
can't use empty string as operand of "!"
    while executing
"if { ![parameter::get_from_package_key  -package_key acs-authentication -parameter AllowSelfRegister] } {
          ad_maybe_redirect_for_registratio..."
    (procedure "auth::self_registration" line 4)
    invoked from within
"auth::self_registration"
    ("uplevel" body line 16)
    invoked from within
"uplevel {
          # Expects parameters:
#
# self_register_p - Is the form for users who self register (1) or
#                  for administrators who..."
    (procedure "code::tcl::/var/lib/aolserver/ibr/packages/acs-subsite/lib/u..."
line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date

Any ideas? It sucks not to be able to log in to my site. I'm glad this is on a dev server.

Collapse
Posted by Jade Rubick on
Okay, here's the evil way to fix this:

cd packages/acs-authentication
emacs patch-file

copy this into the file:

Index: tcl/authentication-procs.tcl
===================================================================
RCS file: /var/cvs/ibr/packages/acs-authentication/tcl/authentication-procs.tcl,v
retrieving revision 1.6
diff -u -r1.6 authentication-procs.tcl
--- tcl/authentication-procs.tcl        8 Nov 2004 23:08:31 -0000      1.6
+++ tcl/authentication-procs.tcl        10 Nov 2004 21:42:15 -0000
@@ -204,10 +204,14 @@
    }

    with_catch errmsg {
-        array set result [auth::authentication::Authenticate \
-                                -username $username \
-                                -authority_id $authority_id \
-                                -password $password]
+        # HACK:
+        set result(auth_status) ok
+        set result(account_status) ok
+
+        #array set result [auth::authentication::Authenticate \
+        #                        -username $username \
+        #                        -authority_id $authority_id \
+        #                        -password $password]

        # We do this so that if there aren't even the auth_status and account_s
tatus that need be
        # in the array, that gets caught below
@@ -332,6 +336,9 @@
            set result(account_message) $remote_account_message
        }
    }
+
+    # HACK:
+    set result(auth_status) ok

    # Issue login cookie if login was successful
    if { [string equal $result(auth_status) "ok"] && !$no_cookie_p && [exists_and_not_null result(user_id)] } {

+++++++++++++++++++++

Make sure you are not plugged into the internet at large, because this allows all login attempts to succeed!

svc -t /service/yourservicename

Log in.
Upgrade your site to OpenACS 5.1.2

Revert the file back to how it was (if it's in cvs, then rm tcl/authentication-procs.tcl; cvs update tcl/authentication-procs.tcl)

It should work now.

Collapse
Posted by Giancarlo Luxardo on
I got the same error upgrading to 5.1.2 with CVS. I managed to repair the server with Malte's method but renaming the file zzz-postload.tcl to zzz.tcl.postload because of this:

foreach file [glob -nocomplain ${tcllib}/*.tcl.postload] {
    ns_log Notice "postloading $file"
    source "$file"
}