Freenas 9.1.1 - apache22 Problems - accf_http?

Status
Not open for further replies.

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Recently upgraded my FreeNAS box from 8.3 to 9.1 using the GUI upgrade. For some reason, after install, my jails disappeared and I lost my Subsonic and Apache plugins. I got Subsonic working.

However, after installing Apache, when I try to start it, I get the following error:

[warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
(2)No such file or directory: httpd: could not open error log file /usr/local/logs/error_log.
Unable to open logs
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22


So I followed the instructions here: http://forums.freenas.org/threads/howto-install-apache-under-jail-with-freenas-8-3.10594/

But now, INSIDE the jail when I try to do kldload accf_http I get this:
kldload: can't load accf_http: Operation not permitted

If I try OUTSIDE the jail I get this:
kldload: can't load accf_http: Exec format error

I've tried adding apache22_http_accept_enable="YES" to rc.conf... I'm out of ideas...
 

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Follow up... this came up in my daily log email:

kldload: /boot/kernel/accf_http.ko: Unsupported file layout
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
It seems the kernel module you are trying to load is not compatible with the current kernel build. In general it is not possible to use a kernel module built for an older kernel with a new one. You need to get accf_http.ko that matches/is compatible with the FreeNAS 9.1.1 kernel.
 

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Thanks Dusan, I didn't think of that; I used the files from an 8.3 ISO without really thinking about it.

Could accf_http.ko be missing from my installation because I did a GUI upgrade instead of a fresh install? If so, that seems like something that should be corrected... along with the fact that I lost my jails (which is the whole reason I'm re-installing Apache in the first place.. and no, I don't have my ZFS volume encrypted).

I'll download a full 9.1.1 ISO, mount it, and grab accf_http.ko from it to see if it solves my issue when I get home from work tonight.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
accf_http.ko was never included with FreeNAS. The HOWTO you linked recommends getting it from a FreeBSD ISO.
 

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Oh... well now I'm really confused. When I installed FreeNAS 8.3, I installed Apache using the same process I just attempted with 9.1.1 and didn't have to manually obtain accf_http.ko... I have to admit I'm a Windows guy and *nix is somewhat unfamiliar territory.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
No idea where you got the file before :). However, the instructions you linked above include this:
For me (as I'm using Windows) the easiest way was to download the FreeBSD 8.3 CD image (http://www.freebsd.org/releases/8.3R/announce.html) and mount it using Daemon tools (or such) and copy the following files to my FreeNAS box:
Code (text):
  1. BOOT/KERNEL/ACCF_DATA.KO
  2. BOOT/KERNEL/ACCF_DNS.KO
  3. BOOT/KERNEL/ACCF_HTTP.KO
 

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Right, part of my problem was that I actually followed those instructions verbatim and actually grabbed an 8.3 ISO instead of a 9.1.1, haha.

But yeah, I'm very confused as to how those files were part of my 8.3 installation and I never encountered this issue.
 

underpickled

Contributor
Joined
Oct 1, 2013
Messages
167
Right, part of my problem was that I actually followed those instructions verbatim and actually grabbed an 8.3 ISO instead of a 9.1.1, haha.

But yeah, I'm very confused as to how those files were part of my 8.3 installation and I never encountered this issue.

I've been trying to follow those instructions on 9.1.1 (even though the instructions are for 8.3) but I'm getting "no such file or directory" errors when trying to copy in the KO files listed. Any tips for that?
 

Jim

Dabbler
Joined
Jul 2, 2013
Messages
13
Okay, some other things cane up, and I did a fresh install of FreeNAS 9.1.1 from scratch.

I got all of the above accf_* files copied over from a proper version of FreeBSD, and kldload 'ed them successfully.

But now, when I install Apache, I see a ton of errors that look like: "pkg-static: fstat() failed for (...): No such file or directory

And when I go to start Apache, I get: "WARNING: /usr/local/etc/apache22/httpd.conf is not readable"

I went and looked... httpd.conf is not there. Obviously the installation isn't going properly if httpd.conf isn't being created.

What am I doing wrong this time???
 

RAurelian

Dabbler
Joined
Jan 29, 2014
Messages
37
I`m having the same error: I`m trying to install Apache22 (from the Ports Collection) in a Plugin jail (also tried portjail and standard jail) on FreeNAS (running FreeNAS-9.2.1-RELEASE-x64 (bd35c86)) towards the end of installation process it gives these errors:

Code:
mkdir /usr/ports/www/apache22/work/stage/usr/local/share/doc/apache22
cd /usr/ports/www/apache22/work/httpd-2.2.26/docs/manual && cp -rp * /usr/ports/www/apache22/work/stage/usr/local/share/doc/apache22;
install  -o root -g wheel -m 444 /usr/ports/www/apache22/files/no-accf.conf /usr/ports/www/apache22/work/stage/usr/local/etc/apache22/Includes/
install  -o root -g wheel -m 444 /usr/ports/www/apache22/files/README_modules.d /usr/ports/www/apache22/work/stage//usr/local/etc/apache22/modules.d/
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Installing for apache22-2.2.26
===>  Checking if www/apache22 already installed
pkg-static: warning: database version 21 is newer than libpkg(3) version 19, but still compatible
===>  Registering installation for apache22-2.2.26
pkg-static: warning: database version 21 is newer than libpkg(3) version 19, but still compatible
pkg-static: fstat() failed for(/usr/local/etc/apache22/Includes/no-accf.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/etc/apache22/modules.d/README_modules.d): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_compat.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_config.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_config_auto.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_config_layout.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_listen.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_mmn.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_mpm.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_provider.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_regex.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_regkey.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/ap_release.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_config.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_connection.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_core.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_log.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_main.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_protocol.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_request.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/http_vhost.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/httpd.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_auth.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_cgi.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_core.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_dav.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_dbd.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_include.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_log_config.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_proxy.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_rewrite.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_ssl.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mod_status.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mpm.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mpm_common.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/mpm_default.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/os.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/scoreboard.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/unixd.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/util_cfgtree.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/include/apache22/util_charset.h): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_dav.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_dav_fs.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_deflate.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_dir.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_disk_cache.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_dumpio.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_env.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_expires.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/libexec/apache22/mod_file_cache.so): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/apache22/build/rules.mk): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/apache22/build/special.mk): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-autoindex.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-dav.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-default.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-info.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-languages.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-manual.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-mpm.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-multilang-errordoc.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-ssl.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-userdir.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/extra/httpd-vhosts.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/httpd.conf): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/index.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/magic): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/examples/apache22/mime.types): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/cgi-bin/printenv): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/cgi-bin/test-cgi): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_BAD_GATEWAY.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_BAD_REQUEST.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_FORBIDDEN.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_GONE.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_INTERNAL_SERVER_ERROR.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_LENGTH_REQUIRED.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_METHOD_NOT_ALLOWED.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_NOT_FOUND.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_NOT_IMPLEMENTED.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_PRECONDITION_FAILED.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_REQUEST_TIME_OUT.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_REQUEST_URI_TOO_LARGE.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_SERVICE_UNAVAILABLE.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_UNAUTHORIZED.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/HTTP_VARIANT_ALSO_VARIES.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/README): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/contact.html.var): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/include/bottom.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/include/spacer.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/error/include/top.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/README): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/README.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/a.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/a.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/alert.black.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/alert.black.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/alert.red.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/alert.red.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/apache_pb.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/apache_pb.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/apache_pb2.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/apache_pb2.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/apache_pb2_ani.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/back.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/back.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/c.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/comp.blue.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/comp.blue.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/comp.gray.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/comp.gray.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/compressed.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/compressed.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/continued.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/continued.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/dir.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/dir.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/diskimg.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/diskimg.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/down.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/down.png): No such file or directory
pkg-static: fstat() failed for(/usr/local/www/apache22/icons/dvi.gif): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/index.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/tech.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/tech.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/access.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/index.html.zh-cn): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/vhosts.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/remapping.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/access.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/intro.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/intro.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/rewritemap.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/htaccess.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/index.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/rewrite/avoid.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/ssl/ssl_faq.html.en): No such file or directory

.... (deleted some entries as the message was too long; but the errors continue in the same way; probably it does this for every single file) ...
 
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/urlmapping.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/details.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/mass.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.zh-cn): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.ja.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/details.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/mass.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.ja.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.de): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.de): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/details.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.ru.koi8-r): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html.ja.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/details.html.fr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/index.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/details.html.en): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html.ja.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/mass.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html.tr.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/fd-limits.html.ko.euc-kr): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/name-based.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/examples.html.ja.utf8): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/ip-based.html): No such file or directory
pkg-static: fstat() failed for(/usr/local/share/doc/apache22/vhosts/mass.html.tr.utf8): No such file or directory
Installing apache22-2.2.26... done
To run apache www server from startup, add apache22_enable="YES"
in your /etc/rc.conf. Extra options can be found in startup script.
 
Your hostname must be resolvable using at least 1 mechanism in
/etc/nsswitch.conf typically DNS or /etc/hosts or apache might
have issues starting depending on the modules you are using.


I can add apache22_enable="YES" in my/etc/rc.conf and it tries to start apache but complains that httpd.conf is not present in /usr/local/etc/apache22. If I put that file there (from the example folder) it tries to start but fails with no speciffic error (but obviously a lot of files are missing by judging from the errors).

Did anyone figured out why this happens? is there a solution?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not to be a total jerk, but unless the problem is directly attributable to the jails and how they work(or don't work) then this isn't the best place for support. You should seek out the FreeBSD support forums.
 

RAurelian

Dabbler
Joined
Jan 29, 2014
Messages
37
Nice too see the forum guard is at its post :)

Thank you for the reply; you are not a total jerk :)

The problem is that this error bugged me for quite some time and I investigated multiple causes (apache itself, FreeBSD, FreeNAS) - in the end I managed to find the cause and fix the issue, so that Apache and other ports I had issues with now install properly.

A little background:
I started using Jails in FreeNAS from version 9.2.0 (release) and in that version running 'pkg install' commands worked OK. I did not need this anyway as I was trying to build something from source code into a Jail; but I mention it that now it seems important. After upgrading to FreeNAS 9.2.1 (release), in the newly created jails the 'pkg install' commands no longer worked at all (in fact, any 'pkg' command will result in the text "Updating repository catalog" and then it did nothing). Again I paid no serious attention since all I wanted was to install some ports from the port collection (and some worked, like MySQL, but others failed - like Apache). The issue occurred in all types of FreeBSD Jails in FreeNAS.

In the end the problem was fixed by uninstalling the existing pkg manager version and re-installing it + manually creating the repository. In case someone might find this info of use, I will post the steps here:

Note: all commands are run inside the jail using the shell provided by FreeNAS for the Jail.

ran '/usr/sbin/pkg' to bootstrap the system
ran 'cd /usr/ports/ports-mgmt/pkg' to go to the pkg manager port folder
ran 'make deinstall' and then 'make clean' -> uninstalled the old pkg manager
ran 'make' and then 'make install clean'
ran 'pkg2ng'

ran 'rm /usr/local/etc/pkg.conf' to remove the old config file of the pkg manager
ran 'mkdir -p /usr/local/etc/pkg/repos' to create the folder for the repository of the new pgk manager
ran 'edit /usr/local/etc/pkg/repos/FreeBSD.conf' to create a new file and pasted in it:

Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}


ran 'pkg update' and 'pkg upgrade' to make it up-to-date; then checked version with 'pkg -v'

Now 'pkg install' works OK


After fixing the package manager inside the jail with the steps mentioned above, Apache will install fast and flawlessly from the ports collection.
I do not know if this problem is FreeBSD`s problem or FreeNAS`, but since in v9.2.0 'pkg install' worked OK and in this version it does not, I was inclined to blame FreeNAS` implementation.

Anyway, maybe someone else may find this info helpful. FreeNAS + the jail system has the possibility of becoming so much more than a Storage Server / NAS (if all ports work OK, of course).
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Don't get me wrong, you are welcome to post here, and if you are at least running it in a jail I generally won't delete the thread. This forum just isn't the most ideal place for answers with things inside the jails. I'm all about people going to the "best" place for support rather than the most convenient, if possible.
 

RAurelian

Dabbler
Joined
Jan 29, 2014
Messages
37
Yes I know and understand.

Anyway, maybe another FreeNAS user with the same issue inside FreeBSD Jails may find this useful.
 
Status
Not open for further replies.
Top