PDA

View Full Version : vqadmin error adding domain


Anonymous
10-26-2004, 12:22 AM
i have vqadmin set up and am experiencing no problems logging in when i go to http://www.mydomain.com/cgi-bin/vqadmin/vqadmin.cgi

all of the links work but when i try to add a domain, and then click enter or "Add Domain" a white screen is returned with nothing on it???

if i leave out a required field ie: password - i am returned a screen that says *Failed: Must supply password*

anyone experienced this or know of a fix

FC2
vqadmin 2.3.2
vpopmail 5.4.7

thanks,
hp

hank@pantier.com

Anonymous
10-26-2004, 12:42 AM
i changed the rights on vqadmin.cgi to 775

now when i go to add a domain i get the normal looking screen with the message

Unable to chdir to vpopmail/domains/domain director

help please

hank@pantier.com

Anonymous
11-06-2004, 12:55 PM
i am having the same problem have you gotten it fixed yet?

Anonymous
01-14-2005, 08:38 AM
Hey friends,
choose the one without mysql support (part 5 of the qmailrocks installation) when installing the qmail you should be fine. Somehow you have scut up mysql along the way that why you got the plain page.

If you can't install without sql support then either remove completely the qmail + software or reinstall Fedora., then reinstall the qmailrocks you should not have anyproblem

Anonymous
02-02-2005, 10:49 PM
I don't get it...

So we have messed up the mysql part of the install if we are getting the white page when trying to add a domain?

Any idea of what we missed? Seems to me that if we missed something we should be able to get it up and running by correcting the problem.

Any idea on what is actually broken that we need to fix?

ThankS!

helpme
02-03-2005, 05:48 AM
Okay the first step is to breath!!!

Here is a start report back with any advances etc...

1) You first need to verify wether VPOMAIL is actually live and working or not. To do this we issue a command to manually install a domain rather than VQADMIN.

Remember just leave it as mydomain.com as we are going to delete it any way so first go to your terminal and give this command

/home/vpopmail/bin/vadddomain mydomain.com

It will ask for a postmaster password and then to verify the password. If VPOPMAIL is active and working it will close off and go to a new line.

To verify it was created by VPOPMAIL enter this command

cd /home/vpopmail/domains/mydomain.com/

Then verify your postmaster account was created by giving this command

dir

If you see "postmaster" in your terminal you are right to continue to step 2

If not and you get errors post them back here as it could be your VPOPMAIL Installl instead of VQADMIN

To remove the domain we just created issue this command

/home/vpopmail/bin/vdeldomain mydomain.com


2) Remove all files in your cgi-bin that relate to VQADMIN and then go back to

http://www.qmailrocks.org/vqadmin.htm

Follow all the steps again correctly do not skip or change any steps as this could effect your installl.

Once done make sure you test it and post your results here so we can investigate the issue further!

Anonymous
02-03-2005, 11:14 AM
Well...I got as far as step one without problems (1st step = breath ;)

I issued the /home/vpopmail/bin/vadddomian mydomain.com and it prompted me far a password, then it looks like it tried to execute a handfull of mysql calls that all errored out.

Here is the actuall output: (wi1 is the hostname of the box)

wi1# /home/vpopmail/bin/vadddomain mydomain.com
Please enter password for postmaster:
enter password again:
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'mydomain_com': MySQL server has gone away
Error. Failed while attempting to add domain to auth backend
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[e]: MySQL server has gone away
Warning: Failed to delete dir_control for mydomain.com
Error: no auth connection
wi1#



So seeing that I thought Ah HA! MySQL is hosed up! So I went back into my sql and tried to verify the database/permissions were there.

Here is what I did:
wi1# mysql -u vpopadmin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.0-alpha

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


so in my mind..I can get into the database under the user that was created for the account.

So then I thought...well...I'll just delete teh database and recreate it with the grant tables, then re-run the vpopadmin install, then try it again and see what happens.....

no luck...

So then I am re-reading the directions for the vpopmail install w/ mysql and I keep comming back to the part that says "now we'll set up the mysql connection" so I thought...we'll I'll just try it again from there in case I botched something.

here we go... (password masked to protect the innocent ;)



wi1# pwd
/usr/home/vpopmail
wi1#

wi1# chown vpopmail:vchkpw ~vpopmail/etc
wi1# echo "localhost|0|vpopadmin|password|***********" > ~vpopmail/etc/vpopmail.mysql
wi1# chown vpopmail:vchkpw ~vpopmail/etc/vpopmail.mysql
wi1# chmod 640 ~vpopmail/etc/vpopmail.mysql
wi1# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.0-alpha

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop database vpopmail;
Query OK, 1 row affected (0.00 sec)

mysql>
mysql> CREATE DATABASE vpopmail;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopadmin@localhost IDENTIFIED BY '*********';
Query OK, 0 rows affected (0.00 sec)
mysql>



so basicly, as you can see above, I deleated the vpopmail database, then recreated it again,

all the seemed to go pretty well, so I continued with the directions:

wi1# mysql -u vpopadmin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 5.0.0-alpha

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>




logged into the database with the permissions I just set up for the user vpopadmin and everythign looked good.

so I went ahead from there and did the vpopmail config again: This post is long enough as it is, so I'll just put in the install status part for the time being...

vpopmail 5.4.7
Current settings
---------------------------------------

vpopmail directory = /usr/home/vpopmail
uid = 1010
gid = 1005
roaming users = OFF --disable-roaming-users (default)
password learning = OFF --disable-learn-passwords (default)
md5 passwords = ON --enable-md5-passwords (default)
file locking = ON --enable-file-locking (default)
vdelivermail fsync = OFF --disable-file-sync (default)
make seekable = ON --enable-make-seekable (default)
clear passwd = ON --enable-clear-passwd (default)
user dir hashing = ON --enable-users-big-dir (default)
address extensions = OFF --disable-qmail-ext (default)
ip alias = OFF --disable-ip-alias-domains (default)
domain quotas = OFF --disable-domainquotas (default)
auth module = mysql --enable-auth-module=mysql
mysql replication = OFF --disable-mysql-replication (default)
mysql logging = ON --enable-mysql-logging
mysql limits = OFF --disable-mysql-limits (default)
MySQL valias = ON --enable-valias
auth inc = -I/usr/local/include/mysql
auth lib = -L/usr/local/lib/mysql -lmysqlclient -lz -lm
system passwords = OFF --disable-passwd (default)
pop syslog = show failed attempts with clear text password
--enable-logging=p
auth logging = ON --enable-auth-logging (default)
one domain per SQL table = --disable-many-domains


wi1#

then did the make && make install-strip (I won't paste all that output unless needed.

Then I started the vqadmin part again....

cd /downloads/qmailrocks

tar zxvf vqadmin-2.3.6.tar.gz

cd vqadmin-2.3.6
./configure --enable-cgibindir=/usr/local/www/cgi-bin --enable-htmldir=/usr/local/www/data


Ahhh haaaa...

Now this looks funny.......



Current settings
---------------------------------------
vpopmail directory = /usr/home/vpopmail
uid = 1010
gid = 1005
cgi-bin dir = /usr/local/www/cgi-bin
vqadmin dir = /usr/local/www/cgi-bin/vqadmin
mysql features = disabled
wi1#


hmmmmmm
MYSql features = disabled...that can't be right.

Problem is that I don't know how to change that. My thought is that it must be something in that
./configure --enable-cgibindir=/usr/local/www/cgi-bin --enable-htmldir=/usr/local/www/data
line...

but I have no idea how to set the mysql flag or whatever I need to do there.

I pasted in pretty much everythign that covered the mysql part on, so you guys can point out if I'm missing something boneheaded. I don't think I have though. Is there something missing in the doc or something there that I missed?

If there is more info that is needed let me know and I'll try to get it here in my next post.

I apprecaite the help! I'm sure the rest of us having the same problem will apprecaite it too!

Thanks!

Tfunk

Anonymous
02-03-2005, 12:13 PM
WHOOOOO

I got it....

the flag to enable mysql for vpopadmin is

--enable-mysql=y

sooooo....

I reran the config part with this line...

./configure --enable-cgibindir=/usr/local/www/cgi-bin --enable-htmldir=/usr/local/www/data --enable-mysql=y


and low and behold I got this....



Current settings
---------------------------------------
vpopmail directory = /usr/home/vpopmail
uid = 1010
gid = 1005
cgi-bin dir = /usr/local/www/cgi-bin
vqadmin dir = /usr/local/www/cgi-bin/vqadmin
mysql features = enabled
wi1#


that has to be a step in the right direction, right?????

well...at least I thoguht so.....

when I try to do the make && make install-strip I get a ton of errors.

wi1# make && make install-strip
make all-recursive
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'vqadmin.c' || echo './'`vqadmin.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'cgi.c' || echo './'`cgi.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'template.c' || echo './'`template.c
In file included from template.c:31:
/usr/home/vpopmail/include/vpopmail_config.h:221:1: warning: "PACKAGE_NAME" redefined
In file included from template.c:30:
config.h:66:1: warning: this is the location of the previous definition
In file included from template.c:31:
/usr/home/vpopmail/include/vpopmail_config.h:224:1: warning: "PACKAGE_STRING" redefined
In file included from template.c:30:
config.h:69:1: warning: this is the location of the previous definition
In file included from template.c:31:
/usr/home/vpopmail/include/vpopmail_config.h:227:1: warning: "PACKAGE_TARNAME" redefined
In file included from template.c:30:
config.h:72:1: warning: this is the location of the previous definition
In file included from template.c:31:
/usr/home/vpopmail/include/vpopmail_config.h:230:1: warning: "PACKAGE_VERSION" redefined
In file included from template.c:30:
config.h:75:1: warning: this is the location of the previous definition
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'global.c' || echo './'`global.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'acl.c' || echo './'`acl.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'misc.c' || echo './'`misc.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'domain.c' || echo './'`domain.c
In file included from domain.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:221:1: warning: "PACKAGE_NAME" redefined
In file included from global.h:26,
from domain.c:30:
config.h:66:1: warning: this is the location of the previous definition
In file included from domain.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:224:1: warning: "PACKAGE_STRING" redefined
In file included from global.h:26,
from domain.c:30:
config.h:69:1: warning: this is the location of the previous definition
In file included from domain.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:227:1: warning: "PACKAGE_TARNAME" redefined
In file included from global.h:26,
from domain.c:30:
config.h:72:1: warning: this is the location of the previous definition
In file included from domain.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:230:1: warning: "PACKAGE_VERSION" redefined
In file included from global.h:26,
from domain.c:30:
config.h:75:1: warning: this is the location of the previous definition
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'lang.c' || echo './'`lang.c
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'user.c' || echo './'`user.c
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:221:1: warning: "PACKAGE_NAME" redefined
In file included from global.h:26,
from user.c:33:
config.h:66:1: warning: this is the location of the previous definition
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:224:1: warning: "PACKAGE_STRING" redefined
In file included from global.h:26,
from user.c:33:
config.h:69:1: warning: this is the location of the previous definition
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:227:1: warning: "PACKAGE_TARNAME" redefined
In file included from global.h:26,
from user.c:33:
config.h:72:1: warning: this is the location of the previous definition
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:230:1: warning: "PACKAGE_VERSION" redefined
In file included from global.h:26,
from user.c:33:
config.h:75:1: warning: this is the location of the previous definition
In file included from user.c:37:
config.h:66:1: warning: "PACKAGE_NAME" redefined
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:221:1: warning: this is the location of the previous definition
In file included from user.c:37:
config.h:69:1: warning: "PACKAGE_STRING" redefined
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:224:1: warning: this is the location of the previous definition
In file included from user.c:37:
config.h:72:1: warning: "PACKAGE_TARNAME" redefined
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:227:1: warning: this is the location of the previous definition
In file included from user.c:37:
config.h:75:1: warning: "PACKAGE_VERSION" redefined
In file included from user.c:35:
/usr/home/vpopmail/include/vpopmail_config.h:230:1: warning: this is the location of the previous definition
gcc -I. -I/usr/home/vpopmail/include -I/usr/include/mysql -I. -I. -I. -g -O2 -Wall -c `test -f 'cedit.c' || echo './'`cedit.c
In file included from cedit.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:221:1: warning: "PACKAGE_NAME" redefined
In file included from global.h:26,
from cedit.c:30:
config.h:66:1: warning: this is the location of the previous definition
In file included from cedit.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:224:1: warning: "PACKAGE_STRING" redefined
In file included from global.h:26,
from cedit.c:30:
config.h:69:1: warning: this is the location of the previous definition
In file included from cedit.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:227:1: warning: "PACKAGE_TARNAME" redefined
In file included from global.h:26,
from cedit.c:30:
config.h:72:1: warning: this is the location of the previous definition
In file included from cedit.c:32:
/usr/home/vpopmail/include/vpopmail_config.h:230:1: warning: "PACKAGE_VERSION" redefined
In file included from global.h:26,
from cedit.c:30:
config.h:75:1: warning: this is the location of the previous definition
gcc -g -O2 -Wall -o vqadmin vqadmin.o cgi.o template.o global.o acl.o misc.o domain.o lang.o user.o cedit.o db_owner.o alphabetize.o -L/usr/home/vpopmail/lib -lvpopmail -L/usr/local/lib/mysql -lmysqlclient -lz -lm -lcrypt -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lz -lm -lcrypt
/usr/bin/ld: cannot find -lnsl
*** Error code 1

Stop in /downloads/qmailrocks/vqadmin-2.3.6.
*** Error code 1

Stop in /downloads/qmailrocks/vqadmin-2.3.6.
*** Error code 1

Stop in /downloads/qmailrocks/vqadmin-2.3.6.
wi1#



so I thought maybe it was seeing the old vqadmin files in the cgi-bin/vqadmin directory.

removed them and tried it again

same problem.

Any ideas?

Thanks!

Tfunk

helpme
02-03-2005, 03:03 PM
Okay now you have recompoiled VPOPMAIL can you add domains from command line or do you still get the same errors?

You do not need to specify --enable-mysql=y as this will just confuse the install.

When you issue a VPOPMAIL command it inserts into the data base any way as VPOPMAIL was compiled with mysql support for authentuication.

So try to add a domain from the commandline again and report back what it says.

Anonymous
02-03-2005, 03:49 PM
Tried adding mydomain.com again manually...same problem

wi1# /home/vpopmail/bin/vadddomain mydomain.com
Please enter password for postmaster:
enter password again:
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'mydomain_com': MySQL server has gone away
Error. Failed while attempting to add domain to auth backend
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[e]: MySQL server has gone away
Warning: Failed to delete dir_control for mydomain.com
Error: no auth connection
wi1#


as far as telling it the --enable-mysql=y if I don't vpopmail doesn't shows mysql features disabled (the actuall screentshot of the data is in my last port.) The only way I could get it to show msql feature support is to supply that --mysql argument.

If I'm doing the make then make install-strip that is where it's actually being compiled, right?

When I try to do that I get a ton of errros, so I'm wondering if it ever got recompiled or if it's still running off the old compiled code.

I have no idea how to get rid of the old vpop admin code to try it again from scratch, but that;s the only idea I have at this point.

What do you think?

Thanks!

Tfunk

helpme
02-03-2005, 04:12 PM
Okay to remove everything issue this command as root

updatedb

Then issue this command

locate vpopmail

Delete any refrence to VPOPMAIL and then issue it again

updatedb

locate vpopmail

Keep doing this until there is no instances of VPOPMAIL on your system left and then start again with the install of VPOPMAIL

Do not worry about adding the switch in wihich you added earlier just remove all instances of VPOPMAIL and reinstall it as per the guide (do not change anything)

./configure --enable-logging=p --enable-auth-module=mysql --disable-passwd --enable-clear-passwd --disable-many-domains --enable-auth-logging --enable-mysql-logging --enable-valias --disable-mysql-limits

That is the configure switch for VPOPMAIL which is located at

http://forum.qmailrocks.org/posting.php?mode=reply&t=1377

Once done check the below file and make sure the user and password is correct

/home/vpopmail/etc/vpopmail.mysql

Then check the file

/home/vpopmail/etc/lib_deps

And confirm the location to mysql is correct.

If all is good then issue the command to add a domain again, if it gives the same errors one of two things is happening

1) Mysql is not in the right place

2) Mysql and VPOPMAIL are not communicating

But we are not lost so do this and report back

Anonymous
02-03-2005, 05:35 PM
I'm going to try that now, so I don't have the results yet...but I just wanted to take a second and say thanks for all your help!

I'll report back shortly :)

Tfunk

tfunk
02-04-2005, 11:27 AM
We'll its working...I'm not sure what I was missing...but it's working now. and everything seems to be going just fine.

I must have missed something in the directions I guess. Now...I'll move onto my NEXT problem ;)

Thanks for your help!

I apprecaite it!!!@

Tfunk

deanostix
02-23-2005, 08:21 AM
I'm having the same problem as the previous user, but I'm still getting errors even after following the instructions in the chat thread.

vmysql: sql error[3]: MySQL server has gone away

I would say my linux knowledge is pretty good and I have found no issues with the install docs. However, my question is, I have installed mysql from source, is that an issue? should I installing the rpm's instead?
I have also installed the mysql client!

Another thing, and this is going to sound really dumb, is the postmaster password the same as the vpopmailuser for mysql password?

thanks

Anonymous
02-23-2005, 10:50 AM
wi1# /home/vpopmail/bin/vadddomain mydomain.com
Please enter password for postmaster:
enter password again:
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'mydomain_com': MySQL server has gone away
Error. Failed while attempting to add domain to auth backend
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[b]: MySQL server has gone away
vmysql: error creating table 'dir_control': MySQL server has gone away
vmysql: sql error[e]: MySQL server has gone away
Warning: Failed to delete dir_control for mydomain.com
Error: no auth connection
wi1#


had the same problem. found out the error...
from Step 5-vpopmail w/mysql...."echo "localhost|0|vpopmailuser|password|vpopmail" > ~vpopmail/etc/vpopmail.mysql"

i had a typo on vpopmailuser. corrected the typo and everything was okay.

fibbers
08-03-2006, 01:07 AM
Hi there, I also had the same problem ('MySQL server has gone away' - messages) and I read all the posts above.

I've come up with the same solution to when phpmyadmin says it cannot find the server-socket, or it is misconfigured (for instance, after you stated in /etc/my.cnf a 'socket=/path/to/mysql/socket.sock' variable).

You then need to change the hostname, 'localhost', to '127.0.0.1'.

In this case I changed /home/vpopmail/etc/vpopmail.mysql so that 'localhost' becomes '127.0.0.1' and it worked!! :)

Might help others too...