[Pkg-varnish-devel] Bug#649178: varnish unable to bind to hostname
ZX SKN
skn-intern at zx.nl
Fri Nov 18 14:37:44 UTC 2011
Package: varnish
Version: 2.1.3-8
Severity: normal
When starting varnish with a hostname to bind to, it does not start. When using an IPv4 address it does.
I've started varnish manual in 2 ways. The first with a hostname (which fails) and the second time with an IPv4 address.
varnishd -a redactie-fe:80 -f /etc/varnish/kennisnet.vcl -T 127.0.0.1:6082 -t 120 -w 1,1000,120 -S /etc/varnish/secret -s file,/var/lib/varnish/redactie/varnish_storage.bin,1G -d
WARNING: (-sfile) file size reduced to 302052147 (80% of available disk space)
storage_file: filename: /var/lib/varnish/redactie/varnish_storage.bin size 288 MB.
Using old SHMFILE
Varnish on Linux,2.6.32-5-amd64,x86_64,-sfile,-hcritbit
200 193
-----------------------------
Varnish HTTP accelerator CLI.
-----------------------------
Type 'help' for command list.
Type 'quit' to close CLI session.
Type 'start' to launch worker process.
start
bind(): Cannot assign requested address
300 22
Could not open sockets
quit
500 22
Closing CLI connection
Now the version which does work.
varnishd -a 145.97.37.22:80 -f /etc/varnish/kennisnet.vcl -T :6082 -t 120 -w 1,1000,120 -S /etc/varnish/secret -s file,/var/lib/varnish/redactie/varnish_storage.bin,1G -d
WARNING: (-sfile) file size reduced to 302045593 (80% of available disk space)
storage_file: filename: /var/lib/varnish/redactie/varnish_storage.bin size 288 MB.
Using old SHMFILE
Varnish on Linux,2.6.32-5-amd64,x86_64,-sfile,-hcritbit
200 193
-----------------------------
Varnish HTTP accelerator CLI.
-----------------------------
Type 'help' for command list.
Type 'quit' to close CLI session.
Type 'start' to launch worker process.
start
child (705) Started
200 0
Child (705) said
Child (705) said Child starts
Child (705) said managed to mmap 302043136 bytes of 302043136
Child (705) said Probe("GET /version HTTP/1.1
Child (705) said
Child (705) said Host: 127.0.0.1
Child (705) said
Child (705) said Connection: close
Child (705) said
Child (705) said
Child (705) said
Child (705) said ", 0.2, 10)
stop
Stopping Child
200 0
Child (705) said Child dies
Child (705) died
Child cleanup complete
quit
500 22
Closing CLI connection
According to the /etc/default/varnish it should be possible to use a hostname instead of an IP address.
-- System Information:
Debian Release: 6.0.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages varnish depends on:
ii adduser 3.112+nmu2 add and remove users and groups
ii gcc 4:4.4.5-1 The GNU C compiler
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libc6-dev [libc-dev] 2.11.2-10 Embedded GNU C Library: Developmen
ii libncurses5 5.7+20100313-5 shared libraries for terminal hand
ii libvarnish1 2.1.3-8 shared libraries for Varnish
varnish recommends no packages.
varnish suggests no packages.
-- Configuration Files:
/etc/default/varnish changed:
START=yes
NFILES=131072
MEMLOCK=82000
INSTANCE=$(uname -n)
VARNISH_VCL_CONF=/etc/varnish/kennisnet.vcl
VARNISH_LISTEN_ADDRESS=145.97.37.22
VARNISH_LISTEN_PORT=80
VARNISH_ADMIN_LISTEN_PORT=6082
VARNISH_MIN_THREADS=1
VARNISH_MAX_THREADS=1000
VARNISH_THREAD_TIMEOUT=120
VARNISH_STORAGE_FILE=/var/lib/varnish/$INSTANCE/varnish_storage.bin
VARNISH_STORAGE_SIZE=1G
VARNISH_SECRET_FILE=/etc/varnish/secret
VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"
VARNISH_TTL=120
DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
-f ${VARNISH_VCL_CONF} \
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
-t ${VARNISH_TTL} \
-w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
-S ${VARNISH_SECRET_FILE} \
-s ${VARNISH_STORAGE}"
-- no debconf information
More information about the Pkg-varnish-devel
mailing list