I can't access my blog's MT control panel
July 1, 2006 5:45 PM   Subscribe

This week my blog (languagehat.com) had an unprecedented flood of weird spam; as I was in the midst of deleting another chunk of it, I found myself locked out of my MT control panel (when I try accessing mt.cgi, I get "Invalid login"). Songdog, who helps me with stuff like this, posted a report at the Movable Type Community Forum, where you can find the horrid details; unfortunately, since I'm still using MT 2.63, there's not much in the way of support, and nobody's responded at the forum. If anybody here has suggestions, I'm all ears and deeply grateful.
posted by languagehat to Computers & Internet (22 answers total)
 
Man, that blows.

At this point, I'd look into

A) requesting a backup version of the database from your ISP—they should have one that's a day old, I think.
B) nuking the existing MT install
C) starting over.

I also see you're using BerkeleyDB. Not sure, but you might want to convert to MySQL—I get the impression there are better tools for that.

I use MT too, but more and more I'm attracted to Wordpress—the one thing holding me back is my very customized templates, and my inability to grok Wordpress' themes. But they do have better spam tools, IMO.

I've been using this anti-spam plugin on MT, which requires that the client be running Javascript. So far, spam=0.
posted by adamrice at 6:08 PM on July 1, 2006


In what way was the spam weird?
posted by evariste at 6:42 PM on July 1, 2006


If you log in to your shell, is there a db_recover command?
posted by evariste at 6:50 PM on July 1, 2006


db_recover
posted by evariste at 6:51 PM on July 1, 2006


And other handy utilities.
posted by evariste at 6:52 PM on July 1, 2006


What's the spam got to do with it? It seems like you think it's connected or why mention it?
posted by AmbroseChapel at 7:05 PM on July 1, 2006


Well, languagehat says he was deleting comment spam when it happened. Also, I just clicked on some comment links at the site and got error messages. Check it out.
posted by brundlefly at 7:15 PM on July 1, 2006


The spam itself might or might not have anything to do with it, but I suspect that it was some sort of a race condition or something (perhaps between people posting comments and the MT Blacklist cleanup processing) that caused mt-comments.cgi to go crazy. Either that condition or the subsequent killing of this process by the admins presumably corrupted the database.

After doing some backups of my own I'm going to try db_recover and see what it can do. I haven't messed around with the Berkeley DB directly in this way before so I don't know how much to hope for but it seems worth a try.

Yes, MySQL is probably a bit better and will be used next time. I don't think it was supported when languagehat's blog went live, but if we have to start over we'll use it. A backup copy of the DB files might exist; it's worth asking, I suppose. If all of the MT state is in the database then we can probably turn back the clock that way, though we'd lose recent posts and comments (which could be mocked back up from the static pages, I guess). I'm not sure what are our options are for retrieving a backup, though.

If we have to I'm prepared to lash together some kind of a script that will crawl over all of the published pages of the blog gathering posts and comments and then saving them in MT export format so that we can re-import. Does anyone know of a tool for doing something like this? I'd hate to re-invent the wheel if I don't have to.
posted by Songdog at 7:27 PM on July 1, 2006


Songdog-I've never heard of such a script, though obviously it would be a killer idea. I hope you share if you end up having to write one.
posted by evariste at 8:41 PM on July 1, 2006


I guess if I have to write it myself I may as well make it configurable. I'd probably hack it together in Ruby, which is my newest language (so it wouldn't be pretty).

We did find code for exporting a Blogger blog as a MT export file, which we used years ago to migrate this same site. But going from static MT pages to MT itself is only necessary if something catastrophic occurs, so maybe the market just isn't big enough for this one to already exist.
posted by Songdog at 9:56 PM on July 1, 2006


i'm just chiming in to say that the error totally looks like it has to do with the DB, and not movabletype. i know when my old host would have weird hiccups with the machines that ran mysql, i'd get similar errors. eventually they totally lost my comments_db. i never could recover them... stupid old hosting company.

anyhow, yeah. that trawling recovery script sounds pretty awesome. and you should move to mysql, and maybe even upgrade to mt 3.2 (it's finally free, and the comment management is better.)
posted by kendrak at 10:03 PM on July 1, 2006


I've been having problems with MT for several days and it turned out that it had something to do with my webhost upgrading or changing the way they use PHP, so that some old settings I had didn't work correctly anymore. Could your webhost have made some changes recently? You might want to get in touch with someone on that side of things as well as the MT forums.
posted by srah at 11:09 PM on July 1, 2006


Languagehat, I have nothing positive to offer. The same thing happened to my personal blog last fall. I was using MT 2.661. I asked for help here but nobody had an answer that worked. I still can't login to that Movable Type install.

I had no good solution to the problem. I installed the latest version of MT in a new directory, and then began my weblog from scratch. When I have the time and the inclination, I move a few of the ONE THOUSAND previous entries over by hand. (To do this, I view source, cut the entry body, and then paste into the new MT install.) It sucks. It really does. I have a huge body of work there, and now it's borderline lost.

If this were to happen to me today, I'd make the jump to WordPress. I'm using WP for my other blogs, and I love it. Sure, it's missing some MT features, but overall it's quicker, easier to use, and more customizable. YMMV.

Please please please: if you do find an answer that works, post it here. I'd love it if you e-mailed me a solution, too, but I know that's asking a lot. (I'd also like to know if there's a quick-and-easy way to move my old entries over...)

p.s. I always suspected the trouble with my installation was a corrupt database, though I could never figure out how the corruption might have occurred. Also, the comment system on my old install no longer works, though the trackback pings seem to...
posted by jdroth at 12:49 AM on July 2, 2006


As you still have admin rights to your account, couldn't you access the db (via your isp tools) and copy over the posts tables to a new install? You should actually be able to get them out in .csv or similar format so you can convert them to a new wordpress compatible format after some preprocessing.

Alternately, you could use some sort of scripting language to do the crawl - for a basic one, autoit v3 beta is quite easy if if you use the ie extension outlined on the forums and use the iterate through links by index function.
posted by Mossy at 3:35 AM on July 2, 2006


Looks like you've got a few years of blogging under your belt. One of the problems with the BerkeleyDB database is the larger it is, the more problematic it can become.

In the last few years I've found that contacting MT's support staff via their ticket system has yielded better results than using the forum. In fact, they encourage you to contact them. But I think their ticket system is connected with their version 3 CMS. Also, I think you have to buy a license for their product (rather than using their free version) in order to use their support.

Before going to the cut and paste method of reclaiming your entries (been there, done that and it wasn't fun) I'd upgrade to MT 3, then contact their support staff. Once you get this sorted out, start using MySQL.
posted by Taken Outtacontext at 4:55 AM on July 2, 2006


Oh, and as a postscript, I've gotten into the habit of exporting my MT blog every few weeks. That way, if you do have to start over, it's simple to import all your entries back into the system.
posted by Taken Outtacontext at 4:56 AM on July 2, 2006


PHP isn't the problem (MT is agnostic to PHP, or at least this version is) though the host could have changed something else. I don't think that's the problem, though, because everything started at a time when languagehat was in the middle of doing maintenance on his weblog. There wasn't a lot of time, and I don't believe there was any downtime for host changes to have taken place in.

I'm using MT 3.2 and MySQL on my own site and had discussed migrating languagehat's in the past, but we hadn't gotten around to it yet. I knew MySQL was better but it's news to me that Berkeley DB's stability degrades with size. It's not shocking (especially in light of recent events) but it wasn't something I knew to factor in. Regular exports are of course a good idea but most of us don't do them often enough. Now there's something well worth automating.

We do have shell account to the server, but since a corrupted DB is likely the problem I really don't think copying them to a new install will work, nor will exporting. MT, it seems, cannot access the database either to create or read comment posts, nor even to log in a blog author. If none of this works then the DB files are probably busted (unless they can be fixed with db_recover, which I haven't tried yet).

I'll look at autoit and see what it can do. Otherwise I'll script something that extracts posts and comments into an intermediate form and then outputs them in MT export form. The parsing and formatting steps could be configured to work on other sites or with other export formats. Hey, it's a project.
posted by Songdog at 6:06 AM on July 2, 2006


Response by poster: Thanks for all the comments, everyone.

What's the spam got to do with it?

Maybe nothing. But since there had been a flood of it (it's weird because it doesn't link to any spam sites, it's just some unconnected words without an author or URL) and since I was in the middle of deleting it when this happened, I thought I'd mention it on the off chance it might be of use to anyone trying to figure out what's going on.

At least the site's still there, but it sucks not to be able to do anything to it. And yeah, I should have been exporting more regularly. Sigh.
posted by languagehat at 6:49 AM on July 2, 2006


One idea I'll mention that might be of benefit going forward is using a client-side blog-editing tool. I use Ecto, and one of its nifty features is that it will locally cache the last N entries (where N is whatever you want). This doesn't do anything for comments/trackbacks, but it would let you republish to a different blog (different blogging software, even) just by changing a few settings.
posted by adamrice at 7:38 AM on July 2, 2006


languagehat, if you want to email me (anil at sixapart dot com) i can put you in touch with some folks on the MT team who can help you figure this out.

Repairing Berkeley DB can be a tricky thing, so we'll want to get you onto a real database ASAP. I'd also check if maybe you're running out of file storage space on your hosting account?
posted by anildash at 3:08 PM on July 2, 2006


Thanks for your response, Anil. It's not the storage space; I checked that first (and should have said so). My principal goal is getting everything into MT 3.2 with MySQL; I've lost confidence in Berkeley DB and languagehat would be happier with the antispam measures available in 3.2. But we've got to get to a current export first. We would be grateful for any help safely restoring the DB or otherwise moving forward.
posted by Songdog at 5:04 PM on July 2, 2006


OK, it's finally fixed. I was wrong to accuse BerkeleyDB; the blog was on MySQL all the time. The reason I thought it wasn't was that I went into a DB admin tool to take a look at what I thought was the corrupted MovableType MySQL database and it told me that this database contained no tables. I incorrectly concluded that at some point in years past I had begun the process of moving the blog to MySQL but never finished the work. Wrongo.

As it turned out I had set up the MySQL database just fine, and the administrative tool was giving me a misleading message. The actual problem was that the database was locked. The ISP deleted some lock files for us and everything was fine again; every post and comment was there as they had been left. The first thing I did was to do a full export.

My assumption is that when the ISP killed the comments script this left the DB locked. It didn't occur to me that this was possible but now we know.
posted by Songdog at 4:21 PM on July 20, 2006


« Older What should I give as a wedding gift for a very...   |   Dealing with store security Newer »
This thread is closed to new comments.