HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   PureFTPd and MySQL: error exit status 252 (http://www.howtoforge.com/forums/showthread.php?t=9339)

marsvin 26th December 2006 02:06

PureFTPd and MySQL: error exit status 252
 
Hi All,

I'm having some trouble getting pureftpd to run as advertised in Virtual Hosting With PureFTPd And MySQL

I installed pure and mysql with aptitude but when I try to run it it exits with error 252:

Code:

Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -j -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -A -E -B
invoke-rc.d: initscript pure-ftpd-mysql, action "start" failed.
dpkg: error processing pure-ftpd-mysql (--configure):
 subprocess post-installation script returned error exit status 252

I found another post by someone with the same problem (post) and checked all the settings mentioned there, everything seems fine. The MySQL user is present and I'm able to log in and alter the db under its credentials. MySQL is running and the socket file is present (I tried connecting through tcp as well, same result.)

MySQL logs don't show anything at all outside my own creation of the test-user and the pureftpd log doesn't even seem to have been generated yet.

Oh it may be important to note, during the aptitude install process I was asked one question not mentioned in the howto, do I want to chroot all users? I answered yes. If I remove the package and reinstall it now, the question doesn't come up any more so I'm not sure how to undo that if it is the problem.

Any more thoughts anyone?

falko 26th December 2006 18:17

Does this error come up during installtion, or when you try to start Pureftpd? Are you logged in as root?

Quote:

Originally Posted by marsvin
Oh it may be important to note, during the aptitude install process I was asked one question not mentioned in the howto, do I want to chroot all users? I answered yes. If I remove the package and reinstall it now, the question doesn't come up any more so I'm not sure how to undo that if it is the problem.

I don't know if this is a problem, you you can run
Code:

dpkg-reconfigure pure-ftpd-mysql
to change it.

marsvin 26th December 2006 19:15

I did install everything as root and just tried the reconfigure thing (useful to know ;)) but it returns an error too.

Code:

root:/# dpkg-reconfigure pure-ftpd-mysql
/usr/sbin/dpkg-reconfigure: pure-ftpd-mysql is broken or not fully installed

That error 252 only showed for the first time when I installed the packages (before anything was configured) but it persists now that I have set up the mysql user pureftpd user and database and so on.

Starting the server from the command line just gives me a general error message:
Code:

root:/# invoke-rc.d pure-ftpd-mysql start
Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -j -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -A -E -B
invoke-rc.d: initscript pure-ftpd-mysql, action "start" failed.

But reinstalling gives me the full thing:
Code:

root:/# aptitude install pure-ftpd-mysql
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  pure-ftpd-common
The following NEW packages will be installed:
  pure-ftpd-common pure-ftpd-mysql
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/345kB of archives. After unpacking 922kB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Preconfiguring packages ...
Selecting previously deselected package pure-ftpd-common.
(Reading database ... 29797 files and directories currently installed.)
Unpacking pure-ftpd-common (from .../pure-ftpd-common_1.0.21-5_all.deb) ...
Selecting previously deselected package pure-ftpd-mysql.
Unpacking pure-ftpd-mysql (from .../pure-ftpd-mysql_1.0.21-5_amd64.deb) ...
Setting up pure-ftpd-common (1.0.21-5) ...

Setting up pure-ftpd-mysql (1.0.21-5) ...
Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -j -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -A -E -B
invoke-rc.d: initscript pure-ftpd-mysql, action "start" failed.
dpkg: error processing pure-ftpd-mysql (--configure):
 subprocess post-installation script returned error exit status 252
Errors were encountered while processing:
 pure-ftpd-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up pure-ftpd-mysql (1.0.21-5) ...
Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -j -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -A -E -B
invoke-rc.d: initscript pure-ftpd-mysql, action "start" failed.
dpkg: error processing pure-ftpd-mysql (--configure):
 subprocess post-installation script returned error exit status 252
Errors were encountered while processing:
 pure-ftpd-mysql

I wish it'd show a better error message or some log to check out because I've no idea where to start looking.

I just triple-checked, the user, password and socket in /etc/pure-ftpd/db/mysql.conf are set right. I even ran some of the select lines in the config to see if they work properly, everything seems to be fine.

I did the exact same installation on another machine and it's working fine too. I'm starting to think I may be missing some dependencies? But apt should warn me about those.


edit: By the way, I should say I'm running this on Etch rather than Sarge. Don't think it should make that much difference but it may be worth mentioning.

falko 27th December 2006 17:27

Quote:

Originally Posted by marsvin
I did install everything as root and just tried the reconfigure thing (useful to know ;)) but it returns an error too.

Code:

root:/# dpkg-reconfigure pure-ftpd-mysql
/usr/sbin/dpkg-reconfigure: pure-ftpd-mysql is broken or not fully installed


That's a major problem... Maybe you should start over with a clean system...

marsvin 27th December 2006 19:13

Mmm that's what I was afraid of. Fortunately it's a virtualized server, that makes it a little easier but isn't there any way to remove all cached information about a package and try again from the start?

It seems a little drastic to have to do a full reinstall just because one package didn't configure properly.

marsvin 28th December 2006 01:03

Well I just set up a fresh os template in my vps and got the exact same result. It seems there's something wrong with my base installation or at least something missing that pure needs.. I'll see if I can find some knowledgeable pure-ftpd peeps and report back if I find out what the cause is. ;)

falko 28th December 2006 21:24

Which distribution do you use?

marsvin 28th December 2006 23:17

It's Debian Etch. That other system I tried it on (which worked) was Etch too though. I really feel like it might have something to do with the virtualization. I've tried reinstalling just a base system with a "minimal" Etch template and it came up to exactly the same error. I don't suppose pureftpd requires any special kernel modules to be loaded or anything?

falko 29th December 2006 17:58

Quote:

Originally Posted by marsvin
I really feel like it might have something to do with the virtualization.

That's possible. Which virtualization technique do you use? OpenVZ? Xen? LVS? I've had some strange Postfix issues on OpenVZ once...

Quote:

Originally Posted by marsvin
I don't suppose pureftpd requires any special kernel modules to be loaded or anything?

No, no special kernel module is needed.

marsvin 30th December 2006 19:54

We're using OpenVZ. So far it's been working great though. I followed your Postfix tutorial as well as some others and everything's working great. I'm thinking switching to proftpd may be the way to go. I just liked the look of Pure's configuration better ;)


All times are GMT +2. The time now is 12:14.

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