TurnKey Linux Virtual Appliance Library

Problems with Turnkey File Server (no web shell, unable to apt-get, WEBMIN works but TKLBAM does not)

I've been having some problems with my Turnkey File Server.  It seems that everything went to hell when I tried to setup the TKLBAM.  I went through all the various steps with Turnkey and Amazon but am unable to get any action there.  Shortly thereafter, I've noticed the server will not let me Shell in (via the 12320):  all I get is "This Webpage is not available" on Chrome (error 15 (net::ERR_SOCKET_NOT_CONNECTED): Unknown error.)

Webmin seems to work just fine (WEBMIN 1.560 on Ubuntu Linux 10.04.1).

When I try to run a Backup on TKLBAM, I get an

IOError: [Errno 2] No such file or directory: '/var/lib/dpkg/status'

at the end and Amazon seems to have never gotten a backup.

 

If I try to do any kind of apt-get (actually have to type into the server via keyboard) I will get the similar complaint about

E: Could not open lock file /var/lib/dpkg/lock - open (2: No such file or directory)

E: Unable to lock the administration directory (var/lib/dpkg/), are you root?

 

Incidentally, all of these problems arouse around the same time, so I am not sure which are cause/effect.

 

Lastly, I was trying to install Crashplan on the server-- does anyone have any advice on doing that on a headless server like Turnkey File Server?

Thanks in advance,

Mike

Jeremy's picture

My first thought is HDD issues

But I am jumping to wild conclusions with nothing to base this on other than a hunch... Regardless it's the first thing I'd be checking. If you have data on your server you really want, then I'd try manually backing that up before I'd do anything else. Then boot with a Linux liveCD (even the TKL one should do, but make sure you run it live!) then fsck your HDD.

I wouldn't discount that....

.... and I will definitely try that when I can get the server offline.  The TKL server is on a separate HD from the mounted storage drives (which are working fine).  All the File Server (SFTP, FTP, CFS, etc.) functions are working great otherwise.

BUT (something I forgot to mention) the reason I got so into the TKLBAM and wanting to install Crashplan was because I had an epic fail on my UPS backup which was running the server.  It went into several violent reboot conniptions when the battery failed without any warning (BAD UPS!).  Then I had some problems with the File Server booting at all properly and ended up having to do some fsck to get things working again.

Is there a easy way to manually backup my users, groups, file server settings (SAMBA, etc.) and I can start over with a new HD for the Turnkey Server? (That is, if the fsck won't clean it up)?

Jeremy's picture

New info makes me think that HDD corruption probably is cause

And even if the fsck resolved the HDD corruption issues overall, I'd suspect that some important files got corrupted (and the file fragments moved by fsck - as they would've been by chkdsk were this a Win system under similar circumstance...). You could have a look in /lost+found and see if there is anything in there (that's where file fragments go AFAIK).

I would suggest that you create a new server as a VM and manually copy across what you think you'll need. I haven't tried this myself, so it is the blind leading the blind... But generally all settings should be found in /etc - so for Samba it'll be '/etc/samba'. A quick google turned up this thread which looks like it might be relevant (even though it's quite old and for a different distro, it should still be somewhat relevant). It mentions the need to include .tdb files (Samba backend DB files). More info on backing them up properly can be found in the Samba docs here and here. (which would hopefully avoid ths issues discussed in the previously linked thread).

I also found an interesting FAQ on backing up user files (ie /home/<user>) here that looks pretty comprehensive. It is important to note that you need to use tar or rsync when moving/copying user files so that you can preserve the ownership and permissions. The usual cp and mv commands will default the ownership and permissions to root.

For testing, you can change the IP of your VM to the same as your real server (obviously you'll need to unplug the cable from the real server or you'll get an IP conflict) so you can test everything works as it should. Once you have everything running correctly on your new VM, then you can use TKLBAM to migrate the VM back to a clean install on hardware (or better still go virtual all the way with a Hypervisor like Proxmox!).

It'd be great if you could document your progress and report back what works and what doesn't. I'm sure others would find the info useful.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)