Topic on Project:Support desk

500 Internal Server Error after upgrade

10
AmazingTrans (talkcontribs)

Hi there,

I tried upgrading from Mediawiki 1.25.1 to 1.6.0, and when i tried accessing the webpage i have the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

What would be the cause of such error?

88.130.91.250 (talkcontribs)

An error 500 is usually happening in the webserver. That means you should find more information about this error in the webserver error log.

What does it say?

AmazingTrans (talkcontribs)

When i tried accessing the IP address, i get something like A database query error has occurred. This may indicate a bug in the software.

Then i tried access the IP/Main_page, The apache errorlog shows the following :


Fri Dec 11 19:32:11.498919 2015] [mpm_prefork:notice] [pid 1155] AH00169: caught SIGTERM, shutting down

[Fri Dec 11 19:32:37.666758 2015] [ssl:warn] [pid 1636:tid 140235158226752] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name

[Fri Dec 11 19:32:37.701530 2015] [ssl:warn] [pid 1637:tid 140235158226752] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name

[Fri Dec 11 19:32:37.701638 2015] [lbmethod_heartbeat:notice] [pid 1637:tid 140235158226752] AH02282: No slotmem from mod_heartmonitor

[Fri Dec 11 19:32:37.732821 2015] [mpm_event:notice] [pid 1637:tid 140235158226752] AH00489: Apache/2.4.17 (Unix) OpenSSL/1.0.1p configured -- resuming normal operations

[Fri Dec 11 19:32:37.732906 2015] [core:notice] [pid 1637:tid 140235158226752] AH00094: Command line: '/opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf'

[Fri Dec 11 19:34:30.919422 2015] [core:error] [pid 1645:tid 140234942203648] [client 192.168.184.1:62862] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration er$

[Fri Dec 11 19:34:38.098827 2015] [core:error] [pid 1646:tid 140234933810944] [client 192.168.184.1:62864] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration er$

Therefore, i tried running the maintenance/update.php again and i have the following:

Turning off Content Handler DB fields for this part of upgrade.
...ipblocks table does not exist, skipping new field patch.
...ipblocks table does not exist, skipping new field patch.
...already have interwiki table
[9b0cba53] [no req]   MWException from line 357 of /opt/bitnami/apps/mediawiki/htdocs/includes/installer/MysqlUpdater.php: Missing rc_timestamp field of recentchanges table. Should not happen.
Backtrace:
#0 [internal function]: MysqlUpdater->doIndexUpdate()
#1 /opt/bitnami/apps/mediawiki/htdocs/includes/installer/DatabaseUpdater.php(443): call_user_func_array(array, array)
#2 /opt/bitnami/apps/mediawiki/htdocs/includes/installer/DatabaseUpdater.php(404): DatabaseUpdater->runUpdates(array, boolean)
#3 /opt/bitnami/apps/mediawiki/htdocs/maintenance/update.php(172): DatabaseUpdater->doUpdates(array)
#4 /opt/bitnami/apps/mediawiki/htdocs/maintenance/doMaintenance.php(103): UpdateMediaWiki->execute()
#5 /opt/bitnami/apps/mediawiki/htdocs/maintenance/update.php(216): require_once(string)
#6 {main}
bitnami@linux:/opt/bitnami/apps/mediawiki/htdocs/maintenance$
88.130.91.250 (talkcontribs)
AmazingTrans (talkcontribs)

I did that, and i got the following error during maintenance/update.php. Now i am wondering, when i restore the wiki files, i actually copy the entire folder htdocs from v1.25.1 to v1.26.0.

Maybe I shouldn't do that?

<pre>
bitnami@linux:/opt/bitnami/apps/mediawiki/htdocs$ sudo php maintenance/update.php
MediaWiki 1.25.1 Updater
Your composer.lock file is up to date with current dependencies!
Going to run database updates for bitnami_mediawiki-tda_
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ... 4                                                                                    0
Turning off Content Handler DB fields for this part of upgrade.
...ipblocks table does not exist, skipping new field patch.
...ipblocks table does not exist, skipping new field patch.
Creating interwiki table ...done.
Adding default interwiki definitions ...A database query error has occurred.
Query: REPLACE INTO `tda_interwiki` (iw_prefix,iw_url,iw_local,iw_api) VALUES
 ('acronym','http://www.acronymfinder.com/~/search/af.aspx?string=exact&Acronym=$1',0,''),
 ('advogato','http://www.advogato.org/$1',0,''),
 ('arxiv','http://www.arxiv.org/abs/$1',0,''),
 ('c2find','http://c2.com/cgi/wiki?FindPage&value=$1',0,''),
 ('cache','http://www.google.com/search?q=cache:$1',0,''),
 ('commons','https://commons.wikimedia.org/wiki/$1',0,'https://commons.wikimedia.org/w/api.php'),
 ('dictionary','http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1',0,''),
 ('docbook','http://wiki.docbook.org/$1',0,''),
 ('doi','http://dx.doi.org/$1',0,''),
 ('drumcorpswiki','http://www.drumcorpswiki.com/$1',0,'http://drumcorpswiki.com/api.php'),
 ('dwjwiki','http://www.suberic.net/cgi-bin/dwj/wiki.cgi?$1',0,''),
 ('elibre','http://enciclopedia.us.es/index.php/$1',0,'http://enciclopedia.us.es/api.php'),
 ('emacswiki','http://www.emacswiki.org/cgi-bin/wiki.pl?$1',0,''),
 ('foldoc','http://foldoc.org/?$1',0,''),
 ('foxwiki','http://fox.wikis.com/wc.dll?Wiki~$1',0,''),
 ('freebsdman','http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query=$1',0,''),
 ('gej','http://www.esperanto.de/dej.malnova/aktivikio.pl?$1',0,''),
 ('gentoo-wiki','http://gentoo-wiki.com/$1',0,''),
 ('google','http://www.google.com/search?q=$1',0,''),
 ('googlegroups','http://groups.google.com/groups?q=$1',0,''),
 ('hammondwiki','http://www.dairiki.org/HammondWiki/$1',0,''),
 ('hrwiki','http://www.hrwiki.org/wiki/$1',0,'http://www.hrwiki.org/w/api.php'),
 ('imdb','http://www.imdb.com/find?q=$1&tt=on',0,''),
 ('jargonfile','http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect=$1',0,''),
 ('kmwiki','http://kmwiki.wikispaces.com/$1',0,''),
 ('linuxwiki','http://linuxwiki.de/$1',0,''),
 ('lojban','http://www.lojban.org/tiki/tiki-index.php?page=$1',0,''),
 ('lqwiki','http://wiki.linuxquestions.org/wiki/$1',0,''),
 ('lugkr','http://www.lug-kr.de/wiki/$1',0,''),
 ('meatball','http://www.usemod.com/cgi-bin/mb.pl?$1',0,''),
 ('mediawikiwiki','https://www.mediawiki.org/wiki/$1',0,'https://www.mediawiki.org/w/api.php'),
 ('mediazilla','https://bugzilla.wikimedia.org/$1',0,''),
 ('memoryalpha','http://en.memory-alpha.org/wiki/$1',0,'http://en.memory-alpha.org/api.php'),
 ('metawiki','http://sunir.org/apps/meta.pl?$1',0,''),
 ('metawikimedia','https://meta.wikimedia.org/wiki/$1',0,'https://meta.wikimedia.org/w/api.php'),
 ('mozillawiki','http://wiki.mozilla.org/$1',0,'https://wiki.mozilla.org/api.php'),
 ('mw','https://www.mediawiki.org/wiki/$1',0,'https://www.mediawiki.org/w/api.php'),
 ('oeis','http://oeis.org/$1',0,''),
 ('openwiki','http://openwiki.com/ow.asp?$1',0,''),
 ('ppr','http://c2.com/cgi/wiki?$1',0,''),
 ('pythoninfo','http://wiki.python.org/moin/$1',0,''),
 ('rfc','http://www.rfc-editor.org/rfc/rfc$1.txt',0,''),
 ('s23wiki','http://s23.org/wiki/$1',0,'http://s23.org/w/api.php'),
 ('seattlewireless','http://seattlewireless.net/$1',0,''),
 ('senseislibrary','http://senseis.xmp.net/?$1',0,''),
 ('shoutwiki','http://www.shoutwiki.com/wiki/$1',0,'http://www.shoutwiki.com/w/api.php'),
 ('sourceforge','http://sourceforge.net/$1',0,''),
 ('sourcewatch','http://www.sourcewatch.org/index.php?title=$1',0,'http://www.sourcewatch.org/api.php'),
 ('squeak','http://wiki.squeak.org/squeak/$1',0,''),
 ('tejo','http://www.tejo.org/vikio/$1',0,''),
 ('tmbw','http://www.tmbw.net/wiki/$1',0,'http://tmbw.net/wiki/api.php'),
 ('tmnet','http://www.technomanifestos.net/?$1',0,''),
 ('theopedia','http://www.theopedia.com/$1',0,''),
 ('twiki','http://twiki.org/cgi-bin/view/$1',0,''),
 ('uea','http://uea.org/vikio/index.php/$1',0,'http://uea.org/vikio/api.php'),
 ('uncyclopedia','http://en.uncyclopedia.co/wiki/$1',0,'http://en.uncyclopedia.co/w/api.php'),
 ('unreal','http://wiki.beyondunreal.com/$1',0,'http://wiki.beyondunreal.com/w/api.php'),
 ('usemod','http://www.usemod.com/cgi-bin/wiki.pl?$1',0,''),
 ('webseitzwiki','http://webseitz.fluxent.com/wiki/$1',0,''),
 ('wiki','http://c2.com/cgi/wiki?$1',0,''),
 ('wikia','http://www.wikia.com/wiki/$1',0,''),
 ('wikibooks','https://en.wikibooks.org/wiki/$1',0,'https://en.wikibooks.org/w/api.php'),
 ('wikif1','http://www.wikif1.org/$1',0,''),
 ('wikihow','http://www.wikihow.com/$1',0,'http://www.wikihow.com/api.php'),
 ('wikinfo','http://wikinfo.co/English/index.php/$1',0,''),
 ('wikimedia','https://wikimediafoundation.org/wiki/$1',0,'https://wikimediafoundation.org/w/api.php'),
 ('wikinews','https://en.wikinews.org/wiki/$1',0,'https://en.wikinews.org/w/api.php'),
 ('wikipedia','https://en.wikipedia.org/wiki/$1',0,'https://en.wikipedia.org/w/api.php'),
 ('wikiquote','https://en.wikiquote.org/wiki/$1',0,'https://en.wikiquote.org/w/api.php'),
 ('wikisource','https://wikisource.org/wiki/$1',0,'https://wikisource.org/w/api.php'),
 ('wikispecies','https://species.wikimedia.org/wiki/$1',0,'https://species.wikimedia.org/w/api.php'),
 ('wikiversity','https://en.wikiversity.org/wiki/$1',0,'https://en.wikiversity.org/w/api.php'),
 ('wikivoyage','https://en.wikivoyage.org/wiki/$1',0,'https://en.wikivoyage.org/w/api.php'),
 ('wikt','https://en.wiktionary.org/wiki/$1',0,'https://en.wiktionary.org/w/api.php'),
 ('wiktionary','https://en.wiktionary.org/wiki/$1',0,'https://en.wiktionary.org/w/api.php')
Function: DatabaseBase::sourceFile( /opt/bitnami/apps/mediawiki/htdocs/maintenance/interwiki.sql )
Error: 1054 Unknown column 'iw_api' in 'field list' (localhost:3306)
88.130.91.250 (talkcontribs)

The ouput says it uses the database "bitnami_mediawiki-tda_". And then it tells you that a number of tables, which should in fact be there, are missing.

Can you please check, if the database name and the table prefix are correct?

206.51.148.2 (talkcontribs)

i see where the tda came, i followed the following fix: 88.130.91.250 (talkcontribs) For the rc_timestamp error see Topic:R0vwgmqa1m8zmhgv.

now my it is looking for something -tda??? i guess i can't put the prefix then ? which goes back to my previous problem.

88.130.91.250 (talkcontribs)

If the database name, which it shows you there, still is not correct, then you need to adjust the value of $wgDBname in order to fix this. If the table prefix is wrong, $wgDBprefix is what you need to adjust. You can look up the table prefix by looking at the table names inside the database.

(Apart from that I wonder how this problem can happen - I think you should have the fitting configuration inside your LocalSettings.php file. I do not yet understand, how that got broken during the upgrade. Are you aware that you can just continue using the "old" LocalSettings.php file, which you have also used before the upgrade?)

71.67.124.174 (talkcontribs)

yes, i am aware that i can continue using the "old" LocalSettings.php file.

But, i am not sure if i can use the entire old "htdocs" folder for the new one? In the htdocs, there is extensions, images folders, Localsettings.

This are the procedure that i did from 1.25.1 to 1.26.0.

  1. Backup sql using sqldump
  2. rename entire mediawiki folder as old
  3. install new mediawiki
  4. restore sql database
  5. copy -rp entire old mediawiki htdocs folder to new mediawiki htdocs folder
  6. run maintenance/update.php (here i think the 1.25.1 update.php might be different that 1.26.0?)

then many faults occurs.

88.130.91.250 (talkcontribs)

We have an upgrade guide at Upgrade.

I think that your step 5 was wrong. It is important that in the new installation there are no files of the old MediaWiki version. Such files can cause seemingly random and confusing errors.

What you should do is this: Make sure you have a backup of the complete htdocs folder and of the DB from before you started the update.

Then move the old install out of the way and create an empty htdocs folder. Extract the tarball of MediaWiki 1.26 into that new folder. Then copy the folder images/ and LocalSettings.php into the new folder. If you are using skins or/and extensions, which are not part of the tarball, get the versions for MediaWiki 1.26 of these skins and extensions and place them at the according location inside the new folder.

Then run update.php to update the database.

Reply to "500 Internal Server Error after upgrade"