trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siddharth Wagh <siddharth.w...@gmail.com>
Subject Re: ESI Plugin
Date Thu, 17 May 2012 13:53:15 GMT
Look for these lines in records.config and change the parameters as shown

CONFIG proxy.config.diags.debug.enabled INT 1
CONFIG proxy.config.diags.debug.tags STRING plugin_esi_intercept  (or
plugin_esi_intercept*)

- Sid



On Thu, May 17, 2012 at 1:33 AM, Linux-it.es <jroman@linux-it.es> wrote:

> In traffic.out shows nothing. How can i activate debug mode to see that?
>
> Jorge Roman Novalbos
> jroman@servotic.com
> 679 99 08 62
> http://www.servotic.com
>
> On 17/05/2012, at 05:37, James Peach <jpeach@apache.org> wrote:
>
> > On 16/05/2012, at 9:01 AM, Jorge Román Novalbos wrote:
> >
> >> I have the plugin compiled.
> >>
> >> Finally I downloaded the sources from
> https://github.com/shukitchan/trafficserver-plugins/ with the problems
> fixes.
> >>
> >> Now I'm trying to test the plugin.
> >>
> >> For this test i have created two file:
> >>
> >> - esi.html
> >>
> >> <HTML>
> >> <BODY>
> >> The time is: <esi:include src="http://www.example.com/esi.php"/>
> >> at this very moment.
> >> </BODY>
> >> </HTML>
> >>
> >> - esi.php
> >>
> >> <?php
> >>    echo date('l jS \of F Y h:i:s A');
> >> ?>
> >>
> >>
> >> When i ask for esi.html the date is not displayed, so esi plugin it
> doesn't work.
> >
> > Can you post the entire response? Do you get any debug logs when you
> enable the 'plugin_esi_intercept' debug tag?
> >
> >>
> >>
> >> My question, ¿Do i have to activate the ESI in order to process that
> url? Sorry, but i can't find much documentation about how to implement ATS
> with ESI tags.
> >>
> >> P.S: I have activated the plugin in plugin.config
> >>
> >>
> >>
> >>
> >> On 16/05/2012, at 12:22, Jorge Román Novalbos wrote:
> >>
> >>> I am focusing with compile the pluging using the make command and i
> have achieved some advances.
> >>>
> >>> I have installed some packages (libboost1.42-dev and gcc-4.4-locales)
> and the error now is:
> >>>
> >>> root@ts1:~/ATS-plugins/trafficserver-plugins/esi# make
> >>> tsxs -v -I lib -I fetcher/ -C plugin.cc serverIntercept.cc lib/*.cc
> fetcher/*.cc -o esi.so
> >>> compiling plugin.cc -> plugin.lo
> >>> g++ -I/opt/trafficserver-3.0.4/include -Ilib -Ifetcher/ -g -pipe -Wall
> -Werror -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing
> -Wno-invalid-offsetof -fpic -c plugin.cc -o plugin.lo
> >>> En el fichero incluído de /usr/include/c++/4.4/ext/hash_map:60,
> >>>               de lib/StringHash.h:29,
> >>>               de lib/EsiProcessor.h:31,
> >>>               de plugin.cc:34:
> >>> /usr/include/c++/4.4/backward/backward_warning.h:28:2: error: #warning
> This file includes at least one deprecated or antiquated header which may
> be removed without further notice at a future date. Please use a
> non-deprecated interface with equivalent functionality instead. For a
> listing of replacement headers and interfaces, consult the file
> backward_warning.h. To disable this warning use -Wno-deprecated.
> >>> plugin.cc: In function ‘void cacheNodeList(ContData*)’:
> >>> plugin.cc:453: error: conversión inválida de ‘const sockaddr*’ a
> ‘unsigned int’
> >>> plugin.cc:453: error: conversión inválida de ‘tsapi_cont*’ a ‘int’
> >>> plugin.cc:453: error: no se puede convertir ‘TSFetchWakeUpOptions’ a
> ‘tsapi_cont*’ para el argumento ‘5’ para ‘void TSFetchUrl(const char*, int,
> unsigned int, int, tsapi_cont*, TSFetchWakeUpOptions, TSFetchEvent)’
> >>> Compile failed: g++ -I/opt/trafficserver-3.0.4/include -Ilib
> -Ifetcher/ -g -pipe -Wall -Werror -O3 -feliminate-unused-debug-symbols
> -fno-strict-aliasing -Wno-invalid-offsetof -fpic -c plugin.cc -o plugin.lo
> >>> make: *** [all] Error 1
> >>>
> >>>
> >>>
> >>> I'm debuging the make command with strace but I'm not able to fix the
> problem. Some advices?
> >>>
> >>>
> >>> On 16/05/2012, at 10:51, Jorge Román Novalbos wrote:
> >>>
> >>>> Hi all,
> >>>>
> >>>> I'm compiling the ESI plugin in my trafficserver-3.0.4. I downloaded
> the plugins from repository and i have followed the next steps:
> >>>>
> >>>> 1. cd trafficserver-plugins/esi
> >>>> 2. /opt/trafficserver/bin/tsxs -o esi.so -c serverIntercept.cc
> >>>> 3 /opt/trafficserver/bin/tsxs -o esi.so -i
> >>>> 4 edit /opt/trafficserver/etc/trafficserver/plugin.config an add
> esi.so
> >>>> 5. Restart trafficserver daemon.
> >>>>
> >>>>
> >>>> The traffic_server process never start because can't load the esi
> plugin. The traffic.out show these lines:
> >>>>
> >>>> [May 16 10:31:49.263] Server {47992987118880} ERROR: unable to find
> TSPluginInit function
> '/opt/trafficserver-3.0.4/libexec/trafficserver/esi.so':
> /opt/trafficserver-3.0.4/libexec/trafficserver/esi.so: undefined symbol:
> TSPluginInit
> >>>> [May 16 10:31:50.361] Manager {140531591419680} ERROR:
> [LocalManager::pollMgmtProcessServer] Server Process terminated due to Sig
> 6: Aborted
> >>>> [May 16 10:31:50.361] Manager {140531591419680} ERROR:  (last system
> error 2: No such file or directory)
> >>>> [May 16 10:31:50.361] Manager {140531591419680} ERROR:
> [Alarms::signalAlarm] Server Process was reset
> >>>> [May 16 10:31:50.361] Manager {140531591419680} ERROR:  (last system
> error 2: No such file or director y)
> >>>>
> >>>> Obviously something is wrong in esi pluging but I don't know if i am
> doing some step wrong.
> >>>>
> >>>> I have tried to use the Makefile file in esi source but never
> compile. This is the error:
> >>>>
> >>>> root@ts1:~/ATS-plugins/trafficserver-plugins/esi# make
> >>>> tsxs -v -I lib -I fetcher/ -C plugin.cc serverIntercept.cc lib/*.cc
> fetcher/*.cc -o esi.so
> >>>> compiling plugin.cc -> plugin.lo
> >>>> g++ -I/opt/trafficserver-3.0.4/include -Ilib -Ifetcher/ -g -pipe
> -Wall -Werror -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing
> -Wno-invalid-offsetof -fpic -c plugin.cc -o plugin.lo
> >>>> In file included from /usr/include/c++/4.4/ext/hash_map:60,
> >>>>              from lib/StringHash.h:29,
> >>>>              from lib/EsiProcessor.h:31,
> >>>>              from plugin.cc:34:
> >>>> /usr/include/c++/4.4/backward/backward_warning.h:28:2: error:
> #warning This file includes at least one deprecated or antiquated header
> which may be removed without further notice at a future date. Please use a
> non-deprecated interface with equivalent functionality instead. For a
> listing of replacement headers and interfaces, consult the file
> backward_warning.h. To disable this warning use -Wno-deprecated.
> >>>> In file included from lib/EsiProcessor.h:35,
> >>>>              from plugin.cc:34:
> >>>> lib/Variables.h:29:33: error: boost/noncopyable.hpp: No existe el
> fichero o el directorio
> >>>> In file included from lib/EsiProcessor.h:35,
> >>>>              from plugin.cc:34:
> >>>> lib/Variables.h:38: error: ‘boost’ has not been declared
> >>>> lib/Variables.h:38: error: expected ‘{’ before ‘noncopyable’
> >>>> lib/Variables.h:38: error: invalid type in declaration before ‘{’
> token
> >>>> cc1plus: warnings being treated as errors
> >>>> lib/Variables.h:38: error: extended initializer lists only available
> with -std=c++0x or -std=gnu++0x
> >>>> lib/Variables.h:40: error: expected primary-expression before ‘public’
> >>>> lib/Variables.h:40: error: expected ‘}’ before ‘public’
> >>>> lib/Variables.h:40: error: expected ‘,’ or ‘;’ before ‘public’
> >>>> lib/Variables.h: In function ‘void EsiLib::populate(const char*,
> int)’:
> >>>> lib/Variables.h:60: error: ‘_query_string_parsed’ was not declared
in
> this scope
> >>>> lib/Variables.h:61: error: ‘_parseQueryString’ was not declared
in
> this scope
> >>>> lib/Variables.h:63: error: ‘_query_string’ was not declared in this
> scope
> >>>> lib/Variables.h: At global scope:
> >>>> lib/Variables.h:70: error: non-member function ‘const std::string&
> EsiLib::getValue(const std::string&)’ cannot have cv-qualifier
> >>>> lib/Variables.h:73: error: non-member function ‘const std::string&
> EsiLib::getValue(const char*, int)’ cannot have cv-qualifier
> >>>> lib/Variables.h: In function ‘const std::string&
> EsiLib::getValue(const char*, int)’:
> >>>> lib/Variables.h:75: error: ‘EMPTY_STRING’ was not declared in this
> scope
> >>>> lib/Variables.h: At global scope:
> >>>> lib/Variables.h:88: error: declaration of ‘~EsiLib::Variables’ as
> non-member
> >>>> lib/Variables.h:90: error: expected unqualified-id before ‘private’
> >>>> lib/Variables.h:99: error: storage size of ‘EsiLib::SIMPLE_HEADERS’
> isn't known
> >>>> lib/Variables.h:102: error: storage size of ‘EsiLib::SPECIAL_HEADERS’
> isn't known
> >>>> lib/Variables.h:105: error: storage size of
> ‘EsiLib::NORM_SIMPLE_HEADERS’ isn't known
> >>>> lib/Variables.h:106: error: storage size of
> ‘EsiLib::NORM_SPECIAL_HEADERS’ isn't known
> >>>> lib/Variables.h:114: error: non-member function ‘std::string&
> EsiLib::_toUpperCase(std::string&)’ cannot have cv-qualifier
> >>>> lib/Variables.h:115: error: non-member function ‘int
> EsiLib::_searchHeaders(const std::string*, const char*, int)’ cannot have
> cv-qualifier
> >>>> lib/Variables.h:117: error: non-member function ‘bool
> EsiLib::_parseDictVariable(const std::string&, const char*&, int&, const
> char*&, int&)’ cannot have cv-qualifier
> >>>> lib/Variables.h:150: error: non-member function ‘const std::string&
> EsiLib::_getSubCookieValue(const std::string&, size_t)’ cannot have
> cv-qualifier
> >>>> lib/Variables.h:154: error: expected declaration before ‘}’ token
> >>>> lib/Variables.h:99: error: ‘EsiLib::SIMPLE_HEADERS’ defined but
not
> used
> >>>> lib/Variables.h:102: error: ‘EsiLib::SPECIAL_HEADERS’ defined but
not
> used
> >>>> lib/Variables.h:105: error: ‘EsiLib::NORM_SIMPLE_HEADERS’ defined
but
> not used
> >>>> lib/Variables.h:106: error: ‘EsiLib::NORM_SPECIAL_HEADERS’ defined
> but not used
> >>>> Compile failed: g++ -I/opt/trafficserver-3.0.4/include -Ilib
> -Ifetcher/ -g -pipe -Wall -Werror -O3 -feliminate-unused-debug-symbols
> -fno-strict-aliasing -Wno-invalid-offsetof -fpic -c plugin.cc -o plugin.lo
> >>>> make: *** [all] Error 1
> >>>>
> >>>>
> >>>>
> >>>> could anybody  help me?
> >>>>
> >>>>
> >>>>
> >>>> Thanks to all developer for this amaizing software.
> >>>
> >>
> >
>

Mime
View raw message