[MediaWiki-l] Upgrade to MediaWiki 1.27.3 fails

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Upgrade to MediaWiki 1.27.3 fails

Victor Sudakov
Dear Colleagues,

I'm trying to upgrade my Wiki to MediaWiki 1.27.3 (FreeBSD 10.3, PostgreSQL 9.2).

The wiki/mw-config script correctly finds the existing
LocalSettings.php, I enter the upgrade key, then it says "The
environment has been checked. You can install MediaWiki."

On the next page I check "Use the same account as for installation"

On the next page, the installer asks me to enter "Name of wiki",
"Project namespace", administrator username/password etc. Why? I'm
upgrading, not installing from scratch. Everything's already there in
LocalSettings.php!

Never mind, I enter all this anew. On the next step: a database error.
Please see the traceback below.

It looks like the installer is trying to create a new wiki instead of upgrading the existing one.

Can you please help?





A database query error has occurred. This may indicate a bug in the software.

    Query:
    CREATE TABLE mwuser ( -- replace reserved word 'user'
     user_id                   INTEGER  NOT NULL  PRIMARY KEY DEFAULT nextval('user_user_id_seq'),
     user_name                 TEXT     NOT NULL  UNIQUE,
     user_real_name            TEXT,
     user_password             TEXT,
     user_newpassword          TEXT,
     user_newpass_time         TIMESTAMPTZ,
     user_token                TEXT,
     user_email                TEXT,
     user_email_token          TEXT,
     user_email_token_expires  TIMESTAMPTZ,
     user_email_authenticated  TIMESTAMPTZ,
     user_touched              TIMESTAMPTZ,
     user_registration         TIMESTAMPTZ,
     user_editcount            INTEGER,
     user_password_expires     TIMESTAMPTZ NULL
     )
    Function: DatabaseBase::sourceFile( /usr/local/www/mediawiki/maintenance/postgres/tables.sql )
    Error: 42P07 ERROR: relation "mwuser" already exists

Backtrace:

#0 /usr/local/www/mediawiki/includes/db/DatabasePostgres.php(448): DatabaseBase->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE mw...', 'DatabaseBase::s...', false)
#1 /usr/local/www/mediawiki/includes/db/Database.php(901): DatabasePostgres->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE mw...', 'DatabaseBase::s...', false)
#2 /usr/local/www/mediawiki/includes/db/Database.php(3057): DatabaseBase->query('CREATE TABLE mw...', 'DatabaseBase::s...')
#3 /usr/local/www/mediawiki/includes/db/Database.php(2978): DatabaseBase->sourceStream(Resource id #51, false, false, 'DatabaseBase::s...', false)
#4 /usr/local/www/mediawiki/includes/installer/PostgresInstaller.php(609): DatabaseBase->sourceFile('/usr/local/www/...')
#5 [internal function]: PostgresInstaller->createTables(Object(PostgresInstaller))
#6 /usr/local/www/mediawiki/includes/installer/Installer.php(1476): call_user_func(Array, Object(PostgresInstaller))
#7 /usr/local/www/mediawiki/includes/installer/WebInstallerInstall.php(45): Installer->performInstallation(Array, Array)
#8 /usr/local/www/mediawiki/includes/installer/WebInstaller.php(279): WebInstallerInstall->execute()
#9 /usr/local/www/mediawiki/mw-config/index.php(81): WebInstaller->execute(Array)
#10 /usr/local/www/mediawiki/mw-config/index.php(39): wfInstallerMain()
#11 {main}



--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Amanda Quad
Hi,
That's very interesting indeed. I would recommend trying to upgrade to 1.28 or 1.29 MediaWiki (the two latest versions). 1.27 will no longer be supported once 1.30 is released at the end of this year, and therefore bug fixes for issues like this will be seriously delayed.
However, looking at the database error, it seems to be that a new wiki is trying to be installed. Are you using the Update.php script or the Installer.php script? (You should be using the former, the latter is only for full installs).
--Amanda


On Friday, September 1, 2017, 10:30 AM, Victor Sudakov <[hidden email]> wrote:

Dear Colleagues,

I'm trying to upgrade my Wiki to MediaWiki 1.27.3 (FreeBSD 10.3, PostgreSQL 9.2).

The wiki/mw-config script correctly finds the existing
LocalSettings.php, I enter the upgrade key, then it says "The
environment has been checked. You can install MediaWiki."

On the next page I check "Use the same account as for installation"

On the next page, the installer asks me to enter "Name of wiki",
"Project namespace", administrator username/password etc. Why? I'm
upgrading, not installing from scratch. Everything's already there in
LocalSettings.php!

Never mind, I enter all this anew. On the next step: a database error.
Please see the traceback below.

It looks like the installer is trying to create a new wiki instead of upgrading the existing one.

Can you please help?





A database query error has occurred. This may indicate a bug in the software.

    Query:
    CREATE TABLE mwuser ( -- replace reserved word 'user'
    user_id                  INTEGER  NOT NULL  PRIMARY KEY DEFAULT nextval('user_user_id_seq'),
    user_name                TEXT    NOT NULL  UNIQUE,
    user_real_name            TEXT,
    user_password            TEXT,
    user_newpassword          TEXT,
    user_newpass_time        TIMESTAMPTZ,
    user_token                TEXT,
    user_email                TEXT,
    user_email_token          TEXT,
    user_email_token_expires  TIMESTAMPTZ,
    user_email_authenticated  TIMESTAMPTZ,
    user_touched              TIMESTAMPTZ,
    user_registration        TIMESTAMPTZ,
    user_editcount            INTEGER,
    user_password_expires    TIMESTAMPTZ NULL
    )
    Function: DatabaseBase::sourceFile( /usr/local/www/mediawiki/maintenance/postgres/tables.sql )
    Error: 42P07 ERROR: relation "mwuser" already exists

Backtrace:

#0 /usr/local/www/mediawiki/includes/db/DatabasePostgres.php(448): DatabaseBase->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE mw...', 'DatabaseBase::s...', false)
#1 /usr/local/www/mediawiki/includes/db/Database.php(901): DatabasePostgres->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE mw...', 'DatabaseBase::s...', false)
#2 /usr/local/www/mediawiki/includes/db/Database.php(3057): DatabaseBase->query('CREATE TABLE mw...', 'DatabaseBase::s...')
#3 /usr/local/www/mediawiki/includes/db/Database.php(2978): DatabaseBase->sourceStream(Resource id #51, false, false, 'DatabaseBase::s...', false)
#4 /usr/local/www/mediawiki/includes/installer/PostgresInstaller.php(609): DatabaseBase->sourceFile('/usr/local/www/...')
#5 [internal function]: PostgresInstaller->createTables(Object(PostgresInstaller))
#6 /usr/local/www/mediawiki/includes/installer/Installer.php(1476): call_user_func(Array, Object(PostgresInstaller))
#7 /usr/local/www/mediawiki/includes/installer/WebInstallerInstall.php(45): Installer->performInstallation(Array, Array)
#8 /usr/local/www/mediawiki/includes/installer/WebInstaller.php(279): WebInstallerInstall->execute()
#9 /usr/local/www/mediawiki/mw-config/index.php(81): WebInstaller->execute(Array)
#10 /usr/local/www/mediawiki/mw-config/index.php(39): wfInstallerMain()
#11 {main}



--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Chad
In reply to this post by Victor Sudakov
Two things here:

1) The installer gives you a chance to change these settings on upgrade.
Not all should be changeable though I suppose--there's no real way to
differentiate though...maybe an upgrade shouldn't allow changing them at
all...

2) That sounds like the postgres installer should wrap its table creations
with something like IF NOT EXISTS.

Neither are really specific to 1.27.3--or Postgres for that matter, beyond
the bug probably only being in its schema. Basically MediaWiki from 1.17.0
and beyond (new installer) would have this issue.

-Chad

On Fri, Sep 1, 2017 at 7:30 AM Victor Sudakov <[hidden email]> wrote:

> Dear Colleagues,
>
> I'm trying to upgrade my Wiki to MediaWiki 1.27.3 (FreeBSD 10.3,
> PostgreSQL 9.2).
>
> The wiki/mw-config script correctly finds the existing
> LocalSettings.php, I enter the upgrade key, then it says "The
> environment has been checked. You can install MediaWiki."
>
> On the next page I check "Use the same account as for installation"
>
> On the next page, the installer asks me to enter "Name of wiki",
> "Project namespace", administrator username/password etc. Why? I'm
> upgrading, not installing from scratch. Everything's already there in
> LocalSettings.php!
>
> Never mind, I enter all this anew. On the next step: a database error.
> Please see the traceback below.
>
> It looks like the installer is trying to create a new wiki instead of
> upgrading the existing one.
>
> Can you please help?
>
>
>
>
>
> A database query error has occurred. This may indicate a bug in the
> software.
>
>     Query:
>     CREATE TABLE mwuser ( -- replace reserved word 'user'
>      user_id                   INTEGER  NOT NULL  PRIMARY KEY DEFAULT
> nextval('user_user_id_seq'),
>      user_name                 TEXT     NOT NULL  UNIQUE,
>      user_real_name            TEXT,
>      user_password             TEXT,
>      user_newpassword          TEXT,
>      user_newpass_time         TIMESTAMPTZ,
>      user_token                TEXT,
>      user_email                TEXT,
>      user_email_token          TEXT,
>      user_email_token_expires  TIMESTAMPTZ,
>      user_email_authenticated  TIMESTAMPTZ,
>      user_touched              TIMESTAMPTZ,
>      user_registration         TIMESTAMPTZ,
>      user_editcount            INTEGER,
>      user_password_expires     TIMESTAMPTZ NULL
>      )
>     Function: DatabaseBase::sourceFile(
> /usr/local/www/mediawiki/maintenance/postgres/tables.sql )
>     Error: 42P07 ERROR: relation "mwuser" already exists
>
> Backtrace:
>
> #0 /usr/local/www/mediawiki/includes/db/DatabasePostgres.php(448):
> DatabaseBase->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE
> mw...', 'DatabaseBase::s...', false)
> #1 /usr/local/www/mediawiki/includes/db/Database.php(901):
> DatabasePostgres->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE
> TABLE mw...', 'DatabaseBase::s...', false)
> #2 /usr/local/www/mediawiki/includes/db/Database.php(3057):
> DatabaseBase->query('CREATE TABLE mw...', 'DatabaseBase::s...')
> #3 /usr/local/www/mediawiki/includes/db/Database.php(2978):
> DatabaseBase->sourceStream(Resource id #51, false, false,
> 'DatabaseBase::s...', false)
> #4 /usr/local/www/mediawiki/includes/installer/PostgresInstaller.php(609):
> DatabaseBase->sourceFile('/usr/local/www/...')
> #5 [internal function]:
> PostgresInstaller->createTables(Object(PostgresInstaller))
> #6 /usr/local/www/mediawiki/includes/installer/Installer.php(1476):
> call_user_func(Array, Object(PostgresInstaller))
> #7
> /usr/local/www/mediawiki/includes/installer/WebInstallerInstall.php(45):
> Installer->performInstallation(Array, Array)
> #8 /usr/local/www/mediawiki/includes/installer/WebInstaller.php(279):
> WebInstallerInstall->execute()
> #9 /usr/local/www/mediawiki/mw-config/index.php(81):
> WebInstaller->execute(Array)
> #10 /usr/local/www/mediawiki/mw-config/index.php(39): wfInstallerMain()
> #11 {main}
>
>
>
> --
> Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
> AS43859
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Chad
I spoke too soon...(2) is patently false. I imagine there's a bug in
detecting if tables.sql should be used vs. doing the updaters.

-Chad

On Fri, Sep 1, 2017 at 10:04 AM Chad <[hidden email]> wrote:

> Two things here:
>
> 1) The installer gives you a chance to change these settings on upgrade.
> Not all should be changeable though I suppose--there's no real way to
> differentiate though...maybe an upgrade shouldn't allow changing them at
> all...
>
> 2) That sounds like the postgres installer should wrap its table creations
> with something like IF NOT EXISTS.
>
> Neither are really specific to 1.27.3--or Postgres for that matter, beyond
> the bug probably only being in its schema. Basically MediaWiki from 1.17.0
> and beyond (new installer) would have this issue.
>
> -Chad
>
>
> On Fri, Sep 1, 2017 at 7:30 AM Victor Sudakov <[hidden email]> wrote:
>
>> Dear Colleagues,
>>
>> I'm trying to upgrade my Wiki to MediaWiki 1.27.3 (FreeBSD 10.3,
>> PostgreSQL 9.2).
>>
>> The wiki/mw-config script correctly finds the existing
>> LocalSettings.php, I enter the upgrade key, then it says "The
>> environment has been checked. You can install MediaWiki."
>>
>> On the next page I check "Use the same account as for installation"
>>
>> On the next page, the installer asks me to enter "Name of wiki",
>> "Project namespace", administrator username/password etc. Why? I'm
>> upgrading, not installing from scratch. Everything's already there in
>> LocalSettings.php!
>>
>> Never mind, I enter all this anew. On the next step: a database error.
>> Please see the traceback below.
>>
>> It looks like the installer is trying to create a new wiki instead of
>> upgrading the existing one.
>>
>> Can you please help?
>>
>>
>>
>>
>>
>> A database query error has occurred. This may indicate a bug in the
>> software.
>>
>>     Query:
>>     CREATE TABLE mwuser ( -- replace reserved word 'user'
>>      user_id                   INTEGER  NOT NULL  PRIMARY KEY DEFAULT
>> nextval('user_user_id_seq'),
>>      user_name                 TEXT     NOT NULL  UNIQUE,
>>      user_real_name            TEXT,
>>      user_password             TEXT,
>>      user_newpassword          TEXT,
>>      user_newpass_time         TIMESTAMPTZ,
>>      user_token                TEXT,
>>      user_email                TEXT,
>>      user_email_token          TEXT,
>>      user_email_token_expires  TIMESTAMPTZ,
>>      user_email_authenticated  TIMESTAMPTZ,
>>      user_touched              TIMESTAMPTZ,
>>      user_registration         TIMESTAMPTZ,
>>      user_editcount            INTEGER,
>>      user_password_expires     TIMESTAMPTZ NULL
>>      )
>>     Function: DatabaseBase::sourceFile(
>> /usr/local/www/mediawiki/maintenance/postgres/tables.sql )
>>     Error: 42P07 ERROR: relation "mwuser" already exists
>>
>> Backtrace:
>>
>> #0 /usr/local/www/mediawiki/includes/db/DatabasePostgres.php(448):
>> DatabaseBase->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE TABLE
>> mw...', 'DatabaseBase::s...', false)
>> #1 /usr/local/www/mediawiki/includes/db/Database.php(901):
>> DatabasePostgres->reportQueryError('ERROR:  relatio...', '42P07', 'CREATE
>> TABLE mw...', 'DatabaseBase::s...', false)
>> #2 /usr/local/www/mediawiki/includes/db/Database.php(3057):
>> DatabaseBase->query('CREATE TABLE mw...', 'DatabaseBase::s...')
>> #3 /usr/local/www/mediawiki/includes/db/Database.php(2978):
>> DatabaseBase->sourceStream(Resource id #51, false, false,
>> 'DatabaseBase::s...', false)
>> #4
>> /usr/local/www/mediawiki/includes/installer/PostgresInstaller.php(609):
>> DatabaseBase->sourceFile('/usr/local/www/...')
>> #5 [internal function]:
>> PostgresInstaller->createTables(Object(PostgresInstaller))
>> #6 /usr/local/www/mediawiki/includes/installer/Installer.php(1476):
>> call_user_func(Array, Object(PostgresInstaller))
>> #7
>> /usr/local/www/mediawiki/includes/installer/WebInstallerInstall.php(45):
>> Installer->performInstallation(Array, Array)
>> #8 /usr/local/www/mediawiki/includes/installer/WebInstaller.php(279):
>> WebInstallerInstall->execute()
>> #9 /usr/local/www/mediawiki/mw-config/index.php(81):
>> WebInstaller->execute(Array)
>> #10 /usr/local/www/mediawiki/mw-config/index.php(39): wfInstallerMain()
>> #11 {main}
>>
>>
>>
>> --
>> Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
>> AS43859
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Tom Hutchison
1.27.x is an LTS version. Supported till June of 2019.

Tom

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Victor Sudakov
In reply to this post by Amanda Quad
Amanda Quad wrote:
> Hi,
> That's very interesting indeed. I would recommend trying to upgrade
> to 1.28 or 1.29 MediaWiki (the two latest versions). 1.27 will no
> longer be supported once 1.30 is released at the end of this year,
> and therefore bug fixes for issues like this will be seriously
> delayed.  However, looking at the database error, it seems to be
> that a new wiki is trying to be installed. Are you using the
> Update.php script or the Installer.php script? (You should be using
> the former, the latter is only for full installs).

Dear Amanda,

Thanks a lot for your advice. I have installed mediawiki129-1.29.1
and the upgrade went smoothly.

The Web-based installer just said:

"There are MediaWiki tables in this database. To upgrade them to
MediaWiki 1.29.1, click Continue."

and no more questions, pure magick.

Now I'm stuck with a Wiki with missing skins, but it's already a
different matter, I hope to fix that myself per the provided
instructions.


--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Victor Sudakov
In reply to this post by Tom Hutchison
Tom wrote:
> 1.27.x is an LTS version. Supported till June of 2019.
>

Then perhaps, it would make sense to merge the upgrade procedure from 1.29,
because clearly there is a bug in 1.27.

--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Chad
On Fri, Sep 1, 2017 at 8:10 PM Victor Sudakov <[hidden email]> wrote:

> Tom wrote:
> > 1.27.x is an LTS version. Supported till June of 2019.
> >
>
> Then perhaps, it would make sense to merge the upgrade procedure from 1.29,
> because clearly there is a bug in 1.27.
>
>
There haven't been any major changes to the upgrade code in quite a few
releases....

-Chad
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to MediaWiki 1.27.3 fails

Victor Sudakov
Chad wrote:

>
> > Tom wrote:
> > > 1.27.x is an LTS version. Supported till June of 2019.
> > >
> >
> > Then perhaps, it would make sense to merge the upgrade procedure from 1.29,
> > because clearly there is a bug in 1.27.
> >
> >
> There haven't been any major changes to the upgrade code in quite a few
> releases....

Yet, the upgrade from 1.19 to 1.27.3 failed miserably, while the
upgrade from the same 1.19 to 1.29.1 was a complete success.

--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l