Wondering what’s been happening with the offline problems and loss of some posts? Here’s DU’s sys admin, Marc Perkel, to explain it all.

And for those who keep popping off in the comments to posts about Windows or Mac, tell us again why Linux is the future and we’re all idiots for not seeing the light?

Here’s what’s happening.

In order to spread the load and increase capacity I was trying to move the MySQL server to another computer with the main server handling the web and the second server running the MySQL database. Even though I have 8 gigs of ram in the main server every now and then for some reason I can’t explain memory usage soars the the server quits working due to high load.

Most all applications talk to MySQL through “localhost” that resolves to IP address 127.0.0.1 port 3306. Normally moving this service is trivial. I just shut down the database on the main server, move the database to another server, start it up there. Then I set up an SSH tunnel that pipes requests from the main server to the new server by intercepting requests and transporting them over TCP. Generally this just works.

However…

The morons at MySQL decided to redefine the meaning of “localhost” and when an application uses “localhost” the client libraries force it to be redirected to talk to the Unix socket /var/lib/mysql/mysql.sock instead of the TCP port. Why they did this is crazy beyond belief but there’s no way to override it short of downloading the source code and fixing it and recompiling MySQL which is the standard answer that you get whenever you complain too much about Open Source.

I however don’t give up so easily. I found a Linux utility called “socat” (socket concatenate ?) that allowed me to create a fake Unix socket and pipe it to a TCP port. And it worked – for a while. But it wasn’t reliable. As long as I was awake and in front of the computer it worked fine. But as soon as I went to sleep it shut down. So I wake up to a mailbox full of “my web site is down”.

So – I put it back on the main server till I find a real solution.

But – this is yet another example of why open source will never fully replace paid for software. If you have a commercial product people can call up the vendor and scream at them to fix bugs. When I sold commercial software and someone called me needing something fixed or added I usually had it the same day. However in the open source world you have a lot of people who have a highly inflated sense of importance who think their software is the greatest thing that was ever written and it’s crap!

What it comes down to as far as I can tell is the VI editor that comes with Unix causes brain damage. I’m totally serious about this. The VI editor absolutely sucks. It’s years behind editors I got with DOS 20 years ago and is an example of how to make an interface that totally sucks. I have refused to learn this editor because I find it offensive. I do most all my editing with a Windows editor, Textpad, and I run Samba on the Linux boxes so that I can mount them from Windows. That’s because there are no good editors in the Linux world. Other than that I use Pico which is a great little Unix editor for quick and dirty but still isn’t up to the kind of power I had in DOS or even CP/M (Wordstar) which is a better editor than any text mode editor in the Unix world.

I’m still waiting for Linux to catch up to CP/M!!!

My theory is that when people use VI it lowers their standards as to what good software should look like and causes their minds to physically alter in a way that leads to VI syndrome leading to delusions that their little piece of shit software is the greatest program in the world and that they are just so superior to microsoft that it’s just a matter of days before Microsoft collapses and everyone accepts Linux as God.

But what the open source world doesn’t get is that Windows programs actually WORK! If you want to install a windows application you download it, click NEXT, AGREE, NEXT, NEXT, NEXT, FINISH and the program is running. In the Linux world this almost never happens and when it does you’re almost sure that something has to be wrong. In Linux you have to edit cryptic config files with poor documentation. Then you try to run the application, get an error, Google the error, and go back and edit again. After many hours you might have it working or you might have to give up.

Out here in the real world localhost = 127.0.0.1 everywhere EXCEPT in MySQL. Not only did they hard code the bizarre behavior but have no way to override it. In fact they do the opposite. Whatever you set the configuration to they override it and force you to use the Unix socket. So doing something that should be simple becomes a nightmare. And you can’t talk to them because they have VI syndrome.



  1. Ubiquitous Talking Head says:

    It’s George Bush’s fault. And Hitler helped.

    Somebody had to say it.

    I understand Marc’s point, I think. He’s not complaining about vi, per se, just the vi mentality. I agree (in spite of the fact that I have been in the vi corner of the vi vs. emacs battle for a couple of decades. I like vi… I’m just sayin’. )

    MY perspective is that the intended audience is the difference. OSS software is written to be admired and used by other OSS creators. (Don’t want money… got money. Want recognition.) Commercial software is written for one and only one audience; the end user. And the differences are obvious.

    I used to be a (self-proclaimed, anyway) guru, and now I’m just (yet another) cranky old geek remembering the good old days. (I have written working software using MS Debug as an assembler.) I stopped being able to keep up 10 years ago. There, I said it. I’m not proud of it but I’m now in the ignorant end-user camp, and what Marc said is 95% on-target, like it or not.

    At some point, you have to start giving practicality more weight than idealism, especially when it’s paying the bills.

  2. The Monster's Lawyer says:

    I must agree.

  3. Sean says:

    Also if you want to use localhost as the hostname and use TCP/IP for mysql start the server with –protocol=tcp and remove the socket options.

    Again all in the documentation http://dev.mysql.com/doc/index.html

  4. mperkel says:

    Yes 102 – it’s VI mentality. It’s accepting bad as good enough. It’s not VI vs. Emacs, it’s VI vs. Turbo Editor Toolbox from Borland written 20 years ago. Linux has nothing even remotely close to that. It has color, pop up windows, mouse compatible, totally configurable from menus. Anyone can sit down and just use it with no training at all.

    I think the difference is that there is a higher level of accountability in the commercial world than in the open source world. If the open source folks had to pay people to do tech support then they would learn like Microsoft did that if you fix the problem then you don’t have to pay people to take customer complaints.

    I used to spend 1/3 of my time getting software to work and 2/3 to get it to work properly. That means making it intuitive, reliable, well documented, visually attractive, polished. The kind of program I could sell and people would say, IT JUST WORKS. All I had to do was take the money and they were happy.

    In the open source world they get a product up to barely working and stop there. Documentation is poor. The program has weird quirks that require strange work arounds. Lots of non-intuitive settings. Missing necessary and obvious features. Cryptic config files to edit rather than menu based settings.

    And the worse part is the arrogance, that how dare you bring up a new and innovative idea. Like suggesting that a file system have a flag to make file matching case insensitive for those who think case sensitive file systems are stupid. Such a suggestion is heresy and instead of fixing the problem they Google your name to find ways to attack you personally.

  5. mperkel says:

    To #104

    It would help if you bothered to understand the problem before you offered your (wrong) solution. The problem isn’t with the server but the client libraries. The client still goes to the socket even if the socket isn’t there.

    If they changed the client libraries, for example, so if you specified “localhost” that after finding the socket missing that it would then try the TCP port that might work. Or when specifying PROTOCOL = TCP in the client section of my.cnf that it would actually read it and use what you tell it, that would solve it too.

    The problem is that there is no command that will make MySQL not read the socket and that is INSANE.

  6. Sean says:

    fyi: http://dev.mysql.com/doc/refman/4.1/en/multiple-server-clients.html
    5.12.3. Using Client Programs in a Multiple-Server Environment
    To connect with a client program to a MySQL server that is listening to different network interfaces from those compiled into your client, you can use one of the following methods:

    Start the client with –host=host_name –port=port_number to connect via TCP/IP to a remote server, with –host=127.0.0.1 –port=port_number to connect via TCP/IP to a local server, or with –host=localhost –socket=file_name to connect to a local server via a Unix socket file or a Windows named pipe.

    As of MySQL 4.1, start the client with –protocol=tcp to connect via TCP/IP, –protocol=socket to connect via a Unix socket file, –protocol=pipe to connect via a named pipe, or –protocol=memory to connect via shared memory. For TCP/IP connections, you may also need to specify –host and –port options. For the other types of connections, you may need to specify a –socket option to specify a Unix socket file or Windows named-pipe name, or a –shared-memory-base-name option to specify the shared-memory name. Shared-memory connections are supported only on Windows.
    etc…

    my addition.
    Not specifying a hostname or using localhost with default socket options will mean that you will be using a socket connection as a default. This is because socket connections are faster than TCP/IP connections.

    I hope this documentation helps. The mysql forums are also a good resource if you are having issues. (–protocol=tcp works for me, if it’s not working for you then you can submit a bug report http://bugs.mysql.com/)

  7. qsabe says:

    If the second paragraph of every letter you write starts with
    int main( int ) then you will be happy with Linux.

    If you want to run one or two very solid applications from only a few vendors and you really enjoy just looking at a GUI then Apple is your system.

    If you want to run many different kinds of software from many different vendors, then it’s Windows for you folks. Open source runs on Windows. It was developed for Windows. Spend a little time in the video editing world without the big bucks to buy expensive Adobe locks and you can really appreciate Windows. Sure it crashes at times, but the crashes are rare and it catches the crashes better now that it did with Win98, so it’s getting better. At least now it says, I’m sorry and not the blue screen with you screwed up idiot . 🙂

  8. Mr. Fusion says:

    #105, Marc,

    I understand how you, and everyone else for that matter, just want software to work. Commercial software doesn’t always do that.

    After using Roxio 7.0 for a couple of years, I recently upgraded to Roxio 9.0. Roxio 7.0 was buggy. So is Roxio 9.0. Customer support? Ya, right. Their self help is a waste of time. If one digs deep enough and is willing to take some time, often an answer may be found in the community forum. In other words, free help for Roxio’s bugs.

    With Linux and open source software, there isn’t the insult of paying money for buggy software to end up with the same result. The community spirit just feels better.

    But, I’m not a SysAdmin that has to make it work. Besides, I’m appreciative of the DU forum.

  9. Leo Godin says:

    Most applications are configurable. Why don’t you just use the actual hostname instead of localhost? Maybe I’m just getting too used to ruby on rails where this is easy.

  10. Angel H. Wong says:

    #64

    “#61 very well put. Software gets bloated by the hour. Efficient code died long ago. ”

    That’s because end users want pretty OSes.

  11. Leo Godin says:

    Funny, I find MySQL to be easier to administer than Sybase, Oracle, or MS SQL. Also, I use good Windows text editors but always wish I could edit without using my mouse. I just don’t see that Open source sucks. For those who want point and click administration, Windows is king. For those who want more control and greater ability to troubleshoot, open sources is king

  12. Ben Waymark says:

    Blimey: 113 posts and not a lick of any discussion about religion. You’d almost think this was some sort of Tech Blog or something….

  13. AlexV says:

    If you’re so eager to spend your money on “paid” software just to get support, why not pay MySQL for support? Just because it’s free and open-source doesn’t mean they don’t offer direct support.

  14. Old Unix guy says:

    You really make me laugh.
    You are so incompetent and superficial.
    The only thing you should have done to solve your problems was to RTFM. And saying that the documentation is insufficient won’t save you either. The MySQL manual is about 1300 pages!
    If you are too lazy or clumsy to do it yourself, MySQL offers paid support, which you would know if you had looked at the manual.

    About the vi issue, that forced you to use samba file systems: that alone shows that you don’t know your job. You should be glad you have a job, and you should keep your mouth shut, because if a rant like this ends in the hands of your employer, you will be thrown to the street in no time.

  15. OmegaMan says:

    Wow this is a long comment thread…and no mention of Jesus or Dvorak saying Adolf Hitler!

  16. The Monster's Lawyer says:

    #116 – “Old Unix Guy” sort of says it all. You are an agnorant ass.

  17. mperkel says:

    Reading the manual doesn’t fix the problem if the software is broken. Paying for the software doesn’t fix the problem if the software is broken.

  18. iGlobalWarmer says:

    But if you read the Unix Hater’s Handbook you’ll feel better:
    http://research.microsoft.com/~daniel/uhh-download.html

  19. Big A says:

    I think the only reason for this post was to start a flame war and have 100 people post it on Digg in order to drive more traffic over to dvorak.org/blog

    Good job–high marks!

    Mission accomplished.

  20. Chris Brannon says:

    #77, Marc said that “I have refused to learn this editor because I find it offensive.” My point was that it takes 5 minutes to learn all you need to know to use vi regularly. It (cumulatively) takes a lot more time than that to transfer text files back and force to windows to edit them there.

    #105, there are plenty of snazzy GUI text editors for linux, like nedit (see nedit.org). That comes standard with most distros. There are many ways you could run this on the server in question (remote in to the box with vnc or NoMachine NX or use X11 over SSH, for example). If you are using linux as a desktop then you can just launch it in the GUI, naturally.

  21. JoaoPT says:

    #123 come to think of it, all of DU is about religion. All the prolific threads, ie. the ones that go into the hundreds replies, are either about Bible Belt stories, Darwinism vs. Intelligent design, Mac vs. PC and Linux.
    The second best threads are about politics, but are not as fun.

  22. Dirk says:

    Dvorak, you just don’t get it. VI is a rite of passage; an intellectual hazing. Any VI user will attest to it’s ease of use once you scale the near-vertical learning curve. You’re not a member of the UNIX user fraternity unless you can do a find-and-replace from memory.

  23. Mike says:

    This guys a moron. His rant can be summarized as, “I don’t like X software packages and I’m lazy so open source sucks”. If he doesn’t like it go use Windows. Stupid fucking windows weenies. Quit complaining. If you can’t handle the software go find something that’s down at your level.

  24. Ben Waymark says:

    If it wasn’t for things like VI, I’d get paid significantly less for doing what I do, so I just think its great. Hell, it takes years to train to be good plumber or electrician.

    It takes a couple of good books to become at least a competent programmer or system admin.

    Of course, good plumber and electricians get paid more. And people are usually nice to them….

  25. iGlobalWarmer (YOY) says:

    #124 – Don’t forget the other high post count religious topic: Global Warming (TM)

  26. Server Herder says:

    Someone sounds a little frustrated. I know the feeling and anytime stuff stops working I blame the software. 90% of the time, however, it’s my fault. Open source software provides you the flexibility to do whatever you want. Try connecting to SQL SErver over an SSH tunnel and call MS when it doesn’t work… see how far your commercial support contract gets you with that.

    You’re piping Mysql connections over an SSH tunnel ( I don’t even want to know how you’re establishing it and keeping it open, probably in a similar hacked up way) and complaining that instead of connecting via a Network socket it’s trying to use a local Unix pipe?

    Mysql did this because connecting to a server over a full blown TCP socket is considerably more expensive (even when going to localhost) than a local pipe. Why don’t you try connecting to the server’s hostname if you insist on using an SSH tunnel? Better yet, bind the SSH tunnel to a bogus IP alias you bring up on the web server and connect that way.

    Open Source software companies add value specifically from their Support Contracts. If you want to preach on the paid-for software pulpit, buy a flipping support contract!

    Regarding your choice of editors: If you want to keep the training wheels on (and use pico) why not X-forward gedit? Or, better yet, vnc into the server? Use the toolsets UNIX is designed for: VI. There’s a reason there’s a steep learning curve for UNIX software: It’s meant to be managed by people who know what they’re doing.

    I see it all the time in my line of work: Novices think they’re being ultra-clever, hack up their configurations (typically under the guise of being “more secure”) and complain that it “just doesn’t work”.

    Dvorak, fire this Monkey and stop the bloodletting before this buffoon scars the entire site. I am sure it will take months for someone who actually knows what they’re doing to put the pieces back together.

  27. BubbaRay says:

    #89, Greg A, Was it a dobsonian or equatorial mount telescope?

    It was 1984. There were no sound cards, no mice, no VGA, even EGA was too expensive for most. Portable computer? Compaq was brand new and too bulky for the field. Unfortunately, I can’t divulge much more information even today.

    It’s an alt-az 24 inch that, dismantled, will fit in the trunk of a sedan and still functions as specd, now 27 yrs. old. You can actually ride on the darned thing. Not a single bug, not a single service call (with one exception — lightning burned out one controller board – observer survived).

    Cripes, anyone can code some C++ or Basic on a bloated windoze machine these days. Let the DLLs do it all for ya. No art to it anymore.

    Or just go buy “The Sky” and plug the scope in. Or get a Celestron or Orion “goto” scope if you haven’t bothered to learn the sky.

    I’ve actually seen people key in “M45” on a controller because they couldn’t find Orion with their own eyes. Lordy!

    Just sayin’

  28. BubbaRay says:

    Darned fingers can’t type 23 yrs. old.

  29. Allan says:

    Uh… where did “crappy unsupported software” and “unable to de-configure a localhost optimization” imply “VI user” ?

    Is there another group you wanted to also assume? Are all VI users also young grungy heliophobes?

    I just made a similar comment (see URI) — that Commercial OSes tend to simply work better together, are more polished — but because the author is making other assumptions, I move “agree with you” to “you’re an ass”.

    Now, since the sun’s just coming up, I better flee lest I need to shower. 🙂

  30. admash says:

    I just wanted to be a part of the longest DU comment series I have seen yet…

    Linux is a great OS, but not as a desktop. As much as I love the OSS ideals and community, I have to admit I get more done using Windows. After trying several times to ‘make the switch’, I spent more time trying to make linux work than getting my actual work done.

    So, at this point I’ll leave linux on the servers and do my coding with XP.


4

Bad Behavior has blocked 8960 access attempts in the last 7 days.