Forum OpenACS Development: Errors Upgrading from 5.5 to 5.8 (:acs::pageroot": no such variable)

I'm upgrading my (old 😊 ) openacs site (from oacs 5.5 to oacs 5.8) through apm (install or Upgrade From OpenACS Repository).

I have an error in bootstrapping preceeded by an error in acs-tcl upgrading (At least that's what I think).

Firstly an error in Tcl Library 5.8.1d1 (::acs::pageroot no such variable):

[22/Sep/2013:19:11:08][82617.130633728][-default:5-] Notice:

  • Tcl Library 5.8.1d1 ready for installation.
    [22/Sep/2013:19:11:08][82617.130633728][-default:5-] Notice: -- creating per thread sequence table
    [22/Sep/2013:19:11:08][82617.130633728][-default:5-] Error: GET http://localhost:8080/acs-admin/install/install-3?repository%5furl=http%3a%2f%2fopenacs%2eorg%2frepository%2f5%2d8%2f
    referred by "http://localhost:8080/acs-admin/install/install-2?repository_url=http%3A%2F%2Fopenacs.org%2Frepository%2F5-8%2F&package_key=acs-tcl";
    can't read "::acs::pageroot": no such variable
    while executing
    "split $::acs::pageroot "/""
    (procedure "apm_guess_file_type" line 3)
    invoked from within
    "apm_guess_file_type $package_key $rel_path"
    (procedure "apm_get_package_files" line 19)
    invoked from within
    "apm_get_package_files -file_types $types_to_retrieve -package_path $package_path -package_key $package_key"
    (procedure "apm_data_model_scripts_find" line 15)
    invoked from within
    "apm_data_model_scripts_find -upgrade_from_version_name $initial_version_name -upgrade_to_version_name $final_version_name -package_path $package_pa..."

    And then in start-up process:
    [22/Sep/2013:19:13:22][82658.2034291072][-main-] Notice: Bootstrap: Loading acs-tcl
    [22/Sep/2013:19:13:22][82658.2034291072][-main-] Error: Bootstrap: Server startup failed: Error during bootstrapping
    can't read "::acs::pageroot": no such variable
    while executing
    "split $::acs::pageroot "/""
    (procedure "apm_guess_file_type" line 3)
    invoked from within
    "apm_guess_file_type $package_key $rel_path"
    (procedure "apm_get_package_files" line 19)
    invoked from within
    "apm_get_package_files -package_key $package_key -file_types $file_types"
    (procedure "apm_bootstrap_load_libraries" line 20)
    invoked from within
    "apm_bootstrap_load_libraries -procs acs-tcl"

    I did it (the upgrade) twice (Changing order when upgrade packages) but I din't how to find the problem

    Any ideas?

  • Dear Cesareo

    probably, you did not upgrade the toplevel tcl file (on cvs checkouts openacs-4/tcl/).

    In order to get the released version from the oacs-5-8 branch (which is in the openacs-5-8.tar.gz bundle), use the tag "openacs-5-8-0-final". Otherwise you get the latest version from the oacs-5-8 branch that will turn at some time into the next release. The latest from oacs-5-8 is working fine either, but contains more than thousand file changes, mostly doe to work on getting rid of deprecated calls.

    all the best
    -gustaf neumann

    Hi!

    Ah! Ok, so I should use cvs checkout instead of apm manager. I'll try to do it again (at least to get firstly a 5.7 version)

    Thanks so much for your work in this version, it seems very promising !!

    Cesáreo

    yep, tar-file or cvs is fine, this is a (rare) change not part of the packages.
    Hi (again 😊 )

    I'm trying to upgrade again but from a 5.8 tar.gz (http://www.openacs.org/news/item?item_id=4081935 using "Download")

    So, I overwrite openacs files and run "Upgrade from Local". I'm finding this error:

    function apm__register_parameter [1]

    (It appears in several packages)

    I tried to do my upgrade step by step through repository and I had same problem. It must be something in my setup, anybody with this error?

    [1] Log results:

    Error: Ns_PgExec: result status: 7 message: ERROR: function apm__register_parameter(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
    LINE 3: select apm__register_parameter(
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.

    The sql function apm__register_parameter/10 was introduced between OpenACS 5.5.1 and 5.6 in 2010, so the kernel upgrade is missing. If i see correctly, this function is defined in the upgrade script: acs-kernel/sql/postgresql/upgrade/upgrade-5.6.0d6-5.6.0d7.sql

    What one should do in general:
    - download the tar file + overwrite installation (or make a separate directory tree and adapt the aolserver/naviserver config file)
    - run the upgrade scripts for the kernel (e.g. via acs-admin/apm/packages-install, upgrade just kernel)
    - restart the server and do acs-admin/apm/packages-install for the rest.

    Interestingly, Victor had the problem with upgrading openacs.org: http://cvs.openacs.org/changelog/OpenACS/?cs=MAIN%3Avictorg%3A20130809134838
    but we thought, that might be a local installation mismatch...

    When you attempt a kernel upgrade from you 5.5 installation to 5.8, does the installer list the mentioned upgrade script?

    Hi Gustaf

    Firstly, thanks for the premium support (Sat & Sun included 😊 ).

    I re-tried again, because I can remove what I've done (remove my private git branch and dump, again, dmp file). So I did:
    1. Unpack (tar xvfz openacs-5.8.0.tar.gz
    2. Overwrite installation (I mean cp -R openacs-5.8.0/ openacs-dev)
    3. Copy my config.tcl file (with my set up)
    4. Go to Upgrade from Local (http://www.mysite.com/acs-admin/install/install?upgrade_p=1)

    And
    1. Upgrade Kernel
    2. Update acs-tcl (and its dependence bootStrap Installer)
    3. And that's the error again (see below)

    Bootstrap did go fine but tcl didn't. Might it be something with i18messages (but I tried to remove all lang-xml files and same behaviour)

    Thans a lot for your attention

    Thans a lot for your attention

    -------- Logs ----------
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice:

    Installed Bootstrap Installer, version 5.8.0.

    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice:

    Package enabled.
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: Installing acs-tcl
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: <h3>Installing Tcl Library 5.8.0</h3>
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: reading /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml in ISO-8859-1
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: encoding: loaded: iso8859-1
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: Loading messages in file /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.en_US.ISO-8859-1.xml
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: reading /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.gl_ES.ISO-8859-1.xml in ISO-8859-1
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: Loading messages in file /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.gl_ES.ISO-8859-1.xml
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: reading /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.es_ES.ISO-8859-1.xml in ISO-8859-1
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Notice: Loading messages in file /Users/cesareox/Documents/openacs-dev/packages/acs-tcl/catalog/acs-tcl.es_ES.ISO-8859-1.xml
    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Error: Ns_PgExec: result status: 7 message: ERROR: function apm__register_parameter(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
    LINE 3: select apm__register_parameter(
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.

    [29/Sep/2013:13:25:09][40472.188243968][-default:10-] Error: apm_package_install: Error installing Tcl Library version 5.8.0: Database operation "0or1row" failed
    (exception ERROR, "ERROR: function apm__register_parameter(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
    LINE 3: select apm__register_parameter(
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.
    ")

    Database operation "0or1row" failed
    (exception ERROR, "ERROR: function apm__register_parameter(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
    LINE 3: select apm__register_parameter(
    ^
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.

    During upgrade of the Kernel, the sql function apm__register_parameter/10 is supposed to be installed.
    is there any reason, why you used /acs-admin/install/install?upgrade_p=1 and not acs-admin/apm/packages-install?

    When going to acs-admin/apm/packages-install, click on ACS Kernel, then you will be forwarded to a page acs-admin/apm/packages-install-3, where it says "Select what data files to load for Kernel ...". There, the mentioned upgrade script should be listed. When you continue there, you should see the following lines in the log:

    ... Notice: ***Installing Kernel ...
    ... Notice: - Installing data model for Kernel ...
    ... Notice: - Loading data model ....upgrade...
    ... Notice: - Loading data model ....upgrade...
    ...
    ... Notice: Installed Kernel, version ....

    I can't exclude that "upgrade from local" might be broken.

    Please, check, what upgrade scripts are loaded in your installation. The easy fix for you installation is to run the upgrade script manually, but we should aim for a general solution, maybe someone else has the same problem.

    -gustaf

    Collapse
    Posted by Cesareo Garci­a Rodicio on
    I use /acs-admin/install/install?upgrade_p=1 instead of acs-admin/apm/packages-install because "Install Software" link in Main Admin Page (acs-admin). So I think that the only reason may be lazyness 😊

    I've just tried using acs-admin/apm/packages-install and Kernel was installed correctly but after that, when It was installing acs-tcl same error occurred.

    I also realized that my Kernel version was Kernel 5.5.0d6 (not 5.5.1) so I did a Kernel upgrade (to 5.5.1) and tried again but ... same error

    BUT I'll tried again with these strategy ( I have read that it is the recommended way but my lazyness comes out 😊 ).

    I'll do an "Upgrade from repository" to get my dev server to 5.7. And, after that I'll try again with "Upgrade from local" to get 5.8.0 work.

    I'll keep you informed to know what it the "general solution" (I think it could be "have a minimum X version installed").

    If you want to look for testing an "straight upgrade from 5.5.1 to 5.8" I can do it with my dev server.

    Collapse
    Posted by Cesareo Garci­a Rodicio on
    Hi!

    After some weeks I'm trying to update my server again. To look for a general solution (I mean, soft upgrade via upgrade repository, I did not use cvs method) I did:
    - Upgrade vía http://localhost:8080/acs-admin/install/ (Upgrade From Repository)
    - And the same error came out (sql function apm__register_parameter stuff)

    In
    http://MYSERVER/acs-admin/apm/version-files?version_id=146558
    I saw upgrade-5.6.0d6-5.6.0d7.sql

    This error came out firstly when I tried to upgrade tclwebtest

    --------- Logs --------------
    Notice: Extracting the .info file (acs-automated-testing/acs-automated-testing.info)...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice:

  • Extracting files into the filesytem.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice:
  • Automated Testing 5.6.0 ready for installation.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: <h3>Installing Automated Testing 5.6.0</h3>
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loading packages/acs-automated-testing/tcl/aa-test-procs.tcl...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loaded packages/acs-automated-testing/tcl/aa-test-procs.tcl.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loading packages/acs-automated-testing/tcl/example-procs.tcl...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loaded packages/acs-automated-testing/tcl/example-procs.tcl.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loading packages/acs-automated-testing/tcl/filter-procs.tcl...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loaded packages/acs-automated-testing/tcl/filter-procs.tcl.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loading packages/acs-automated-testing/tcl/selenium-procs.tcl...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loaded packages/acs-automated-testing/tcl/selenium-procs.tcl.
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loading packages/acs-automated-testing/tcl/tclwebtest-procs.tcl...
    [18/Oct/2013:18:23:28][53661.279633920][-default:6-] Notice: Loaded packages/acs-automated-testing/tcl/tclwebtest-procs.tcl.
    ERROR: function apm__register_parameter(unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist at character 15
    HINT: No function matches the given name and argument types. You might need to add explicit type casts.
    STATEMENT:

    select apm__register_parameter(
    NULL,
    'acs-automated-testing',
    'SeleniumRcBrowsers',
    'Browsers to test with. Default *firefox',
    'instance',
    'string',
    ----- End log apm__register_parameter Thing ----

    After that everything seems to be broken (a lot of errors).

    **Side Note** (I think it is off this topic but just in case):

    1. I couldn't upgrade Localization and Subsite Packages
    Package Version Error Message
    Localization 5.6.0 Requires ref-countries 5.6.0; ref-language 5.6.0
    Subsite 5.6.0 Requires acs-lang 5.6.0

    2. I had an error (I saw it when installing xoctl-core)

    [18/Oct/2013:18:56:49][54041.2070167936][-main-] Notice: --***** Could not retrieve argument name for survey_response__initial_user_id argument 1 from line 'p_response_id alias for $1;' in
    declare
    p_response_id alias for $1;
    v_user_id integer;
    begin
    select into v_user_id o.creation_user
    from acs_objects o,
    survey_responses s
    where
    object_id = coalesce(s.initial_response_id, s.response_id)
    and s.response_id = p_response_id;
    return v_user_id;
    end;'
    [18/Oct/2013:18:56:49][54041.2070167936][-main-] Notice: We cannot handle object_name = 'set' in this version, ::xo::db::sql::organization ::xo::db::Class->dbproc_nonposargs (0ms)
    [18/Oct/2013:18:56:49][54041.2070167936][-main-] Notice: ---- no aliases for ab_contact__delete_orphan_address/1

  • Collapse
    Posted by Gustaf Neumann on
    If one wants to upgrade the OpenACS kernel of a pre-existing installation from 5.5 to 5.8, and chooses to "install/upgrade from repository", then one stays in the same OpenACS branch (like oacs-5-5). The installer offers newer versions from the same branch. So, i am not sure from what state to which other state you try to proceed.

    When installing new version of the kernel, one has to use either the tar file or a CVS checkout.

    In case you have a broken update (e.g. the kernel reports to be in openacs 5.8, and you do not have apm__register_parameter/10 in your database), then one can either fix the database, or try to figure out, what went wrong during the upgrade. Fixing means to source the upgrade file mentioned above with "psql -f ..."

    In order to try to find the cause of the problem you are experiencing, one needs the old state of the database (e.g. a backup) and continue from there, look whether the upgrade script in question is sourced when upgrading the kernel, etc.

    The message from xoctl-core is not an error, but a warning and says that you can't call that particular function from survey via the ::xo::db interface, something you do not want probably anyhow.

    Collapse
    Posted by Cesareo Garci­a Rodicio on
    Hi

    Ok, I was doing totally wrong 😊. I thought I could upgrade via "upgrade from repository" between main releases (i.e 5.5 to 5.6) (My lazyness took my to thing that changing url arguments, upgrade would be faster 😊 )

    I'll try to upgrade using CVS checkout / tar files between releases. Firstly to upgrade to 5.6, then 5.7 and finally to 5.8. I'll keep my results here

    Thanks so much!