Troubleshooting: Setting up varnish 2.1.2 on OpenSolaris
Jorge Díaz
jdzstz at gmail.com
Wed Jul 7 11:31:38 CEST 2010
Hello Jacques,
I have installed Varnish 2.1.2 in Solaris 10 (not OpenSolaris) and I also
had some issues at the begining with GCC compiler, the VCL compilation and
some varnish tools.
With GCC 3.4.3 I had lot of problems compiling and I upgraded to GCC 3.4.6
(see http://varnish-cache.org/ticket/711 )
About ticket 649, LINGER crash [ http://varnish-cache.org/ticket/649 ] I
was able to detect that is a issue of Solaris itself and can be fixed
modifing some "asserts" in sources ( *S**olaris setsockopt returns sometimes
EINVAL* ) the fixes are in http://varnish-cache.org/changeset/4868 and I
think in future version 2.1.3
I also had some problems with varnishncsa logging (we have to keep a track
of all request). Varnishncsa coredumped because a duplicated ReqEnd the
solution is in http://varnish-cache.org/ticket/709 and also in
http://varnish-cache.org/ticket/633
About your problem " ld.so.1: varnishd: fatal: relocation error:
R_AMD64_PC32: " in google I have found this:
- http://opensolaris.org/jive/thread.jspa?messageID=128240
- http://www.mail-archive.com/tools-discuss@opensolaris.org/msg02012.html
- http://www.mail-archive.com/tools-discuss@opensolaris.org/msg02015.html
They say to compile with -Kpic parameter, try changing cc_command
After changing GCC, and applying solutions of ticket 649, 709, 711 and 633,
Varnish is working OK in production. I think version 2.1.3 will fix all
problems.
Jorge
2010/7/7 Jacques <whshub at gmail.com>
> Hello,
>
> I'm trying to setup Solaris on OpenSolaris b134. I'm doing a setup in a
> brand new zone. I have reviewed the instructions on
> http://www.varnish-cache.org/wiki/Installation#OpenSolaris and am having
> problems.
>
> With a brand new zone, I've found that in addition to installing the list
> of packages provided, I also need to install: SUNWpcre & SUNWlibm.
>
> Once installed, I can configure & build correctly with:
> ----
>
> VCC_CC="cc -Kpic -G -m64 -o %o %s" CC=/usr/bin/gcc CFLAGS="-O3
> -L/opt/extra/lib/amd64 \
> -pthreads -m64 -fomit-frame-pointer" LDFLAGS="-lumem -pthreads"
> ./configure --prefix=/opt/extra
>
> make && make install
> ----
>
> I start by running:
> # /opt/extra/sbin/varnishd -d -a:80 -b 87.238.47.204:80
> >Compiled VCL program failed to load:
> > ld.so.1: varnishd: fatal: relocation error: R_AMD64_PC32: file ./
> vcl.ORk8t3RP.so: symbol main: value 0x2800dcfbd44 does not fit
> >VCL compilation failed
>
> Not unexpected, I run:
> # /opt/extra/sbin/varnishd -d -a:80 -b 87.238.47.204:80 -p cc_command='gcc
> -G -m64 -o %o %s'
> >Compiled VCL program failed to load:
> > ld.so.1: varnishd: fatal: relocation error: R_AMD64_PC32: file ./
> vcl.ORk8t3RP.so: symbol main: value 0x2800dcdbd44 does not fit
> >VCL compilation failed
>
> So I install the sunstudioexpress compiler:
> # pkg install sunstudioexpress
> # /opt/extra/sbin/varnishd -d -a:80 -b 87.238.47.204:80 -p cc_command="
> /opt/SunStudioExpress/bin/cc<http://src.opensolaris.org/source/s?path=/opt/SunStudioExpress/bin/cc&project=/webstack> -c
> -Kpic -m64 -o %o %s"
>
> >"./vcl.ORk8t3RP.c", line 356: warning: initializer will be sign-extended:
> -1
> >storage_file: filename: ./varnish.BAaWXR size 461096 MB.
> >Using old SHMFILE
> >Varnish on -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.
>
> Varnish appears to be running. However, I getting 503s when I try to
> Varnish.
> I saw that the warning was mentioned in a closed bug:
> http://varnish-cache.org/ticket/649
>
> So, can someone giving me some pointers? I really would like to use just
> the gcc compiler and not have to load all the SunStudioExpress stuff. But
> either way, I just want to make it work.
>
> I've reviewed the following resources and haven't solved my problem:
> http://blogs.everycity.co.uk/alasdair/2009/05/64bit-varnish-on-solaris/
> http://letsgetdugg.com/2009/12/04/varnish-on-solaris/
> http://src.opensolaris.org/source/xref/webstack/varnish/
>
> Thanks for any help,
> Jacques
>
> Compiler Info:
> [/usr/bin/gcc -v] gcc version 3.4.3 (csl-sol210-3_4-20050802)
> [/usr/gnu/bin/cc] gcc version 3.4.3 (csl-sol210-3_4-20050802) [symlinked
> to gcc]
> [/opt/SunStudioExpress/bin/cc -V] cc: Sun Ceres C 5.10 SunOS_i386
> 2009/03/06
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.varnish-cache.org/pipermail/varnish-misc/attachments/20100707/affd12f9/attachment.html>
More information about the varnish-misc
mailing list