Troubleshooting: Setting up varnish 2.1.2 on OpenSolaris

Jacques whshub at gmail.com
Wed Jul 7 23:45:38 CEST 2010


As an aside, I saw this exact same behavior using 4516, 2.1.2 with the
linger patch, and trunk.

On Wed, Jul 7, 2010 at 1:47 PM, Jacques <whshub at gmail.com> wrote:

> So the fpic solved my problem with getting the -1 warning.  However, I'm
> getting nothing but 503 responses from varnish.
>
> I've updated to using this for configure:
> VCC_CC="cc -fpic -shared -G -m64 -o %o %s" \
> CC=/usr/bin/gcc \
> CFLAGS="-O3 -pthreads -m64 -fomit-frame-pointer"\
> LDFLAGS="-lumem -pthreads" \
> ./configure --prefix=/opt/extra
>
> The updated VCC_CC line means I don't have to pass it every time I start
> varnish.
>
> The simplest run:
> /opt/extra/sbin/varnishd -F -a:80 -b 87.238.47.204:80
>
> I always get 503s.  When I check the vmlog, I see backend server not
> available.  To further test, I upped the timeout values in a basic vcl just
> in case that was the problem.  No change.
>
> My question is, how can I figure out why I'm getting backend server not
> available?  If I add a probe, I still see no outbound requests and backends
> start at healthy and then become sick shortly after (where they stay).
>
> Running tcpdump, I see no communication with the backend server during any
> of this.
>
> Where is my error?
>
> Thanks,
> Jacques
>
>
> On Wed, Jul 7, 2010 at 2:31 AM, Jorge Díaz <jdzstz at gmail.com> wrote:
>
>> 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: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100707/ff3728fd/attachment-0003.html>


More information about the varnish-misc mailing list