PureFTPd and MySQL: error exit status 252

Discussion in 'Server Operation' started by marsvin, Dec 26, 2006.

  1. marsvin

    marsvin New Member

    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?
     
  2. falko

    falko Super Moderator Howtoforge Staff

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

    I don't know if this is a problem, you you can run
    Code:
    dpkg-reconfigure pure-ftpd-mysql
    to change it.
     
  3. marsvin

    marsvin New Member

    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.
     
    Last edited: Dec 26, 2006
  4. falko

    falko Super Moderator Howtoforge Staff

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

    marsvin New Member

    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.
     
  6. marsvin

    marsvin New Member

    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. ;)
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Which distribution do you use?
     
  8. marsvin

    marsvin New Member

    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?
     
  9. falko

    falko Super Moderator Howtoforge Staff

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

    No, no special kernel module is needed.
     
  10. marsvin

    marsvin New Member

    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 ;)
     
  11. d0nut

    d0nut New Member

    i get the same error with openvz.
    the user_beancounters doesn't show any hits.

    any news?

    //UPDATE
    works now perfect with debian4 amd64
    ubuntu8.04 amd64 did not work
     
    Last edited: Sep 16, 2008
  12. gkovacs

    gkovacs Member

    I'm having the exact same problem with pure-ftpd-mysql on an OpenVZ Ubuntu 8.04 server.

    Is it possible to use ProFTPD with ISPConfig 3 instead? The installer seems to handle only Pureftpd:

    Code:
    Configure FTP Server (y,n) [y]: y
    Configuring Pureftpd
     
    Last edited: Jan 6, 2009
  13. sander

    sander New Member

    same problem

    Hi!

    i have same problem trying to install ISPconfig 3 (RC2) on an Ubuntu 8.04 OpenVZ virtual server. Any ideas on how to fix this?
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Try this on the host:

    Code:
    VPSID=101
    for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
    do
      vzctl set $VPSID --capability ${CAP}:on --save
    done
    (make sure you use the correct container ID)
     
  15. sander

    sander New Member

    that fixed the problem! thanks! :)
     
  16. FadeOUT

    FadeOUT New Member

    Same issue

    D'oh, I seem to have the same problem... Ubuntu 8.10 / OpenVZ. It's a hosted vps, so any fix will have to be within my installation. I suppose I'm going to have to compile PureFTP myself..?

    Or is an alternative FTP package an option with ISPConfig 3..?
     
    Last edited: May 6, 2009
  17. FadeOUT

    FadeOUT New Member

    I'm totally failing here - does anybody have any ideas? If I figure out a solution (other than moving to Debian, which may work from what I've read), I'll post it... It's not happening so far, though..!
     
    Last edited: May 8, 2009
  18. falko

    falko Super Moderator Howtoforge Staff

    I'm afraid there's no solution if you don't have root access to the host OS.
     
  19. FadeOUT

    FadeOUT New Member

    That's a pain... Thanks for the info, anyway. Do you happen to know if it works in any other OS (Debian? Ubuntu 9.04 even..?).
     
  20. falko

    falko Super Moderator Howtoforge Staff

    I guess it's the same, but I haven't tried.
     

Share This Page