Failed to regenerate table - error trying to create new virtual server

Attempting to create new server:
This error occure after the user , home dir and group are successfully set up - Failed to create virtual server : Failed to regenerate table /etc/postfix/virtual: postmap: warning: My hostname silica is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf

I have successfully created servers in the past.

Anyone know what I should be doing to make this easy again?

System hostname : silica
Operating system : Debian Linux 3.1
Webmin version : 1.350
Virtualmin version : 3.42
Postfix version : 2.1.5

Howdy Pasi,

It means exactly what the error says. Your box doesn’t have a fully qualified hostname, and it must have one.

I suspect you’ve changed the IP address on the server without updating the hosts file entry where the hostname was defined (the install.sh would have forced you to set a fully qualified hostname, in anticipation of just this kind of problem). Or, switching the nsswitch.conf order, or removing files from the list of possible resolution options, could also have triggered such a result.

So, check to be sure /etc/hosts is correct. There should be a hostname entry like this:

70.86.4.238 virtualmin.com virtualmin

Where obviously your IP and hostname would replace the ones shown.

Then check to be sure nsswitch.conf is actually querying files (and it ought to query before dns):

grep ^hosts: /etc/nsswitch.conf

It ought to be:

hosts: files dns

After getting the hostname set appropriate, you’ll need to restart Postfix to have it pick up the change.

Holler if the problem persists.

Thanks Joe!

I checked the /etc/hosts and thought it looks as expected -

"127.0.0.1 localhost localhost.localdomain
x.x.x.x silica silica.mydomain.com " (the x’s are my correct IP add)

I checked the /etc/nsswitch.conf and found this looking ok:

" hosts: files dns "

I restarted Postfix, deleted the user, group & home dir of the virtual server for the domain I had been unsuccesfull creating and tried to create the virt server again.

This time I was able to go through the process of creating it ( the regenerate table error still occurs and is listed but it doesn’t stop the process). However having done this all my websites become unavailable.

Attempt to restart Apache causes the following error:
"
Failed to re-start service :

Starting web server: Apache2Syntax error on line 2 of /etc/apache2/sites-enabled/newdomain.com.conf:
Invalid command ‘SuexecUserGroup’, perhaps mis-spelled or defined by a module not included in the server configuration
"

By deleting the newly set up virtual server (it takes 2 attemps, as the same regen table error occurs on first attempt) Apache is happy again and my sites are available.

So I still can’t add new servers at the moment but hopefully there’s a bit more info here in case you might be able to give some more help.

Thanks Joe!

I checked the /etc/hosts and thought it looks as expected -

"127.0.0.1 localhost localhost.localdomain
x.x.x.x silica silica.mydomain.com " (the x’s are my correct IP add)

I checked the /etc/nsswitch.conf and found this looking ok:

" hosts: files dns "

I restarted Postfix, deleted the user, group & home dir of the virtual server for the domain I had been unsuccesfull creating and tried to create the virt server again.

This time I was able to go through the process of creating it ( the regenerate table error still occurs and is listed but it doesn’t stop the process). However having done this all my websites become unavailable.

Attempt to restart Apache causes the following error:
"
Failed to re-start service :

Starting web server: Apache2Syntax error on line 2 of /etc/apache2/sites-enabled/newdomain.com.conf:
Invalid command ‘SuexecUserGroup’, perhaps mis-spelled or defined by a module not included in the server configuration
"

By deleting the newly set up virtual server (it takes 2 attemps, as the same regen table error occurs on first attempt) Apache is happy again and my sites are available.

So I still can’t add new servers at the moment but hopefully there’s a bit more info here in case you might be able to give some more help.

Hey Pasi,

It sounds like this was an existing server with a pre-existing configuration? That can be trickier than a fresh OS. (Not impossible, or even all that difficult…but problems can arise.)

The Apache error is a missing Apache module. You can enable it with:

a2enmod suexec

And then restarting Apache.

Thanks Joe,

Yes this server was previously configured.

I have done as suggested with these results :

> a2enmod suexec
Module suexec installed; run /etc/init.d/apache2 force-reload to enable.
> /etc/init.d/apache2 force-reload
Forcing reload of web server: Apache2[[Mon Jun 18 23:00:57 2007]] [[warn]] The Alias directive in /etc/apache2/sites-enabled/horde2.conf at line 2 will probably never match because it overlaps an earlier Alias.
[[Mon Jun 18 23:00:57 2007]] [[error]] VirtualHost :80 – mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results
[[Mon Jun 18 23:00:57 2007]] [[error]] VirtualHost :80 – mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results
[[Mon Jun 18 23:00:58 2007]] [[warn]] The Alias directive in /etc/apache2/sites-enabled/horde2.conf at line 2 will probably never match because it overlaps an earlier Alias.
[[Mon Jun 18 23:00:58 2007]] [[error]] VirtualHost :80 – mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results
[[Mon Jun 18 23:00:58 2007]] [[error]] VirtualHost :80 – mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results

I still have the same original error "regen table…" when trying to add a domain.

Any further suggestions on how I should troubleshoot the issue of the regenerate table error so I can add a new virtual server whould be appreciated.