Apr 23, 2006
My Digital Life Editorial Team

FreeBSD Apache HTTP Accept Filter Error

When Apache web server is starting up in FreeBSD system, Apache loads succcessfully and web server functioning properly, but the following warning error occurs:

[warn] (2)No such file or directory:
Failed to enable the ‘httpready’ Accept Filter

The resolution to the above problem is to a accf_http module, which function is to buffer incoming connections until a certain complete HTTP requests arrive, into FreeBSD kernel by using kernel linker:

kldload accf_http

To permanently load enable HTTP Accept Filter FreeBSD kernel module (accf_http), add the following line into /boot/loader.conf:

accf_http_load="YES"

Note: The default settings is located in /boot/defaults/loader.cnf. To see the related settings about accf, use:

grep accf /boot/defaults/loader.conf

which will returns:

accf_data_load=”NO” # Wait for data accept filter
accf_http_load=”NO” # Wait for full HTTP request accept filter

  • MonkeyBrains

    I agree with Alex. Drop that crappy, fancy, double quote thing from your blog. :)

  • http://basespace.net Alex Aminoff

    Great solution, thank you. However, when I went to copy and paste the line

    accf_http_load=”YES”

    into my config file, it produced a horrible mess all over my editor. The reason is that you have some fancy directional double quotes, no doubt helpfully supplied by your text editor. When putting in snippets of a config file, however, it would appear that the correct thing to do is always use plain old ascii double quotes.

    Thanks

    – Alex Aminoff

    BaseSpace.net

  • http://NotAverage.com Donato

    Thanks mate, this helped :)

  • Mark

    Note for users in a FreeBSD jail:

    since the jail doesn't have it's own kernel, and doesn't have access to modify the host kernel, you will not be able to run the kldload accf_http command (or edit loader.conf).

    (You should probably only get this error in teh first place if Apache2 isn't running on the host machine.)

    To solve, run the command (and edit loader.conf) on the host machine.

  • Pingback: Ошибка при запуске Apache под FreeBSD | Unix4Me()

  • BD

    I just got a new jail on FreeBSD 7.0, and installed apache, I got the error when starting apache, so I tried to follow the advice here, but when I tried to add this line accf_http_load=”YES”

    to /boot/loader.conf

    I got this error: Read-only file system.

    I tried to run the mount command to make the file read/writalbe, but I got

    fstab: /etc/fstab:0: No such file or directory

    Am I missing fstab file? How do I edit the file?

    Thanks,

  • Pingback: Apache, PHP, Mysql i Zend Framework | Putešestvije moje()

  • Lenine

    rc.d script for apache now manage this kernel module

    Just add

    apache22_http_accept_enable="YES"

    to your rc.conf

  • Pingback: Aaron Martinez » Blog Archive » Failed to enable the ‘httpready’ Accept Filter()

  • johan

    You're a genious!! Solved in 5 minutes instead of 5 hours.

  • theorem

    thank you thank you ! So happy that you posted this fix !

  • theorem

    awesome, thank you for fixing this problem !!

  • joe

    and if you have your apache running

    in a jail, and wish not to touch the

    host, what would you recommend?

  • http://rainbow-it.net ChrisP

    Adding to /boot/loader.conf will make the change permanent, but if you fancy testing this change out without rebooting your system, you can run this: –

    <code>

    # kldload accf_http

    </code>

    You can see that it's been loaded by doing: –

    <code>

    # kldstat

    Id Refs Address Size Name

    1 5 0xc0400000 6f6544 kernel

    2 1 0xc41f6000 2000 accf_http.ko <– you just loaded this module!

    </code>

    You can now restart Apache and see that your previous error is no longer.

  • Pingback: Just a bunch of notes … » FreeBSD “httpready” errors()

  • mig

    big tx :)

  • http://jendalsepit.web.id haizum

    thanks alot, it's save my work ! :)

  • Pingback: rakhesh, deblogged » Blog Archive » FreeBSD: “httpready” errors()

  • Pingback: links for 2007-04-28 « PaxoBlog()

  • Kean Lau

    Thanks! That saved me probably a few hours of trouble shooting. This is the ONLY article that Google matched for the httpready accept filter problem.

    For those of you who want to run Apache as non-root, make sure that you set the PidFile and LockFile attributes in your httpd.conf to a directory that you non-root account can write to.

  • kiki

    thankz a lot :)

  • Pingback: Erro do Apache HTTP Filter()

  • http://www.wilnet1.com Trey Hunsucker

    TY very much for the info, resolved my issue ;)

  • me

    thanks!

  • Mark Mieczkowski

    Thanks for the tip. However, I don't want to run httpd as root, for security reasons (it's not a web server just a svn server). If I switch to a non privlaged user this error comes back. Do I have to turn request buffering off?

  • Bruce

    ditto. Good job. Its quite difficult getting information on this one. thanks again.

    Bruce

  • Chris

    Thanks for posting this article, it saved me alot of time tracking down that error message.

    –Chris