Steven Booth's picture

Hello,

I have configured Zabbix to run on Turnkey Ubuntu 10.04 and everything was fine util I updated an apache software update.  I lost my Zabbix web interface.  I was able to get the interface back but now the Web Shell port is not working, e.g. I get an unable to connect.  I checked the etc/apache2/ports.conf file and the line "listen 12320" is there.   Also the PHPMyAdmin link opens up the /etc/phpmyadmin folder instead of the web interface.

 Is there any other configuration that I can check.

Thanks for any help.

Steve

Forum: 
Tags: 
Jeremy Davis's picture

That can often happen when a package is updated, although it usually asks you what you want to do (keep existing, replace with new one, or merge them both).

Have a look in /etc/apache2

If you're not really sure what to do, worst case scenario you could install TKL LAMP to a VM and copy the config files across to your existing install.

Steven Booth's picture

Thanks for the reply.

Which folders or files (config) would I need to copy over?

Thanks again for the help.

Jeremy Davis's picture

But perhaps first rename the existing directory (just in case). I will refer to your servers as old-server (the original one which you want to keep) and new-server (the temporary one for robbing files - this server will be deleted eventually). These commands are off the top of my head so may not work as expected. Nothing bad should happen, but to be on the safe side make sure you back up anything important first.

On old-server stop Apache and rename the config directory:

service apache2 stop
mv -r /etc/apache2 /etc/apache2.old

Double check its been renamed:

ls /etc/apache2
ls /etc/apache2.old

If all worked as expected the first line should return an error:

ls: cannot access /etc/apache2: No such file or directory

And the second should display some files/folders (NOT an error).

Assuming that all went ok, still on old-server rsync everything from that directory across (you will need network access between the 2 servers - you will also need to input the old-server root password):

rsync -av --stats --progress root@<new-serverIP>:/etc/apache2/ /etc/apache2/

eg if your old-server IP is 192.168.1.150:

rsync -av --stats --progress root@192.168.1.150:/etc/apache2/ /etc/apache2/

Still on old-server check the files are where they should be and assuming they are restart Apache:

ls /etc/apache2
service apache2 restart

Hopefully everything now works as expected again!?

[edit] Please note these commands have been edited since this post was made originally. Therefore the feedback below may not necessarily still be relevant.

Steven Booth's picture

Hello,

Sorry I haven't gotten back but been on other things...I am going to give this a here soon.

Again I appreciate the help.  I have been mainly working with Windows/Novell(old netware version) but I am starting to use linux now so its a learning curve.

Thanks

Steve

Steven Booth's picture

Well I had an earlier version of the server on an esxi server so I tried to rsync the apache2 folder over from there but it created the apache2 folder but never rsync'd the rest of the files over.  So I tarred and gzipped the apache2 directory and copied over to the old server.  But it still fails and now the Zabbix site doesn't show up.  So I rolled back the configuration.  I am thinking of backing up the Zabbix db and configs and restoring to new server.

Thanks for the help.

Jeremy Davis's picture

But your idea of backing up Zabbix data & config and migrating it to a fresh instance seems very sound to me. I would suggest that you do not destory the old instance until you are fully satisfied that the new one works (although you've probably considered that already).

From a quick look Zabbix looks like it could be a good candidate for an official TKL appliance. If you would like to push this idea forward, please document your install process or better still, create a TKLPatch. Regardless, just documenting your process and posting it will at least help others install it and could form the basis of someone creating a TKLPatch (if you don't have the time/patience/know-how).

To save yourself the risk of this happening again in the future give TKLBAM a whirl.

Steven Booth's picture

Thanks for your help.  I noticed that there is already a request for a Zabbix appliance just hasn't been picked up yet.  There is some documentation on the Zabbix site for installing Zabbix on Ubuntu but I think I will work on documenting from a turnkey linux perspective.  Would I post this procedure in the forum or is there a wiki I should use?  I'm not sure if I can do the TKLPatch but I am going to give it a look and see if I can.  I would like to help the project if I can.  Thanks for suggesting the TKLBAM I am going to take a look at it.  This all started because I did something I never should have done.  We run the TKL on vmware esx servers and I should have snapshot before the update.  All other updates have gone fine and so I got lazy and didn't do the snapshot.  Hard lesson learned. :)

Thanks again for your help.

Steve

Jeremy Davis's picture

May as well just start a new post in the general forum I reckon. If you create a patch better still, but a documentation of the install process would be a great start. TKL v11.x is Ubuntu 10.04 under the hood so instructions you find online should pretty much work.

Look forward to hearing how you go.

Jeremy Davis's picture

I think I know why the rsync commands above didn't work as expected for you. I'm sure that I used those exact commands successfully, but I recently reused them and had the same problem as you (folder copied but nothing inside). I did a little research and found what I think is the issue (trailing slash missing from one line) I also changed the swithes (-a includes all the ones I used before plus some others) and the order of the locations (swapped them so it can all be done from the old server which makes it easier) and also added the root user to the remote location (ie root@...).

I have done these edits from memory so hopefully I haven't missed anything and I know it's probably no real relevance to you anymore, just wanted to make it more useful just in case someone else stubles across this thread.

Steven Booth's picture

Well I was able to build the new TKL lamp server, install the lastest version of Zabbix then migrate the data from the old zabbix server to the new server.  Everything appears to be working now.  I have notes and will post something in the general forum on what I did.

Thanks for your help.

Steve

Jeremy Davis's picture

Excellent, thanks very much.

Add new comment