[00:08:51] Cannot access the database :( [00:08:56] http://www.powershelladmin.com/wiki/Main_Page [00:09:05] It's a terribly long story, but that's where I'm at now. [00:09:16] It loads if I restart MySQL, and "sometimes". [00:09:23] just like the first hit says when you google it "intermittent" [00:10:09] I just granted the user full acces (grant all, probably stupid) on the wikidb.*, and then it loaded, I go to get some food and come back, and it's not loading [00:10:39] access* [00:10:45] vaya: try setting $wgShowExceptionDetails = true; $wgShowSQLErrors = true; on LocalSettings.php [00:10:57] you wanted to start from scratch and re-import your content by hand last I checked [00:11:03] the first one didn't change anything, I'll try the SQL one [00:11:05] and not do it on production [00:11:32] could the database be corrupt? [00:12:27] connection refused (localhost) [00:12:32] I have a strict iptables setup. [00:13:31] I allow SSH from myself and in addition http, https and: [00:13:37] ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED [00:13:57] this worked fine two hours ago [00:13:58] for minutes [00:14:01] hope I'm not hacked [00:16:05] did you do what Vulpix said [00:16:20] connection refused (localhost) [00:16:25] That was the result of what he said. [00:16:26] it shows that where? [00:16:30] Which I'm not googling. [00:16:30] at the top of your wiki? [00:16:54] See for yourself. Adding those two adds the detail "connection refused (localhost)". The rest is at www.powershelladmin.com [00:17:08] I turned them off again, for security. [00:17:10] oh dear, the site isn't showing any content at present [00:17:14] I know [00:17:23] you need to restart your database server and make sure that mediawiki user has access [00:17:27] yes [00:17:30] it will work [00:17:33] for like a few minutes [00:17:37] or seconds [00:17:39] and then what? [00:17:44] then this again [00:18:12] check your database server logs to see why it's stopping itself [00:18:20] it's not stopping, it's running [00:18:26] the DB server is fine [00:18:35] status shows running, I'm fine [00:18:40] "" [00:18:47] telnet to its port locally and see whether it refuses the connection there or not (`telnet localhost `) [00:20:34] Server version 5.7.16-0ubuntu0.16.04.1 -- Protocol version 10 -- Connection Localhost via UNIX socket [00:20:34] UNIX socket /var/run/mysqld/mysqld.sock [00:20:35] Uptime: 1 min 59 sec [00:20:49] the logs show ... [00:21:07] why are you doing this instead of telnet? [00:21:33] it's a better way of checking? [00:21:44] no not really [00:22:10] when you use your way you a) don't know which port is working, and b) don't verify that it's accepting connections [00:22:25] I read that mediawiki uses sockets internally. [00:23:12] next thing you could check your mysql logs to see whether it has any errors there [00:23:19] The DB log shows no errors [00:23:23] vaya: sockets only if you use "localhost" for database server, not if you use 127.0.0.1 [00:23:36] I use "localhost" in the $wg... = [00:23:37] "connection refused" means it's not using sockets [00:23:41] hm [00:25:09] $wgDBtype = "mysql"; [00:25:10] $wgDBserver = "localhost"; [00:25:10] $wgDBname = "wikidb"; [00:27:10] telnet to local 3306 works [00:27:15] localhost 3306 [00:31:09] is that the same port your wiki is using to access the db? [00:32:09] $wgDBserver = "localhost:3306"; [00:32:12] try that [00:33:03] now it's loading: http://www.powershelladmin.com/wiki/Main_Page [00:33:11] with current config, but won't for long [00:33:14] sounds good, let's hope it's more than for a few minutes [00:33:33] I'll try that once it dies [00:34:23] dead again [00:34:24] I think it died [00:34:32] :( [00:35:10] what about mediawiki error log [00:35:19] and you can make mysql log more info [00:35:22] make it more verbose [00:35:47] it sounds to me like maybe your database server is getting overloaded [00:35:55] what is your server load? is there enough resources? [00:36:02] changed to :3306 and it's working again [00:36:05] ok [00:36:09] server load is like less than 1 % [00:36:42] load average: 0.00, 0.01, 0.00 [00:37:06] it's intermittent. had that error, then I don't have it again [00:37:43] and now it's dead again [00:37:46] yeah, intermittent [00:38:00] if you google "mediawiki cannot access database" - the top hit says "intermittent" [00:38:50] I turned on SQL errors again, different error ... No such file or directory (localhost:3306)) [00:39:03] do I need http://? [00:39:06] hm [00:39:43] back to localhost, connection refused [00:41:04] now it's saying no such file or host localhost [00:41:12] without the :3306 too [00:41:21] err, file or directory* [00:42:28] https://www.mediawiki.org/wiki/Topic:T71jh1dot8xove5a [00:49:16] vaya: that's because it's trying to use a socket now? why it wasn't throwing that error before? [00:49:25] use 127.0.0.1 instead of localhost [00:51:03] the error changed upon browser refresh after a minute ... I'm pretty lost [00:51:18] I'll try 127.0.0.1, and if it works, I bet it won't after a while [00:51:23] I'll google this new error first [00:53:22] (Cannot access the database: Connection refused (127.0.0.1)) [00:53:51] http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directory [00:54:04] that means mysql is rejecting connections at the TCP level [00:54:29] I'm going back to the iptables idea [00:54:37] either a firewall is rate-limiting the number of connections, or mysql has a connection limit that you're reaching [00:54:39] I'll try to add some allow stuff [00:54:50] hm [01:09:08] I tried setting pdo_mysql.default_socket=/tmp/mysql.sock as per this suggestion: http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directory [01:09:23] it's loading again, but I'm guessing it'll be dead by the time I refresh [01:09:56] if you need to use sockets, change $wgDBserver to localhost:/path/to/mysql.socket [01:10:26] but you need to choose: sockets or tcp, you can't connect to both at the same time [01:10:46] the site is still loading, hm [01:11:38] I better get some sleep if I can [01:11:52] if it still loads in the morning I'll be very surprised and very happy ... [01:12:41] dead ... [01:13:01] restarted mysql, up again [01:13:13] trying the socket after localhost, but it won't work :\ [01:13:51] no such file or dir ... [01:15:58] if the socket file doesn't exist, it won't work, obviously [01:22:50] vaya: can you connect to your mysql from the commandline and see the connection parameters using "\s" command? [01:30:12] I just realized I hadn't run mysql_secure_server [01:30:49] connecting from the command line my mysqladmin works [01:30:53] and mysql shell works fine [01:30:56] user has access [01:31:00] it's intermittent [01:31:02] comes and goes [01:31:15] I see people have visited the wiki when it hasn't loaded for me [01:31:22] but it's likely terribly unreliable [01:41:19] I'm working on an extension, and there is some content that I only want to have visible when the page is in 'read' mode (as opposed to 'edit', etc.) Is there a variable or something that will tell me that the page is in read mode? [06:10:26] are there issues with section not working for this extension? https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion [08:11:42] Hi, is there a way to do something like this: {{#lst:{{Featured Article}}|intro}} https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion [10:47:57] Hi. I noticed that some mediawiki interface text pages doesn't work on some wikis. [10:48:00] For example look for [[MediaWiki:Edittools]] on "test" and "test2" WMF wikis. Or look for MediaWiki:Uploadtext and http://wiki.wargaming.net/en/Special:Upload (you'll need an account on that wiki to see that "MediaWiki:Uploadtext" does not have any effect). [10:52:05] XXN: edittools is hidden by default, and only revealed once the javascript that is needed to make it work has run. Since the MediaWiki page doesn't include the javascript (only edit pages do), the content remains hidden [10:54:03] XXN: MediaWiki pages fulfil multiple purposed, depending on where how the MediaWiki software is coded to use the content. [10:56:46] that wiki has a nice skin btw. Impressive work because skinning MediaWiki is not easy. [10:57:52] nick:thedj , try to edit any page on these wikis and will see that edittools. [10:58:55] I suppose MediaWiki:Uploadtext also should be enabled by default and just creating it it's enough. [10:58:56] Hi, I have an issue with substitution, could anyone help me? [11:00:02] {{#lst:{{Featured_Article}}|intro}} <-- I got that, but it shows me the edited version of the page: [11:00:12] not the actual content [11:02:33] slushpuppy: where do you have your issue ? [11:03:02] can i notice you my wiki link thedj, would be easier to explain? [11:04:24] thedj: hey, hi, as you're online, could you address https://phabricator.wikimedia.org/T71336#2696957 ? [11:05:09] Actually, basically I am toying around with template inclusion, I have this extension installed that is suppose to fetch me a random article from specified categories https://www.mediawiki.org/wiki/Extension:BedellPenDragon [11:05:32] "" <-- that is the code for the extension and it works fine. [11:06:26] However when I wonder how I can transclude the results of that code, not the code itself [11:06:36] However* how I can transclude the results of that code, not the code itself [11:07:02] Dereckson: done. not sure if that was the answer you were looking for however :( [11:09:07] slushpuppy: I'm not sure, if I can help with that.. i'm not familiar with that extensions. [11:10:15] if transcluding content other than works, then the problem is probably specific to the combination [11:10:43] which means that you'll have to find the authors/maintainers of the extensions, or dive into the code yourself. [11:13:18] thedj: thansk [11:14:28] thedj, Ah ok. so parameter expansion like in the case of: {{#lst:{{Featured_Article}}|intro}} is handled by the extension that provides the #lst function yeah? [11:15:06] so;exuse me [11:15:51] Dereckson: i have no objection to exiv, so if operations doesn't care either... [11:15:59] then i guess go with that. [11:17:42] slushpuppy: these extensions are stacking multiple levels of parsing and transclusion. Since each transclusion method can have several abilities and inabilities, it becomes difficult to know. [11:17:47] ah ok. [11:18:03] can smbdy help me ? [11:18:10] but I came across this paragraph in the wiki; [11:18:12] {{subst:Help:L{{tc}}k}} using Template:Tc, does not do substitution, because Help:L{{tc}}k is not an existing page, although in the regular expansion phase Help:L{{tc}}k expands to Help:Link. Thus the resulting wikitext is the same as the original wikitext and in the regular expansion phase expanded to {{subst:Help:Link}}. [11:18:28] slushpuppy: a transclusion has multiple phases, and extensions in general cannot handle all phases (otherwise you would get endless loops). so where it starts and where it ends is difficult to assess [11:18:47] whats the solution to the said problem of using a template content inside the parameter? [11:18:52] libguli: don't ask to ask, just ask. [11:19:20] i assume it is just {{help:L{{tc}}k}} [11:19:29] thedj: hu? oups, I interpreted as "it's acceptable to wait some weeks for further development to use exiftool" [11:19:49] Dereckson: also ok with me. [11:21:28] Dereckson: the ticket has been open for 2 years, i think that if you wait 'some weeks', you are more likely to fix 2 more years :) [11:21:35] to wait [11:22:03] slushpuppy: a paramater is not full wikitext [11:23:32] o? [11:23:46] slushpuppy: A parameter needs to be resolved before the page can be interpreted completely. that sometimes puts limitations on what you can do with parameters. [11:25:47] Ah ok [11:26:27] so there is no way to "eval" or order of operations right? [11:27:49] so {{subst:Help:L{{tc}}k}} is interpretated as substitute this with the execution of template help:L{{tc}}k. Whereas {{help:L{{tc}}k}} is interpretated as: Transclude the page help:Link [11:29:06] so$i will be glad to wellocme [11:30:16] slushpuppy: there are a lot of details here: https://www.mediawiki.org/wiki/Manual:Substitution [11:32:06] ah ok [11:32:15] thanks thedj [12:44:44] I don't want to pop the champagne prematurely, but the wiki has been stable for almost an hour now! [12:45:42] gry: The solution was completely deleting MySQL (apt-get remove --purge ...), deleting/renaming /var/lib/mysql* folders, and then reinstalling MySQL, creating DB and wikiuser, granting permissions, then restoring the DB. [12:57:10] I got rid of the 5.6 GB InnoDB file at the same time ... [14:45:32] google page speed insights doesn't like monobook or the mobile skins at all [14:48:25] vaya: on which wiki? for a while on Wikimedia it preferred monobook over Vector :) [14:48:57] it's easy to misconfigure some part [14:50:46] I have it set to monobook now [14:51:02] with the MobileFrontend.php extension [14:51:21] that overrides it for phones or something [14:51:28] I don't use phones for web myself [14:53:47] on www.powershelladmin.com [14:54:05] http://www.powershelladmin.com/wiki/Port_scan_subnets_with_PSnmap_for_PowerShell [14:54:43] I should google if I can easily get the counter back, I liked that. [14:55:21] The HitCounters extension provides the page views functionality that was removed in MediaWiki 1.25. [14:55:28] woot [14:56:21] oh, damn, they're gone [14:56:29] one page had like 270,000 views [14:56:34] another 24x,000 [14:56:41] fuck, how will I track it now [14:56:43] pardon my Greek [15:01:20] Oh too bad :( [15:01:36] kgh was thinking of people like you just a couple minutes ago https://gerrit.wikimedia.org/r/#/c/322495/ [15:02:51] vaya: no backup? :[ [15:09:58] "Attention: If you do not act according to the following instructions, an update to MediaWiki 1.26 or newer can permanently delete your hitcounter numbers! See task T120216." [15:09:58] T120216: Installation does not work for MW 1.26+ due to removal of hitcounter table - https://phabricator.wikimedia.org/T120216 [15:12:06] hmm, in hindsight, we probably should have put that part of the update in "if version >= 1.27"... [15:28:11] or just nowhere :) [15:28:37] there will always be people that update from 1.24 or lower [15:29:09] actually, we should probably have put the cleanup in the hitcounters extension. [15:29:20] Or that [15:29:25] and just leave it in if not installed [15:34:39] I hadn't even heard about it being gone ... [15:34:54] I was upgrading from 1.19 (yeah, I know, Ubuntu 14.04 package) [15:35:36] Yeah, it isn't even written in the release notes, not your fault [15:35:57] The release was just made assuming that the DB table was trash for everyone [15:36:39] I've been doing "least possible maintenance", as in, log in and patch, and that's it. Now I have a reason to receive the MediaWiki patch mails I get, finally, though .. [15:45:16] anomie: hey, one quick question: https://gerrit.wikimedia.org/r/#/c/322647/1/includes/ApiHooks.php [15:52:07] thanks [15:52:26] np [17:57:55] Hello? [17:58:20] hello [17:59:33] Uh, I need help with something on mediawiki [18:19:22] !ask | Raf [18:19:22] Raf: Please feel free to ask your question: if anybody who knows the answer is around, they will surely reply. Don't ask for help or for attention before actually asking your question, that's just a waste of time – both yours and everybody else's. :) [18:26:04] Well I'm trying to access a mediawiki based off a game, and it loads just fine, but right after loading it reloads to an Age.html page saying that "There is currently no text in this page" my guess is that the wiki sends me to this page to check my age since the game is +18, so it just keeps reloading until I get to another page with 414 Request-URI Too Large nginx/1.11.3 [18:27:19] Raf: Is this wiki public? Can you link to it? [18:29:22] Yep http://wiki.smutosaur.us/CoC/Main_Page, but this is the page that loads just fine after reloading on it's own to the Age.html page [18:29:40] It happens on my phone too [18:29:43] http://wiki.smutosaur.us/CoC/age.html?url=http%3A%2F%2Fwiki.smutosaur.us%2FCoC%2Fage.html%3Furl%3Dhttp%253A%252F%252Fwiki.smutosaur.us%252FCoC%252Fage.html%253Furl%253Dhttp%25253A%25252F%25252Fwiki.smutosaur.us%25252FCoC%25252Fage.html%25253Furl%25253Dhttp%2525253A%2525252F%2525252Fwiki.smutosaur.us%2525252FCoC%2525252Fage.html%2525253Furl%2525253Dhttp%252525253A%252525252F%252525252Fwiki.smutosaur.us%252525252FCoC%252525252Fage.html%252525253Furl%252525 [18:29:43] 253Dhttp%25252525253A%25252525252F%25252525252Fwiki.smutosaur.us%25252525252FCoC%25252525252Fage.html%25252525253Furl%25252525253Dhttp%2525252525253A%2525252525252F%2525252525252Fwiki.smutosaur.us%2525252525252FCoC%2525252525252Fage.html%2525252525253Furl%2525252525253Dhttp%252525252525253A%252525252525252F%252525252525252Fwiki.smutosaur.us%252525252525252FCoC%252525252525252Fage.html%252525252525253Furl%252525252525253Dhttp%25252525252525253A%2525252525 [18:29:44] 2525252F%25252525252525252Fwiki.smutosaur.us%25252525252525252FCoC%25252525252525252Fage.html%25252525252525253Furl%25252525252525253Dhttp%2525252525252525253A%2525252525252525252F%2525252525252525252Fwiki.smutosaur.us%2525252525252525252FCoC%2525252525252525252Fage.html%2525252525252525253Furl%2525252525252525253Dhttp%252525252525252525253A%252525252525252525252F%252525252525252525252Fwiki.smutosaur.us%252525252525252525252FCoC%252525252525252525252Fage [18:29:49] .html%252525252525252525253Furl%252525252525252525253Dhttp%25252525252525252525253A%25252525252525252525252F%25252525252525252525252Fwiki.smutosaur.us%25252525252525252525252FCoC%25252525252525252525252Fage.html%25252525252525252525253Furl%25252525252525252525253Dhttp%2525252525252525252525253A%2525252525252525252525252F%2525252525252525252525252Fwiki.smutosaur.us%2525252525252525252525252FCoC%2525252525252525252525252FMain_Page%2525252525252525252525252C [18:29:52] Yep [18:29:56] oops [18:30:13] but you get the idea: it's misconfigured [18:32:02] Yeah it just increases the size of the link until the 414 Request-URI Too Large appears [18:32:26] are you the site operator? [18:32:39] Nope [18:33:41] There must be JS making the redirects [18:36:02] What does JS stands for? [18:36:12] JavaScript [18:36:25] Oh right [18:44:02] why is there a url= parameter? [18:44:17] this this some kind of iframe-based "redirect" thingy? [18:45:55] hm, no iframe. well, *somthing* is broken :) [18:51:24] So uh, can I do anything to fix it or only the wiki's owner can fix that? [18:55:41] well, theoretically one can hack something up with Greasemonkey but if you're asking what JS means that's probably not for you [19:00:57] Yeah [19:09:04] Raf: it's possible that a wiki admin can fix it, doesn't have to be the owner. that depends on where the broken JS is managed (on-wiki or not). [19:09:36] I'll try that [20:48:16] vaya, sounds good [20:56:12] And I can confirm the site is still running stably (is that a word) n hours later. [20:56:16] It looks fixed. [21:29:08] how can I make my wiki better in the eyes of google? It's complaining heavily about no compression. [21:29:22] enable gzip? [21:29:41] "mediawiki enable gzip compression" or similar in google will tell me how? let's try [21:29:51] not mw specific [21:29:57] oh, no, Apache [21:29:59] google gzip and your webserver [21:30:07] mod_gzip [21:36:15] "mod_gzip apache ubuntu" brought up a digital ocean article saying to use mod_deflate - and apparently it's already installed. [21:36:47] Maybe need to see what Google is meaning by no compression then [21:38:13] it says here I need to configure the file types to compress [21:38:17] hm [21:38:24] investigating [21:38:37] https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-mod_deflate-on-ubuntu-14-04 [21:42:08] what the heck is the mime type for a skin? [21:42:13] is this even possible ... [21:42:38] o_0 [21:43:35] what's the meaning behind that double O [21:43:40] I know the smiley ... [21:44:25] Confusion, I think [21:44:49] it's loaded via load.php [21:45:11] I just want to compress what it's complaining about here: https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.powershelladmin.com%2Fwiki%2FCheck_for_open_TCP_ports_using_PowerShell&tab=mobile [21:46:03] Looks like gzip isn't running on those requests [21:49:23] Skizzerz: Re mssql nvarchar versus varbinary, the column being added could have truncated UTF-8 characters in it. Is nvarchar still preferred? [21:50:49] so varbinary is weird in mssql land -- it requires translation to query and read from the column (the queries literally look like SELECT blah FROM table WHERE binary_column = 0x12345678 [21:51:13] you can't just throw a random string in, and if you try to CAST() a string value, the result is implementation-specific rather than some portable value [21:51:42] varchar is a string value where each character is 1 byte, nvarchar is a string value where each character is 2 bytes [21:52:49] https://www.mediawiki.org/wiki/Topic:Qfxqy3ldi1ba34o0 [21:52:55] that being said, truncated utf-8 characters are still an issue, as I believe that the *char fields are not encoding-agnostic [21:53:28] (the mssql code in mw transparently does the mapping to/from the binary representation for binary fields, so there shouldn't be any issues there) [21:53:51] vaya: did it work? [21:54:17] anomie: so yeah, given that it may have truncated utf-8 characters, I think binary is probably better [21:54:24] I didn't think of that possibility when I wrote my comment [21:54:38] carry on :) [21:57:47] Skizzerz: Although your comment did point out to me that I needed to change the PostgreSQL and Oracle to use a binary-typed column, so thanks! (: [21:57:59] wooo! [21:58:56] idk anyone that uses oracle, but I'm sure the people using postgres will be happy :) [22:00:34] (I know a few that use mssql, although I tried to convince them to switch to a msyql drop-in like mariadb or percona if they absolutely need the enterprise support) [22:03:00] Skizzerz: BTW, if you want to update https://gerrit.wikimedia.org/r/322728 to drop the default value for the new column on mssql, feel free. I tried to search for instructions, and it sounds like you have to do something weird with constraints so I gave up since I have no way to test it. [22:04:00] Reedy, I set some zlib.compression stuff in PHP after some more research around it (some warnings in the comments in php.ini made me research more). [22:04:07] Reedy, it seems to work. [22:04:15] https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.powershelladmin.com%2Fwiki%2FCheck_for_open_TCP_ports_using_PowerShell [22:04:22] from 66 to 81 for mobile [22:06:33] that's a decent improvement [22:06:43] vaya: Compare with wikipedia for reference