FreeBSD Apache HTTP Accept Filter Error

»»»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 load 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

By | 2017-01-26T07:21:40+00:00 January 26th, 2017|Categories: Web Servers|Tags: |21 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.

Connect with LK through Tech Journey on Facebook, Twitter or Google+.

  • Chris

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

  • Bruce

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

    Bruce

  • 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?

  • me

    thanks!

  • TY very much for the info, resolved my issue 😉

  • kiki

    thankz a lot 🙂

  • 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.

  • thanks alot, it's save my work ! 🙂

  • mig

    big tx 🙂

  • 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.

  • joe

    and if you have your apache running
    in a jail, and wish not to touch the
    host, what would you recommend?

  • theorem

    awesome, thank you for fixing this problem !!

  • theorem

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

  • johan

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

  • Lenine

    rc.d script for apache now manage this kernel module
    Just add
    apache22_http_accept_enable="YES"
    to your rc.conf

  • 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 под FreeBSD | Unix4Me()

  • 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.

  • Thanks mate, this helped 🙂

  • 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

  • MonkeyBrains

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

Pin It on Pinterest

Share This

Share This

Share this post with your friends!