Shell oddities


#1

I’m wondering if anyone else has this problem… I do 99% of my web work via secure shell, as I’ve always done.

Twice now, my .bash_profile file has been restored to the default, and I’ve had to re-edit it. I’ve now become paranoid and saved a backup of my modified version.

Also, my ~/.mc/ini file (I use Midnight Commander a lot) has been restored, at the same time. Thus, I once again had to do the whole ‘learn keys’ process, etc, and again I’ve had to back up my custom version…

I’m wondering if anyone else has had this problem, and even better if anyone knows what caused it? I’m guessing that using the “control panel” might overwrite some files, and I have decided to stay away from it unless needed – I’ve had my account only for a short time and haven’t determined whether the control panel is causing this or not…

My second issue is about being bumped quite frequently. I’m relatively sure it’s not a simple connectivity issue; http/ftp/etc all work, and a trace shows nothing out of the ordinary. It just seems that the server decides to kick my ssh connection for no reason (it’s not inactivity; this happened a couple of times while actively editing a file)…

Any insight would be greatly appreciated. Otherwise, I’m quite satisfied so far with DreamHost, they seem to run a really nice Debian setup.

  • Jm4n

#2

A few times an hour is frequent; far too frequent in fact. As I mentioned, I do all my work via SSH, so I’ll spend 8 hours straight logged in typically. I’ve done this with many other servers, never with a problem (maybe once per day at most). Here it just seems to be frequent, 3 to 4 times per hour…

I went ahead and sent in a support request regarding the file restoration thing… I’m not sure what’s causing it, but hopefully they can give me a good answer on that.

Of course, right now I can’t get to my site/email/ssh, but this site, and various others are fine. Trace route shows fine as well. Luckily my site is a good month from being live yet, so hopefully I can work these issues out before then…

As for command line editing – I’m not sure if you are refering to being able to edit (arrow keys, delete, CTRL keys etc) the command line itself, but for now I’ll assume it is.

Check your terminal settings. I generally use vt100 emulation with a Linux key map when using a Windows term program. I use SecureCRT 3.0 by VanDyke software, it’s the best out there (next of course to using native Linux).

Anyway, the problem, most likely, is that the server (or, more correctly, bash) doesn’t know how to interpret what your terminal sends for the arrow keys etc. Make sure your TERM variable reflects what is set in your emulator (echo $TERM should yield ‘vt100’). Using ANSI works in some situations, and doesn’t in others. vt100 seems to work for me every time.

Back to the server being inaccessible, it seems the load average spiked up over 200 in the last few minutes. I hope this isn’t a regular occurrance… I’m going to keep an eye on that for a while… Oddly enough, I happened to be editing a file when it happened. My final keystrokes were taken, but I didn’t get any output from it. But, blindly, I did manage to save my Terms of Use page before getting bumped :wink:

Oh, about the “hardware problem” – I don’t think that would be the cause. I’ve only had an account for two days now, and I doubt they’d have restored any files in my account… And it’s only the two files, nothing else was affected. I almost wonder if they have some cron running to “fix” people’s accounts if/when they break certain files? I know most people wouldn’t edit their .bash_profile unless they planned to spend a lot of time logged on, as I do (until the site is up and running anyway)… Anyway, chmod’ing them to 0600 seems to have fixed it, but I still want to find out what exactly is doing it (and if there are other odd things I need to beware of)…

  • Jm4n

#3

Load of 200? Ack! That’s definitely not right, nor common.

If you notice stuff like that, definitely send it to support. It could be a sign of someone doing something on the server they shouldn’t be (like spamming, which is when it falls under my jurisdiction).

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#4

By the time I noticed the load average, the situation was already pretty much back to normal. I only noticed it after finally being able to log back in, it was the 5 minute average that was at 200+. I did keep a close eye on it for the next hour or so (as I mentioned, I was working on my site at the time), and had I noticed it again I certainly would have contacted support.

I trust that it’s rare; in fact, since that incident, I haven’t been kicked from my SSH sessions. That was the first time I checked the load average, so my guess is that early yesterday the server was being heavily loaded… so far it’s been okay since…

Now as for the .bash_profile etc, it seems chmod’ing them has fixed it so far. Apparently whatever process did this does not run as root or my user. A conversation with the support department didn’t turn up anything new either; they say they’d never heard of this happening.

I will say that other than these minor issues, which seem to be under control now, I’ve been satisfied with the service so far. I enjoy the server configuration (mod_rewrite works, and the overall filesystem seems relatively secure for a multi-user system – things are nice and locked down from what I can gleem). I try not to come accross too harsh, but I hate unexplained issues like this. I run many Linux/*BSD systems myself, and I’ve worked on commercial *nix systems as well, so when weird things happen to my files, I become concerned.

However, so far none of my web files have been touched, and as long as it stays like that, I won’t worry too much. I also have to say, the server recovered nicely from a 200+ load average, especially for a 2.2 kernel. I’d expect that from 2.4, but I’ve seen 2.2 spiral down to a halt from a single bad mod_rewrite or recursive autoresponder loop…

Oh, real quick, one thing that would be nice is a php binary, for testing. I could compile my own, but it’d be nice if there was one already on the server, for testing php scripts on the command line (and other things).

At any rate, despite my complaints, I’m a happy customer, so please don’t read too much into my late-night (or early morning as the case may be) rants :wink:

  • Jm4n

#5

The high loads (and perhaps some of the crashing) are most likely because of NFS problems with our temporary data machines. These have been fixed now that we have a new filer (NetApp) - the same as in our other cluster. Other than NFS problems, you shouldn’t see the load get that high.

The .bash_profile / .bashrc getting overwritten is a problem - I’m not sure why it keeps happening. We do keep backups, so there shouldn’t be a problem restoring yours if you ever lose it, but it is somewhat annoying at best - it’s happened to me a couple of times. In fact I think my .ssh/ directory got removed once as well.

If the problem happens again, contact support and have them put it to my attention and I’ll try to take a look.

If you’re still having problems with getting disconnected a lot, you might want to try running traceroutes from your home machine to ours and see if there is any sort of network problem. You can also try running traceroute or (preferred) mtr from our machine back to your home machine.


#6

Just today (less than a week after having been moved to
DH2), my .bashrc and .bash_profile were reset back to the
default. Luckily that oldhome.dh1.tar.gz file was still
around, so I restored it from there. If it happens agan,
I’ll be contacting the support people.