[Solved] mini_httpd in jail : "bind: Address already in use"
Posted: 14 Jul 2013 21:18
EDIT: Don't know what made it work, but it appears that mini_httpd was starting at the start of the jail (which makes sense, I guess, in particular since the instructions I followed did include adding mini_httpd somewhere in the /etc/ hierachy of control file) and the error message was mini_httpd's way of telling me that it had been started twice. Why it didn't look in the /var/run/mini_httpd.pid I do not know...
So, between only starting once and putting explicit address (or host name) for various "server_bind" like options in the service I run on the host, I now have mini_httpd in a jail with no error message. That's nice.
Thanks for taking the time to read this and for the tips which were very educational.
Best Regards
Jens
====================
Dear all,
I found minidlna so easy to put in a jail (using The Brig) that I got cocky and tried for BackupPC. (I have not used BackupPC before, but it sounded right - if there are other solutions allowing backup from PCs and Linux boxes which are known to work in nas4free jails, I'm all ears).
So, I had a look at http://sourceforge.net/apps/mediawiki/b ... Mini_httpd which sounded like just the thing.
Inside a brand new jail (full + src) I ran
Created a /usr/local/www/mini_httpd_config file containing
ran
(OK, that should probably not be explicit "username" above, but we'll let that pass)
and I believe I should be ready to try out the instalkled mini_httpd (which does show up as installed, no problem).
Which does not go well... I get
repeated endlessly and nothing responding when I try to talk to the server.
While I'm sure I missed something (notably the "username" which should probably be "backuppc" without the quotes) the bind error sounds fatal.
The jail options are the first two boxes under "mount" but not procfs and fdescfs .
So, any input welcome!
Best Regards
Jens
So, between only starting once and putting explicit address (or host name) for various "server_bind" like options in the service I run on the host, I now have mini_httpd in a jail with no error message. That's nice.
Thanks for taking the time to read this and for the tips which were very educational.
Best Regards
Jens
====================
Dear all,
I found minidlna so easy to put in a jail (using The Brig) that I got cocky and tried for BackupPC. (I have not used BackupPC before, but it sounded right - if there are other solutions allowing backup from PCs and Linux boxes which are known to work in nas4free jails, I'm all ears).
So, I had a look at http://sourceforge.net/apps/mediawiki/b ... Mini_httpd which sounded like just the thing.
Inside a brand new jail (full + src) I ran
Code: Select all
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/
pkg_add -rv mini_httpd
pw groupadd backuppc -g 800
pw useradd backuppc -u 800 -s /usr/local/bin/bash -d /usr/local/BackupPC -m
Code: Select all
user=backuppc
dir=/usr/local/www/backuppc
cgipat=cgi-bin/*
logfile=/var/log/mini_httpd.log
pidfile=/var/run/mini_httpd.pid
port=2359
#ssl
certfile=/usr/local/etc/ssl/certs/domain.com/server.pem
#debug
Code: Select all
mkdir -p /usr/local/www/backuppc/cgi-bin
htpasswd -c /usr/local/www/backuppc/cgi-bin/.htpasswd username
chown -R backuppc:backuppc /usr/local/www/backuppc
and I believe I should be ready to try out the instalkled mini_httpd (which does show up as installed, no problem).
Code: Select all
/usr/local/etc/rc.d/mini_httpd.sh start
Code: Select all
mini_httpdroot@backuppc:/ # bind: Address already in use
/usr/local/sbin/mini_httpd: can't bind to any address
While I'm sure I missed something (notably the "username" which should probably be "backuppc" without the quotes) the bind error sounds fatal.
The jail options are the first two boxes under "mount" but not procfs and fdescfs .
So, any input welcome!
Best Regards
Jens
