Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th February 2007, 01:26
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation I restarted my server, apache falls into a heap

My Ubuntu server has been running without a hitch since its installation. Recently it required a restart and once rebooted, things went awry.
First of all, I followed the perfect setup and installed ISPConfig. After the reboot, the websites on the server all pointed to /var/www/, instead of /home/web#/. I stopped Apache and restarted Apache2, and this seems to be resolved. What still doesn't work are the ports.

Nothing looks wrong in the Apache2 logs, but when I restart apache2 I get this:
Code:
 * Forcing reload of apache 2.0 web server...
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

When restarting Proftpd, I get this
Code:
Restarting ProFTPD ftp daemon.proftpd
.. - getaddrinfo 'DOMAIN.com_server.DOMAIN.com' error: Name or service not known
 - warning: unable to determine IP address of 'DOMAIN.com_server.DOMAIN.com'
 - getaddrinfo 'DOMAIN.com_server.DOMAIN.com' error: Name or service not known
 - warning: unable to determine IP address of 'DOMAIN.com_server.DOMAIN.com'
proftpd
 done
Usually the Apache2 error means I don't have a proper IP address in my hosts file, but I do, and I have all this time. It's just.. not work for no reason
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2007, 01:44
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I added this to apache2.conf:

Quote:
# Added ServerName to avoid the could not determine FQDN error
ServerName myserver
Which removed the FQDN error, but the ports are not still working. :81 will take me to /var/www/ instead of ISPconfig like it used to.
Reply With Quote
  #3  
Old 4th February 2007, 13:24
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Did you a clean 'shutdown -r' for restarting the server? It looks like at least a couple of configuration files are in error.

1st: lets check if everything is listening to the correct ports: what's the output of
Code:
netstat -tap
?
Reply With Quote
  #4  
Old 4th February 2007, 13:30
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope, it was restarted by accident, power outage.
I've done a clean restart, but problems persist. This is the output of netstat -tap

Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost.localdo:60000 *:*                     LISTEN     4535/postgrey.pid -
tcp        0      0 localhost.localdo:44736 *:*                     LISTEN     4437/hpiod
tcp        0      0 *:ldap                  *:*                     LISTEN     4543/slapd
tcp        0      0 localhost.localdo:10025 *:*                     LISTEN     5138/master
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     4994/mysqld
tcp        0      0 *:10031                 *:*                     LISTEN     5147/postfix-policy
tcp        0      0 server.domain:imap2 *:*                     LISTEN     4703/couriertcpd
tcp        0      0 *:sunrpc                *:*                     LISTEN     3617/portmap
tcp        0      0 localhost.localdo:10000 *:*                     LISTEN     4550/whitelister
tcp        0      0 *:x11                   *:*                     LISTEN     4364/X
tcp        0      0 localhost.localdo:41332 *:*                     LISTEN     4440/python
tcp        0      0 server.domain:domain *:*                     LISTEN     7129/named
tcp        0      0 localhost.locald:domain *:*                     LISTEN     7129/named
tcp        0      0 localhost.localdoma:ipp *:*                     LISTEN     17522/cupsd
tcp        0      0 *:823                   *:*                     LISTEN     4882/rpc.dracd
tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     7129/named
tcp        0      0 *:smtp                  *:*                     LISTEN     5138/master
tcp        0      0 server.domain:60088 ftp.heanet.ie:www       ESTABLISHED4661/freshclam
tcp        0      0 localhost.localdo:44736 localhost.localdo:40517 ESTABLISHED4437/hpiod
tcp        0      0 localhost.localdo:40517 localhost.localdo:44736 ESTABLISHED4440/python
tcp6       0      0 *:imaps                 *:*                     LISTEN     4726/couriertcpd
tcp6       0      0 *:pop3s                 *:*                     LISTEN     4766/couriertcpd
tcp6       0      0 *:ldap                  *:*                     LISTEN     4543/slapd
tcp6       0      0 *:pop3                  *:*                     LISTEN     4744/couriertcpd
tcp6       0      0 *:www                   *:*                     LISTEN     22936/apache2
tcp6       0      0 *:x11                   *:*                     LISTEN     4364/X
tcp6       0      0 *:81                    *:*                     LISTEN     22936/apache2
tcp6       0      0 *:ftp                   *:*                     LISTEN     22936/apache2
tcp6       0      0 *:ssh                   *:*                     LISTEN     5244/sshd
tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     7129/named
tcp6       0      0 *:smtp                  *:*                     LISTEN     5138/master
tcp6       0      0 *:https                 *:*                     LISTEN     22936/apache2
tcp6       0     84 server.domain:ssh CPE-58-167-28-92.:60579 ESTABLISHED2527/sshd: username2
Reply With Quote
  #5  
Old 4th February 2007, 14:35
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Quote:
tcp6 0 0 *:81 *:* LISTEN 22936/apache2
Do you use ISPConfig?

A power failure restart can have all kinds of nasty side effects (Linus does a lot of buffering in memory and a power crash prevents cache being written back to disk or to close file handles cleanly) and I think that happened. Do you have backups of everything in /etc of a date before the crash? I suggest comparing them by hand.

Did the system do a 'fsck' automatically? You may find something useful then in the lost+found directories (per filesystem), but you need to review those files carefully. Most of the times anything in lost+found is either truncated or hosed in some way. And also you need to determine where the contents is coming from, as fsck just 'numbers' the filenames.
Reply With Quote
  #6  
Old 4th February 2007, 14:42
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep, I do use ISPconfig, which runs on port 81.
There are backup Confs in a lot of the directories, I will probably have to do some restoration in that respect.

I'm not familiar with the workings of fsck.

In the worst case scenario, I'm fine with formatting and reinstalling the server. Is there a way to mostly format, but to keep the ssh client and host?
Reply With Quote
  #7  
Old 4th February 2007, 14:55
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

Reason for asking about ISPConfig is, that you then have the wrong webserver listening on port 81. You now have Apache2 listening and is should be a special ispconfig_httpd program. I would advise a re-installation from scratch.

The ssh client is of course on your client PC and will not be touched. The installation of the ssh server is very easy. But for a re-install, you need to have access to the system and to the system console. If you have that, the quickest route to a full functional system will most likely be a re-install.
Reply With Quote
  #8  
Old 4th February 2007, 15:01
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

Thanks for your help!
Well, I have absolutely no access to this server, everything is through SSH. I would be content with, for now, getting just the FTP port to work. I can handle ISP config not working.

Like you said before, I'll compare the old Conf files and see what I can do. Otherwise, would it be possible to just reinstall Apache2 / Proftpd?
Reply With Quote
  #9  
Old 4th February 2007, 17:03
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
 
Default

You can completely remove a package and reinstall it again. It will give you clean config files.
Code:
apt-get --purge remove <package_name>
Or similar from any package manager.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php Apps email not going through palkat General 8 21st September 2011 06:35
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 11:01
from http to https after installation? Mahir Installation/Configuration 25 7th December 2005 21:40
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 03:30


All times are GMT +2. The time now is 03:28.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.