Project:Support desk

Jump to: navigation, search

About this board

vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
24.72.93.26 (talkcontribs)

To start off I am using:

MediaWiki 1.26.4 PHP 5.6.28 (apache2handler) MySQL 5.7.16

I do not understand why this is slowly saving... When I am debugging, I am refreshing the debug.log and it gets stuck on:

LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] Failed to start cron API (socket error 0): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] recentChangesUpdate Special:RecentChanges type=cacheUpdate (id=2,timestamp=20170327235552) STARTING
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] recentChangesUpdate Special:RecentChanges type=cacheUpdate (id=2,timestamp=20170327235552) t=6 good

What can I do to speed this up? I do not understand the "LoadBalancer::reuseConnection: this connection was not opened as a foreign connection". It takes about 30-40 seconds to save a page, but it takes around 2 seconds to load a page.

Does anyone have a fix?

Debug.log:

Start request POST /kb/index.php?title=IT:Test&action=submit
HTTP HEADERS:
HOST: kb.website.ca
CONNECTION: keep-alive
CONTENT-LENGTH: 2090
CACHE-CONTROL: max-age=0
ORIGIN: https://kb.website.ca
UPGRADE-INSECURE-REQUESTS: 1
USER-AGENT: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
CONTENT-TYPE: multipart/form-data; boundary=----WebKitFormBoundaryTeFQhxdA7oriJst8
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
REFERER: https://kb.website.ca/kb/index.php?title=IT:Test&action=edit
ACCEPT-ENCODING: gzip, deflate, br
ACCEPT-LANGUAGE: en-US,en;q=0.8
COOKIE: _ga=GA1.2.1383329811.1481045531; WikiMediapreview-limit-report=collapsed; __gads=ID=e231b6c91ee05378:T=1489694865:S=ALNI_Ma2zvrKr5qBTB5oNIG8BsakeWRNOQ; __zlcmid=e3g4OPVmM3M0F2; intercom-session-b4hlb1c7=R1doa1UzSWkrY09mTUhrcWJqS255MmFBSUh1dzlYVkg5SXNEU2ZOZndUVlVSMXNMMElGZHJUVUtqRVdLOEJYcy0tKzhNWWhkSDJQVXJxR0Mzbmp5QzNuUT09--be45c72cb29adfadf3a9699a5b2615ee286e0541; WikiMediaLoggedOut=1490638085; WikiMediaUserID=2; WikiMediaUserName=john.jacob; WikiMedia_session=dpammj8rjl693ai2smlt4692c0
[caches] main: EmptyBagOStuff, message: SqlBagOStuff, parser: SqlBagOStuff
[caches] LocalisationCache: using store LCStoreDB
Unstubbing $wgParser on call of $wgParser::setFunctionHook from haclfSetupExtension
Parser: using preprocessor: Preprocessor_DOM
Fully initialised
Connected to database 0 at 127.0.0.1
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
User: cache miss for user 2
User: loading options for user 2 from database.
User: logged in from session
EditPage::edit: enter
Connected to database 0 at 127.0.0.1
DatabaseBase::query: Writes done: REPLACE INTO `objectcache` (keyname,value,exptime) VALUES ('X')
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
EditPage::importFormData: Passed token check.
User: loading options for user 2 from override cache.
User::getBlockedStatus: checking...
IP: 10.26.16.132
timestamp: 20170327235414, edittime: 20170327235414
EditPage::internalAttemptSave: getting section 
[StashEdit] No cache value for key 'WikiMedia:prepared-edit:a723bc5a962a959b6ae6d6368b29f628:c08a48cf9a10dc63de12de5c446fe6706469c025'.
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct
DatabaseBase::query: Writes done: INSERT INTO `text` (old_id,old_text,old_flags) VALUES (NULL,'X')
WikiPage::doEditUpdates: No vary-revision, using prepared edit...
Saved in parser cache with key WikiMedia:pcache:idhash:20-01!*!*!*!*!*!* and timestamp 20170327235552 and revision id 613
[cookie] setcookie: "WikiMediaPostEditRevision613", "saved", "1490660152", "/", "", "1", ""
MediaWiki::doPreOutputCommit completed; all transactions committed
OutputPage::sendCacheControl: private caching;  **
BacklinkCache::queryLinks: got results from DB
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
BacklinkCache::partition: got from full result cache
BacklinkCache::queryLinks: got results from DB
BacklinkCache::partition: got from full result cache
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] Failed to start cron API (socket error 0): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] recentChangesUpdate Special:RecentChanges type=cacheUpdate (id=2,timestamp=20170327235552) STARTING
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
[runJobs] recentChangesUpdate Special:RecentChanges type=cacheUpdate (id=2,timestamp=20170327235552) t=6 good
Request ended normally
Start request GET /kb/index.php/IT:Test
HTTP HEADERS:
HOST: kb.website.ca
CONNECTION: keep-alive
CACHE-CONTROL: max-age=0
UPGRADE-INSECURE-REQUESTS: 1
USER-AGENT: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
REFERER: https://kb.website.ca/kb/index.php?title=IT:Test&action=edit
ACCEPT-ENCODING: gzip, deflate, sdch, br
ACCEPT-LANGUAGE: en-US,en;q=0.8
COOKIE: _ga=GA1.2.1383329811.1481045531; WikiMediapreview-limit-report=collapsed; __gads=ID=e231b6c91ee05378:T=1489694865:S=ALNI_Ma2zvrKr5qBTB5oNIG8BsakeWRNOQ; __zlcmid=e3g4OPVmM3M0F2; intercom-session-b4hlb1c7=R1doa1UzSWkrY09mTUhrcWJqS255MmFBSUh1dzlYVkg5SXNEU2ZOZndUVlVSMXNMMElGZHJUVUtqRVdLOEJYcy0tKzhNWWhkSDJQVXJxR0Mzbmp5QzNuUT09--be45c72cb29adfadf3a9699a5b2615ee286e0541; WikiMediaLoggedOut=1490638085; WikiMediaUserID=2; WikiMediaUserName=john.jacob; WikiMedia_session=dpammj8rjl693ai2smlt4692c0; WikiMediaPostEditRevision613=saved
[caches] main: EmptyBagOStuff, message: SqlBagOStuff, parser: SqlBagOStuff
[caches] LocalisationCache: using store LCStoreDB
Unstubbing $wgParser on call of $wgParser::setFunctionHook from haclfSetupExtension
Parser: using preprocessor: Preprocessor_DOM
Fully initialised
Connected to database 0 at 127.0.0.1
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
User: cache miss for user 2
User: loading options for user 2 from database.
User: logged in from session
User: loading options for user 2 from override cache.
Connected to database 0 at 127.0.0.1
[DBPerformance] [GET] Expectation (masterConns <= 0) by MediaWiki::main not met:
[connect to 127.0.0.1 (WikiMedia)]
TransactionProfiler.php line 307 calls wfBacktrace()
TransactionProfiler.php line 146 calls TransactionProfiler->reportExpectationViolated()
LoadBalancer.php line 545 calls TransactionProfiler->recordConnection()
SqlBagOStuff.php line 170 calls LoadBalancer->getConnection()
SqlBagOStuff.php line 246 calls SqlBagOStuff->getDB()
SqlBagOStuff.php line 224 calls SqlBagOStuff->getMulti()
MessageCache.php line 287 calls SqlBagOStuff->get()
MessageCache.php line 909 calls MessageCache->load()
MessageCache.php line 828 calls MessageCache->getMsgFromNamespace()
MessageCache.php line 766 calls MessageCache->getMessageFromFallbackChain()
Message.php line 1146 calls MessageCache->get()
Message.php line 769 calls Message->fetchMessage()
Message.php line 860 calls Message->toString()
OutputPage.php line 946 calls Message->text()
OutputPage.php line 994 calls OutputPage->setHTMLTitle()
Article.php line 514 calls OutputPage->setPageTitle()
ViewAction.php line 44 calls Article->view()
MediaWiki.php line 490 calls ViewAction->show()
MediaWiki.php line 287 calls MediaWiki->performAction()
MediaWiki.php line 714 calls MediaWiki->performRequest()
MediaWiki.php line 508 calls MediaWiki->main()
index.php line 41 calls MediaWiki->run()

DatabaseBase::query: Writes done: REPLACE INTO `objectcache` (keyname,value,exptime) VALUES ('X')
[DBPerformance] [GET] Expectation (writes <= 0) by MediaWiki::main not met:
query: REPLACE INTO `objectcache` (keyname,value,exptime) VALUES ('X')
TransactionProfiler.php line 307 calls wfBacktrace()
TransactionProfiler.php line 200 calls TransactionProfiler->reportExpectationViolated()
Database.php line 1035 calls TransactionProfiler->recordQueryCompletion()
Database.php line 2786 calls DatabaseBase->query()
DatabaseMysqlBase.php line 442 calls DatabaseBase->nativeReplace()
SqlBagOStuff.php line 344 calls DatabaseMysqlBase->replace()
SqlBagOStuff.php line 364 calls SqlBagOStuff->setMulti()
BagOStuff.php line 393 calls SqlBagOStuff->set()
BagOStuff.php line 250 calls BagOStuff->add()
BagOStuff.php line 317 calls BagOStuff->lock()
MessageCache.php line 690 calls BagOStuff->getScopedLock()
MessageCache.php line 386 calls MessageCache->getReentrantScopedLock()
MessageCache.php line 315 calls MessageCache->loadFromDBWithLock()
MessageCache.php line 909 calls MessageCache->load()
MessageCache.php line 828 calls MessageCache->getMsgFromNamespace()
MessageCache.php line 766 calls MessageCache->getMessageFromFallbackChain()
Message.php line 1146 calls MessageCache->get()
Message.php line 769 calls Message->fetchMessage()
Message.php line 860 calls Message->toString()
OutputPage.php line 946 calls Message->text()
OutputPage.php line 994 calls OutputPage->setHTMLTitle()
Article.php line 514 calls OutputPage->setPageTitle()
ViewAction.php line 44 calls Article->view()
MediaWiki.php line 490 calls ViewAction->show()
MediaWiki.php line 287 calls MediaWiki->performAction()
MediaWiki.php line 714 calls MediaWiki->performRequest()
MediaWiki.php line 508 calls MediaWiki->main()
index.php line 41 calls MediaWiki->run()

[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions::__construct
OutputPage::checkLastModified: client did not send If-Modified-Since header
Article::view using parser cache: yes
Parser options key expired, touched 20170327235552, epoch 20170327235723, cached 20170327235552
Article::view: doing uncached parse
Parser cache options found.
Saved in parser cache with key WikiMedia:pcache:idhash:20-01!*!*!*!*!*!* and timestamp 20170327235632 and revision id 613
MediaWiki::doPreOutputCommit completed; all transactions committed
User::getBlockedStatus: checking...
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
Title::getRestrictionTypes: applicable restrictions to 
[[IT:Test]]
are {edit,move}
Parser: using preprocessor: Preprocessor_DOM
DatabaseBase::query: Writes done: REPLACE INTO `msg_resource` (mr_resource,mr_lang,mr_blob,mr_timestamp) VALUES ('X')
Title::getRestrictionTypes: applicable restrictions to [[MediaWiki:Breadcrumbs]] are {edit,move}
OutputPage::sendCacheControl: private caching; Mon, 27 Mar 2017 23:57:23 GMT **
LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
Request ended normally
Seb35 (talkcontribs)

Not sure but some ideas to test:

  • php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution: this seems to indicate there are issues on domain resolution (DNS), possibly intermittent but should be checked
  • Google has some references to this issue
  • Topic:S9ifgvvg522ckfw1
  • phabricator:T97028

Possibly try to disable cache $wgMainCache = CACHE_NONE; in a first time (although it should be enabled in production).

Ciencia Al Poder (talkcontribs)

The problem is probably the Job queue. First it tries to open a connection to itself but it fails to resolve its own domain, then it fallbacks to the on-request job runner.

I'd first try setting $wgRunJobsAsync = false; It should definitively help to go to the fallback directly and not spend time trying to unsuccessfully resolve a DNS

If it doesn't really help, jobs may take long to complete, so try $wgJobRunRate = 0; and then you should run maintenance/runJobs.php periodically through a cron job.

AKlapper (WMF) (talkcontribs)

Unrelated, but also note that MediaWiki 1.26.4 is an ancient unsupported version. See Download and Manual:Upgrading.

Reply to "Problem with Slow Saving"
শাহাদাত সায়েম (talkcontribs)

When I add Extension:NewUserMessage in my site , then Log In page and Password Page don't work . but when I remove this extension then it work . please tell me , why I faced this problem . or Have any configuration to solve it ? thanks

Ciencia Al Poder (talkcontribs)

Check if you've configured the extension correctly, look for any error message. If still stuck, you may need to report a bug

AKlapper (WMF) (talkcontribs)

...after reading https://mediawiki.org/wiki/How_to_report_a_bug  :)

Reply to "Extension:NewUserMessage"
Azot944 (talkcontribs)

I transfer my wiki to Cloudflare service (with https).

Sometimes my wiki is showing mobile view where desktop view is expected.

Example:

http://lmgtfy.com/?q=Klawdija+%C5%81uzganowa+wiki.czarnobyl.pl http://lmgtfy.com/?q=Walery+Pierewaczenko+wiki.czarnobyl.pl

Ciencia Al Poder (talkcontribs)

Looks good to me. Maybe cloudflare is caching the response, so if a mobile user first open a page, it caches the mobile view, and then a desktop user gets the cached mobile view instead.

Azot944 (talkcontribs)

Are u sure? I checked on three different computers and still the same. Main article and discusion page.

Reply to "Mobile view instead of desktop view."

Implement interactive customer evaluation on a wiki page

2
Ufoldager (talkcontribs)

Hello,

I am interested in knowing whether or not it is possible to implement an interactive customer evaluation on a wiki page?

Like, a normal wiki page with different form field elements that the user can fill out to assess themselves and their performance in different aspects?

Then they click a submit button, and the answers gets sent to a specific administrator/email account?

Thank you for your help!

Ciencia Al Poder (talkcontribs)

Possible? Yes, if you know PHP to program it yourself or by hiring a developer. MediaWiki doesn't provide that functionality, and there's no extension that I'm aware of which could provide similar functionality.

Have in mind that MediaWiki is a software about documentation. What you want is probably provided by a CRM software.

Reply to "Implement interactive customer evaluation on a wiki page"

[RESOLVED] Jobs won't run, templates not updating.

8
86.148.146.56 (talkcontribs)

My wiki is not running jobs by itself - they collect but I have to run runJobs.php to complete them. And even after completing them, a template does not update.

Also, I've had five jobs which haven't completed for months now. see this graph: https://wikiapiary.com/wiki/Coasterpedia

This is really annoying me now, any help is greatly appreciated. This is the job count: http://coasterpedia.net/w/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm

88.130.96.175 (talkcontribs)

Hi!

The issue that jobs generally do not run automatically was a problem in MediaWiki 1.22. It should have been solved in MediaWiki 1.23 (which you are running currently).

That a certain job does just not do anything at all can happen sometimes. Reasons for this may vary, e.g. the page, which should be indexed by the job may have been deleted in the meantime or another job already did, what this job is about to do. In this case it is save to go to the database table jobs and to manually delete the according rows.

Ciencia Al Poder (talkcontribs)

Look at Manual:Job queue, specially look if you have set $wgJobRunRate to 0 or something.

95.144.138.233 (talkcontribs)

Thanks for the replies! I will take a look at the database - Unfortunately I can't get into it at the moment.

The template not updating was down to my own stupidity - I was editing the wrong section of the page!

The jobs however are still not running. I have specifically set the JobRunRate to 1.

195.234.150.70 (talkcontribs)

I have the same problem, no jobs are running on MW.1.23. Anyone having an idea? $wgJobRunRate is set to 1, $wgPhpCli="C:\Program Files (x86)\PHP". There are no errors when running the RunJobs.php manually and the Job table is empty after running.

Ciencia Al Poder (talkcontribs)

Try setting $wgRunJobsAsync to false (for MediaWiki 1.23 and later) and see if that helps.

Soumya.sadanandan (talkcontribs)

Thanks, this solved my problem with template not getting updated.

Dedirect page need to login even in whitelist

4
Chan15tw (talkcontribs)

I set $wgGroupPermissions['*']['read'] to false and add page title to $wgWhitelistRead variable, there is a page on the whitelist page, everyone can see it, but I change the content to #REDIRECT to another page, then this page asked for login, so the redirect thing will not work, how to fix it

Seb35 (talkcontribs)

Add the target page in the whitelist? Does not it work?

Chan15tw (talkcontribs)

Target page is in the whitelist, and if I go target page in direct I can see it

Seb35 (talkcontribs)

No idea then. Anyone?

Reply to "Dedirect page need to login even in whitelist"
TeezerApoe4 (talkcontribs)

A user of MediaWiki on a site that I support complained about this. I created a user ID (I don't normally use the wiki) and found that clicking on any user name in the user list (including my own, as a Sysop) throws a 403. I could find no reference to this particular problem, so I updated MediaWiki to 1.26.2 (from 1.23.6) in the hopes that the newer version would not have this problem, but it persists.

Any ideas?

87.123.46.149 (talkcontribs)

You mean what you get is an error 403 in the form of a server error page?

MediaWiki does not produce server error pages; even if this error happened inside MediaWiki (which I doubt), then you should still see some kind of wiki page. My guess is that this is caused by something in the server configuration. E.g. by some setting in httpd.conf or .htaccess...

TeezerApoe4 (talkcontribs)

Thank you for the redirect.

It turned out to be a patch that the host had created to block SQL injection attacks.

Pmusser (talkcontribs)

@TeezerApoe4 do you have more information on this & were you able to get it resolved? I'm getting the same issue with a recent installation and would like to fix it if possible :)

TeezerApoe4 (talkcontribs)

I did get it resolved by removing the patch. The host added the patch out of an excess of caution, but no actual threat. Anyway, the patch was in the code that called MediaWiki, not MediaWiki itself. Unfortunately, I didn't keep any specific documentation.

Reply to "Forbidden 403 on user page"

Images not working after server move and upgrade

3
DalixamKC (talkcontribs)

Hi,

I moved my wiki to a new host and upgraded it at the same time (from 1.16 to 1.28), but none of the images are working. They are all in the /images/ folder like before, I tried running rebuildall.php and rebuildImages.php, from SSH, but that didn't help.

I went to one of the image pages in the wiki and found the image source. It is trying to fetch the image from a subfolder named 9/9d. I.E. /images/9/9d/ What is this? That path is not used in LocalSettings.php nor is it in ANY of the files (I searched). A search in the database gave no result either. Where is it coming from?

What should I do? Should I create the subfolder /9/9d and move all my images to it and what about new images that get uploaded?

MarkAHershberger (talkcontribs)

You said they are all in the images folder. Did you use the same LocalSettings.php file when you moved? Is $wgHashedUploadDirectory set in your new or old LocalSettings.php file?

DalixamKC (talkcontribs)

I did not use the same LocalSettings,php, I let the installation create a new one and then adjusted it.

$wgHashedUploadDirectory  was set to false in the old settings and does not exist in the new one, adding it...fixed it.

That was easy, No need to have spent days getting SSH to work, but I'm glad it's fixed :)

Thanks for the help!

Error creating thumbnail: Unable to save thumbnail to destination

57
Star Warden (talkcontribs)

Hey. I keep getting this error button and I don't know how to fix it. It can be seen here: http://dragon-mania-legends-wiki.mobga.me/Ruins, here: http://dragon-mania-legends-wiki.mobga.me/Habitats and here: http://dragon-mania-legends-wiki.mobga.me/Category:Images:Calendar_Events

I've tried setting a temp folder ($wgTmpDirectory = "$IP/images/temp";) and a debug file ($wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";) as suggested and even made the temp folder writable by the server using chown, but that did not work.

The manual on how to debug specifies that this log can contain sensibile information, thus I won't post all of its contents and would like to know what could I share here from it that would help in solving this issue?

I mention the console is displaying some weird errors, but I cannot interpret them, sadly.

MarkAHershberger (talkcontribs)

Looking at your Special:NewFiles, it looks like you are able to upload images without problem, but those particular images cause a problem.

I can use thumb.php to create thumbnails of various sizes (see also).

thumb.php appears to work on images that show the problem.

Meanwhile, fails to produce thumb.php some thumbnails for the problematic images.

Maybe you can see what is produced in the debug log when one of the failing thumb.php links is called?

Star Warden (talkcontribs)

I found no recent instance of the cupcake thumb (at least the date isn't displayed when such calls are made, so it might be recent), thus I also included something more recent. The cupcake thumb is at the very top, the others are separated by a large space: http://pastebin.com/Yg6V1Zr6 Hope it helps!

MarkAHershberger (talkcontribs)

I'm at a loss. I don't really know how to help you without access to your machine. Sorry. Perhaps you can check the permissions on all the directories in your images folder to see if one or two has funky permissions.

Ciencia Al Poder (talkcontribs)

What if you set $wgShowExceptionDetails to true temporarily and open the problematic thumb.php URL?

Star Warden (talkcontribs)

That string was already set to true even before the problem occurred. But here's the strange thing. If you go and check my first two links (ruins and habitats), you'll see that the problem was solved on its own...

Here's a screenshot of the permissions that all folders seem to have: http://prnt.sc/em8bhd I selected all of them, and made sure they are all set to that. Do I need to change anything?

I forgot to mention that when renaming the file, the issue seems to disappear (of course, there's a reason I named them the way I did, in the first place, thus this isn't a good solution or the solution for that matter). And, in some cases, the issue is triggered only if I get over a certain pixel size while adding it to the article. Would manually moving the images (on the server) from one folder to another solve it? Is it even safe to do that?

MarkAHershberger (talkcontribs)

The permissions look fine if that user is the user that runs as the web server. You could also change the permissions on images to the numeric code 777 and recurse through the images directory.

You could move the images directory, but you would need to change a few configuration options like Manual:$wgUploadPath or Manual:$wgUploadPath. You might also need to use Manual:Img auth.php to stream images.

Star Warden (talkcontribs)

I am not sure if that user is the one that runs as the web server.. I was using the root account. How do I find out who it is?

Also, the second option you gave me is the same as the first one. I was asking if I could only move the images that cause trouble, not the whole directory. Seems kinda pointless to move the whole thing just for a few troublemakers.

MarkAHershberger (talkcontribs)
  • I don't recognize the tool you are using for ftp. But what does the full listing of the mediawiki directory show? Maybe that would have user names on it.
  • If you can physically remove the primary uploaded problematic file, then I think you could re-upload it. That might solve the problem.
Star Warden (talkcontribs)
  • I use FileZilla Client. I am not sure what you're referring to. Is this it:http://prnt.sc/emeu0n ?
  • By physically removing it, you mean to manually delete it from the server itself or from the wiki? Because if it's the latter, it doesn't work.
MarkAHershberger (talkcontribs)
  • That has the information I wanted. It looks like you're on a Debian server and the permissions are set correctly.
  • I meant from the server itself.
  • Could you use FileZilla to get the listing of the images/thumb/9/90 and images/thumb/9/90/The_Winds_of_November_Event_%2816.11.14%29.jpg directory?
Star Warden (talkcontribs)

I managed to get there and the folder has the image in 3 different sizes: 200px, 300px and 400px. Interestingly enough, this folder seems to have another owner than the typical one: http://prnt.sc/emrhbx I checked other problematic files, thinking the owner might be at fault, but they had the typical owner, so I guess the different owner theory can (for now, at least) be ruled out.

Should I delete the image from both its permanent place and the thumb folder?

MarkAHershberger (talkcontribs)

The root owner is definitely going to cause a problem. Delete that directory and its contents.

Star Warden (talkcontribs)

That solved the thumbnail problem, but only for that image.

Star Warden (talkcontribs)

Ehm, I was thinking of something. Sometimes, some special pages (usually uncategorised files) won't update, no matter what, regardless if I run updateSpecialPages.php (which runs daily on a cron job) no matter what. So I force it with refreshLinks.php which, in turn, creates a ton of jobs which are run by runJobs.php later on. From time to time, some jobs just get stuck, not allowing themselves to be run. I posted about it 2 months ago (https://www.mediawiki.org/wiki/Topic:Tjumyamw7pqzvjr1) but got no response. So I looked into the database and found the stuck jobs in the job table. So I just manually deleted them (and have been doing that ever since). Could this be the problem behind it or is it unrelated? I remember this particular issue happened on the 1.26.2 installation, then a failed server upgrade brought the wiki down for a little while, we moved servers and that issue was fixed (this was last summer).

MarkAHershberger (talkcontribs)

It could be related.

You need to make sure that runJobs.php and refreshLinks.php are running as the www-data user and not the root user.

Star Warden (talkcontribs)

I am sorry, I am not good at this. How do I do that? I haven't used any other user besides my personal one and the root one.

MarkAHershberger (talkcontribs)

How do you normally get the jobs to run? How are they being run right now?

Star Warden (talkcontribs)

With cron. When I set it up, I opened putty, logged in on root, entered the command: crontab -e then I added this string: */120 * * * * cd (path to wiki) && php maintenance/runJobs.php and saved. But after using refreshLinks, I run it manually. It usually doubles the number of jobs, initially, then starts to decrease them.

MarkAHershberger (talkcontribs)

If the only cron jobs you have are those that are running for the wiki, then run this sequence of commands as root:

# crontab -l > cron.txt         # to save the current crontab
# crontab -r                    # to delete the current crontab for root
# crontab -u www-data cron.txt  # to give the crontab entries to the www-data user.

If you have other crontab entries, skip the second step (which removes all the entries for root) and edit cron.txt so that only wiki maintenance scripts are left in the file before running the third command.

In any case, the first command will back up all your root cron commands if there is a mistake made.

Star Warden (talkcontribs)

Before proceeding, I used grep CRON /var/log/syslog to see the other jobs. There are 3 other that are not in my current crontab (when using crontab -e), but they all are run by root. Two seem to be more server-related: http://prnt.sc/emzniy

Is it safe to still do all the steps?

Also, I did the first step, but I got no confirmation of whether the procedure was successful or not? How do I check?

Star Warden (talkcontribs)

Ah, also, deleting images from the server then re-uploading them doesn't get rid of the error (because it uploads them to the same place in which they were before), BUT, I think it might just be related to root being the owner. So far, all images that I checked in images/thumb that had the issue, had root as the owner. It seems this issue occurs only with thumbnails.

MarkAHershberger (talkcontribs)

You can see if the first step worked by looking for cron.txt in the directory where you ran the file.

In fact, since you have other cron jobs running as root, skip the second step and just edit the cron.txt file to have the wiki-related jobs.

After that, erase those jobs from the root crontab using crontab -e and then run the third command to move the cronjobs to the www-data user.

Star Warden (talkcontribs)

I am not exactly sure what I am doing wrong. Technically, I run the command in the base directory (that is, I didn't change the folder after opening putty), but there is no such file there. Then I looked in /var/spool/cron/crontabs, which has the crontab that I can access through the crontab -e and crontab -l commands, but that's the only file in there (googling also lead me to the same location). There's also another crontab in /etc which lists all the cronjobs. But no sign of cron.txt in any of those three spots....

MarkAHershberger (talkcontribs)

If you run "crontab -u root -l > cron.txt" as root, it should create the cron.txt file for you.

Star Warden (talkcontribs)

I did that, still wasn't in any of those three locations, but I used find / -name and found it in /root. Inside it, there are the two jobs: runJobs.php and updateSpecialPages.php and the default "# Edit this file to introduce tasks to be run by cron". Is this the right file?

MarkAHershberger (talkcontribs)

That is it. It makes sense that it is in /root since that is the root user's home directory. Probably typing ls after running the command would have shown it.

Star Warden (talkcontribs)

Awesome. So let me get this straight before doing anything. I need to edit that file to have the wiki-related jobs going. It already has two jobs (updateSpecialPages and runJobs). This means I need to add the other three remaining jobs from /etc/crontab?

These are:
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

MarkAHershberger (talkcontribs)

Just the first one. And "root" should not be there. You should probably paste your cron.txt before running the command to load it.

Star Warden (talkcontribs)

Is this correct: http://pastebin.com/2QGi7Wjf What do I do with the last 3 cronjobs and with the other two crontabs (from /var/spool and /etc)?

EDIT: There was another job that I missed which was added as custom, apparently:

# OJG CUSTOM JOBS ADDED FOR THE WIKI:
*/15 * * * *	root	cd /(path to wiki)/ && /usr/bin/php maintenance/rebuildFileCache.php >> /var/log/(log folder)/rebuildFileCache.log 2>&1
5 2 * * *     root    cd /(path to wiki)/ && /usr/bin/php maintenance/runJobs.php >> /var/log/(log folder)/runJobs.log 2>&1

It seems there is a second runJobs which is a tad bit different than the first runJobs. Doesn't really seem to be doing its job properly, though. Should I just remove it?

MarkAHershberger (talkcontribs)

First, do not run crontab -r. Use crontab -e to edit the root crontab files and remove only the wiki crontab entries. The rest should remain.

You should have a file, cron.txt, with the following based on the information you've given here:

# OJG CUSTOM JOBS ADDED FOR THE WIKI:
*/15 * * * * www-data  cd (path to wiki) && php maintenance/rebuildFileCache.php   >> (log folder)/rebuildFileCache.log 2>&1
*/15 * * * * www-data  cd (path to wiki) && php maintenance/runJobs.php            >> (log folder)/runJobs.log 2>&1
0    0 * * * www-data  cd (path to wiki) && php maintenance/updateSpecialPages.php >> (log folder)/updateSpecialPages.log 2>&1

Move the cron.txt file to /etc/cron.d/wiki-cron-jobs.

This will allow Ubuntu's cron system to run them. Anytime you need to change them, you can safely edit that file.

I think this will get you where you need to be. Sorry for the confusion.

MarkAHershberger (talkcontribs)

And to reduce the repetition, you can use shell variables in that file, so you could do the following:

LOGDIR=/var/log/(log folder)
WIKIDIR=(path to wiki)

# OJG CUSTOM JOBS ADDED FOR THE WIKI:
*/15 * * * * www-data  cd $WIKIDIR && php maintenance/rebuildFileCache.php   >> $LOGDIR/rebuildFileCache.log 2>&1
*/15 * * * * www-data  cd $WIKIDIR && php maintenance/runJobs.php            >> $LOGDIR/runJobs.log 2>&1
0    0 * * * www-data  cd $WIKIDIR && php maintenance/updateSpecialPages.php >> $LOGDIR/updateSpecialPages.log 2>&1
Star Warden (talkcontribs)

I did that and moved the .txt to where you suggested (I had to manually create the wiki-cron-jobs folder). Here's the entire paste: http://pastebin.com/jY6sfM5f

Now, one question. What do I do with the remaining cronjobs that I wrote here (https://www.mediawiki.org/w/index.php?title=Topic:Tn0u0v07qa9cb9v8&topic_showPostId=tn9kgkwpt0b8dob9#flow-post-tn9kgkwpt0b8dob9)? They weren't in the crontab file that I could open with crontab -e while logged in on root. They are in the crontab that's found in /etc. This is its contents: http://pastebin.com/vDZtEWML

MarkAHershberger (talkcontribs)

I'm sorry, I should have been clearer. I wanted you to move cron.txt to a file called /etc/cron.d/wiki-cron-jobs. If you've created a directory, I'm not sure it will work.

Remove these lines from the file you found under /etc:

# OJG CUSTOM JOBS ADDED FOR THE WIKI:
*/15 * * * *    root    cd /(wiki path) && /usr/bin/php maintenance/rebuildFileCache.php >> /var/log/wiki_logs/rebuildFileCache.log 2>&1
5 2 * * *     root    cd /(wiki path) && /usr/bin/php maintenance/runJobs.php >> /var/log/wiki_logs/runJobs.log 2>&1

The others should be left as-is.

Star Warden (talkcontribs)

Well, there was no such file there. Cron.txt currently rests in /etc/cron.d/wiki-cron-jobs folder. I used grep CRON /var/log/syslog to see the recent jobs, but not jobs from cron.txt seem to have been executed... what should I do?

MarkAHershberger (talkcontribs)

Run the following commands:

$ mv /etc/cron.d/wiki-cron-jobs/cron.txt /etc/cron.d/wiki-jobs
$ rmdir /etc/cron.d/wiki-cron-jobs

Both should run without problem and you should see cron jobs executing shortly after that.

Star Warden (talkcontribs)

Hey. Thanks! But there seems to be a problem... the jobs aren't run. Using grep CRON /var/log/syslog it does show me the runJobs.php has been executed, but the number does not go down, unless I manually run it. What might be the cause?

Star Warden (talkcontribs)

Actually, it seems none of the maintenance scripts are working, not only php runJobs.php.

MarkAHershberger (talkcontribs)

Could you run the following and tell me the output:

$ grep wiki-jobs /var/log/syslog
Star Warden (talkcontribs)

This is what I get: http://prnt.sc/eo1iyo

MarkAHershberger (talkcontribs)

So, it is loading properly. I was worried that I had given you a bad one or that it had been corrupted some way. For example, I created a file with the wrong owner and got the following:

$ grep test /var/log/syslog
Mar 24 12:17:01 web cron[369]: (*system*test) WRONG FILE OWNER (/etc/cron.d/test)
$

I have set up a wiki with a file similar to what I asked you to set up now and when I look for www-data in my syslog, I see the following:

$ grep www-data /var/log/syslog
...
Mar 24 12:30:02 web CRON[25865]: (www-data) CMD ( cd $WIKIDIR && php maintenance/rebuildFileCache.php   >> $LOGDIR/rebuildFileCache.log 2>&1)
Mar 24 12:30:02 web CRON[25867]: (www-data) CMD ( cd $WIKIDIR && php maintenance/runJobs.php            >> $LOGDIR/runJobs.log 2>&1)
...

Do you see anything similar?

Star Warden (talkcontribs)

It seems I do: http://prnt.sc/eo7t6b

Star Warden (talkcontribs)

If the command seems to be executed correctly, it means that wikidir and logdir are set correctly, right? I am not sure if it's safe to post them here (that's why I always censor them), but I wrote them something like:

LOGDIR=/var/log/foldername/ WIKIDIR=/mainfolder/foldername/

I didn't add /maintenance/ at the end of wikidir since the cronjob automatically switches to the maintenance folder due to php/maintenance. Plus, the command is basically the same to how I had it in the root crontab (minus adding information to the log, as well as having the name of the wiki path written instead of wikidir).

I take it that the above steps are correct?

MarkAHershberger (talkcontribs)

Yep, it looks like all the steps are correct. Check your log files to see what is being put in them.

Star Warden (talkcontribs)

From the outside, when looking at 'last modified' it seems that rebuildFileCache.log has been last modified on the 23rd while runJobs.log on the 18th. Those are the only two logs inside there.... The owner/group is root root. The first log is huge, I copied pasted the last pages (132 in word) and replaced the path to the wiki with 'wikidir':http://pastebin.com/quGJUa50

As for runJobs = http://pastebin.com/rWejzRu7

MarkAHershberger (talkcontribs)

So, for rebuildFileCache, it looks like it is failing. As the message says, "Set $wgShowExceptionDetails = true; and $wgShowDBErrorBacktrace = true; at the bottom of LocalSettings.php to show detailed debugging information." so we can see what is going on.

runJobs looks fine.

MarkAHershberger (talkcontribs)

oh, and make both log files owned by www-data so that the cron jobs will be able to update them. You should also change the ownership on the log directory.

Star Warden (talkcontribs)

Both file logs and the folder itself are owned by www-data now. I am not sure how runJobs looks fine since I can see that the jobs aren't being run.

Maybe the wiki-jobs file itself has to be owned by www-data? Most of the folders on the server are owned by root.

Off-topic: most of the wiki folder is owned by www-data, but some folders are owned by root. Should I pass ownership to www-data?

And this is what rebuildcache log shows now: http://pastebin.com/SPeztVnt

MarkAHershberger (talkcontribs)

You still haven't set the variables to show exceptions.

Star Warden (talkcontribs)

I actually did. This is what the bottom of localsettings looks like: http://pastebin.com/Sej3nm9g

Also, it's owned by root.

MarkAHershberger (talkcontribs)

interesting... it doesn't seem to have made a difference for your rebuildcachelog.

Star Warden (talkcontribs)

Maybe I should give those files different permissions? Their current permissions are -rw-r--r--

Also, what should I do to get the runJobs script running? Or all of the scripts, for that matter. None seems to be working.

MarkAHershberger (talkcontribs)

Here are the permissions on my file:

$ ls -l /etc/cron.d/test 
-rw-r--r-- 1 root root 442 Mar 24 12:15 /etc/cron.d/test
$

The content is what I gave above.

My log files show that the cron jobs are running.

$ zgrep maintenance /var/log/syslog.1 | tail -53 | head -3
Mar 26 00:00:01 web CRON[20974]: (www-data) CMD ( cd $WIKIDIR && php maintenance/rebuildFileCache.php   >> $LOGDIR/rebuildFileCache.log 2>&1)
Mar 26 00:00:01 web CRON[20977]: (www-data) CMD ( cd $WIKIDIR && php maintenance/runJobs.php            >> $LOGDIR/runJobs.log 2>&1)
Mar 26 00:00:01 web CRON[20979]: (www-data) CMD ( cd $WIKIDIR && php maintenance/updateSpecialPages.php >> $LOGDIR/updateSpecialPages.log 2>&1)
$

I'm not sure how I can help you in this forum.

Star Warden (talkcontribs)

So I fixed it. All I did was to replace wikidir and logdir with their respective folders. Strange fix.

Star Warden (talkcontribs)

Now, all that remains is the stuck jobs. Do I manually remove them from the database or what should I do? So far, that's the only solution I found to get rid of them.

MarkAHershberger (talkcontribs)

If the jobs are running and the stuck ones are not clearing, then, yeah, I think that is what you have to do.

Hrm... I am thinking I should have put export in the cron file. *sigh*...

Star Warden (talkcontribs)

Then I guess this settles it, finally.

Thank you very much for all the help and the patience! Much appreciated.

Off-topic: is there a MediaWiki-recommended list of permissions and owners/groups that folders on a server should have?

Reply to "Error creating thumbnail: Unable to save thumbnail to destination"
Summary by MarkAHershberger

You need to contact the people running that wiki.

ADLaw (talkcontribs)

I can log on here into wiki, but I cannot log on to mothur.org/wiki, nor can I navigate from here to there.

https://www.mothur.org/w/index.php?title=Special:UserLogin&returnto=Main+Page

It says my username does not exist. I have cleared cache, I have deleted cookies, made sure cookies are enabled and that wiki is not blocked. I am using Firefox brower, 52.0.1

MarkAHershberger (talkcontribs)

You need to contact the people running that wiki.