The next ecap version

Asked by Lucian Bazoi

Hi Alex,

When is the next ecap version going to be released?
Is it going to include API call to help with threaded adapters?
Is it going to be a stable version?

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Alex Rousskov (rousskov) said :
#1

The next ecap version has been released.

It does not include API to help with threaded adapters.

The stability of the new release has not been determined yet. Please keep in mind that the API will most likely change in the foreseeable future to help with threaded adapters and support other wish-list items (at least). FWIW, I do not expect these API changes to require drastic rewrites of the existing adapter code because most of them _add_ new features rather than modify old ones.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#2

Thank you for the new version.

I have a problem with the ecap though. It stopped working about 12 hours ago and it is not working with any of the v0.1.0 or v0.0.3 libecap and ecap adapter sample. Can you please tell me what happened?

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#3

it's working.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#4

Hi,
  I took a version from lp:~rousskov/squid/3p2-ecap but I see it doesn't have the configure and makefile files.
  From where can I get these files?

Thank you.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#5

Can I use the configure and makefile files from squid-3.2.0.4 ?

Revision history for this message
Alex Rousskov (rousskov) said :
#6

We do not store generated files in the Bazaar repository. You might be able to use Squid 3.2 generated files, but I cannot guarantee they will work (it depends on the delta between the official sources and the 3p2-ecap branch).

The best thing to do is to run a ./bootstrap.sh script to build those generated files from scratch. You will need to install GNU autotools for that script to work though.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#7

Autotool complains that
   Makefile.am:8: required directory ./libltdl does not exist
   Makefile.am:5: required directory ./libltdl does not exist
Where do I get that directory from?

Thank you.

Revision history for this message
Alex Rousskov (rousskov) said :
#8

I am not sure what would cause this error, but the first Google result for the "required directory ./libltdl does not exist" search seems to imply that you need a newer version of libtool.

FWIW, we use libtool v2.2.6.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#9

Hi,

  I build the squid version 3p2-ecap, launched it but it doesn't seem to work. I see the child process for a very short while, and then I see the only the main process and only for a short while. This squid as a reverse proxy is not working at all.
  The log doesn't tell me much.

  I installed Squid 3.2.0.4 with libecap 0.0.3 and now I see the child process also but the squid reverse proxy is not working. It has a completely different behavior than 3p2-ecap.
 This is a part of the cache log. Has an exception. Can you please take a look?

2011/01/18 08:40:38.102 kid1| AsyncCall.cc(32) make: make call AsyncJob::start [call200]
2011/01/18 08:40:38.102 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.102 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.102 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.102 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.102 kid1| Adaptation::Ecap::XactionRep status in: [ job27]
2011/01/18 08:40:38.102 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.102 kid1| XactionRep.cc:255: exception: proxyingVb == opComplete
2011/01/18 08:40:38.103 kid1| ../../src/base/AsyncJobCalls.h(178) dial: AsyncJob::start threw exception: proxyingVb == opComplete
2011/01/18 08:40:38.103 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.103 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.103 kid1| Adaptation::Ecap::XactionRep will stop, reason: exception
2011/01/18 08:40:38.103 kid1| cbdataReferenceValid: 0x91bb9a8
2011/01/18 08:40:38.103 kid1| AsyncJob::start() ends job [ job27]
2011/01/18 08:40:38.103 kid1| Initiate.cc(58) swanSong: swan sings [ job27]
2011/01/18 08:40:38.103 kid1| Initiate.cc(61) swanSong: fatal failure; sending abort notification
2011/01/18 08:40:38.103 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.103 kid1| cbdataLock: 0x91bb880=3
2011/01/18 08:40:38.103 kid1| The AsyncCall Initiator::noteAdaptationQueryAbort constructed, this=0x91c06d8 [call201]
2011/01/18 08:40:38.103 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.104 kid1| cbdataLock: 0x91bb880=4
2011/01/18 08:40:38.104 kid1| Initiate.cc(85) will call Initiator::noteAdaptationQueryAbort(1) [call201]
2011/01/18 08:40:38.104 kid1| cbdataUnlock: 0x91bb880=3
2011/01/18 08:40:38.104 kid1| cbdataUnlock: 0x91bb880=2
2011/01/18 08:40:38.104 kid1| Initiate.cc(65) swanSong: swan sang [ job27]
2011/01/18 08:40:38.104 kid1| AsyncJob destructed, this=0x91bba00 type=Adaptation::Ecap::XactionRep [job27]
2011/01/18 08:40:38.104 kid1| cbdataFree: 0x91bb9a8
2011/01/18 08:40:38.104 kid1| cbdataFree: 0x91bb9a8 has 2 locks, not freeing
2011/01/18 08:40:38.104 kid1| AsyncJob.cc(138) callEnd: AsyncJob::start() ended 0x91bba00
2011/01/18 08:40:38.104 kid1| leaving AsyncJob::start()
2011/01/18 08:40:38.104 kid1| cbdataUnlock: 0x91bb9a8=1
2011/01/18 08:40:38.104 kid1| entering Initiator::noteAdaptationQueryAbort(1)
2011/01/18 08:40:38.104 kid1| AsyncCall.cc(32) make: make call Initiator::noteAdaptationQueryAbort [call201]
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.105 kid1| Iterator status in: [ job26]
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bb880
2011/01/18 08:40:38.105 kid1| Iterator.cc(111) noteAdaptationQueryAbort: final: 1 plan: respFilter[0..1]
2011/01/18 08:40:38.105 kid1| cbdataUnlock: 0x91bb9a8=0
2011/01/18 08:40:38.105 kid1| cbdataUnlock: Freeing 0x91bb9a8
2011/01/18 08:40:38.105 kid1| Iterator.cc(121) noteAdaptationQueryAbort: flags: 100
2011/01/18 08:40:38.105 kid1| ServiceGroups.cc(171) findService: respFilter has no matching services
2011/01/18 08:40:38.105 kid1| cbdataReferenceValid: 0x91bd950
2011/01/18 08:40:38.105 kid1| cbdataLock: 0x91bd950=4

Am I missing something?
I am using the same squid.conf with these 3.2 versions as with 3.1.10

Thank you.

Revision history for this message
Alex Rousskov (rousskov) said :
#10

Sorry, I do not know why you cannot get either setup working. The exception you pasted is probably the reason why your 3.2.0.4 Squid does not work, but I cannot tell you why it does not. And I cannot say anything about the 3p2-ecap failures since you did not post the log for that version.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#11

Hi Alex,
  Here is a log of squid 3p2-ecap. http://www.easy-share.com/1913605699/cache.log
Thank you.

Revision history for this message
Alex Rousskov (rousskov) said :
#12

I do not see anything in the posted log. Too many things are going on. Use the simplest squid.conf you can. Use one eCAP service, to start with. Enable full debugging (ALL,9 in squid.conf and not -X on the command line). Start in a no-daemon mode (-NC).

Also, make sure that when you switch between eCAP library versions, you rebuild both Squid and adapter using the same library.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#13

In 3p2-ecap squid an exception is thrown
Modifying Adapter: configuration error: victim value is not set

How do I set the victim amd replacement?
Thank you.

Revision history for this message
Alex Rousskov (rousskov) said :
#14

You set both using the ecap_service option in squid.conf. For example,
    ecap_service ... victim=the replacement=a
where "..." stands for your usual ecap_service options.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#15

using this config
# e-cap
      ecap_enable on
      loadable_modules /usr/local/lib/ecap_adapter_minimal.so /usr/local/lib/ecap_adapter_modifying.so
12 ecap_service eReqmod reqmod_precache 0 ecap://e-cap.org/ecap/services/sample/minimal
13 ecap_service eRespmod respmod_precache 0 ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement=zau
      adaptation_service_set reqFilter eReqmod
      adaptation_service_set respFilter eRespmod
      adaptation_access respFilter allow all
      adaptation_access reqFilter allow all

I get
2011/01/19 09:29:18.753| Processing: 'loadable_modules /usr/local/lib/ecap_adapter_minimal.so /usr/local/lib/ecap_adapter_modifying.so'
2011/01/19 09:29:18.753| Processing: 'ecap_service eReqmod reqmod_precache 0 ecap://e-cap.org/ecap/services/sample/minimal'
2011/01/19 09:29:18.753| ServiceConfig.cc(152) grokUri: squid.conf:12: service protocol is ecap
2011/01/19 09:29:18.753| squid.conf:12: adaptation_service eReqmod REQMOD_PRECACHE 00 ecap://e-cap.org/ecap/services/sample/minimal

2011/01/19 09:29:18.753| Processing: 'ecap_service eRespmod respmod_precache 0 ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement=zau'
2011/01/19 09:29:18.754| ServiceConfig.cc(152) grokUri: squid.conf:13: service protocol is ecap
2011/01/19 09:29:18.754| squid.conf:13: garbage after adaptation service URI: victim=the
2011/01/19 09:29:18.754| leave_suid: PID 16592 called
2011/01/19 09:29:18.754| leave_suid: PID 16592 giving up root, becoming 'nobody'
FATAL: squid.conf:13: malformed adaptation service configuration

when using the modifying adapter I get error
can you please help?

Revision history for this message
Alex Rousskov (rousskov) said :
#16

Either add "uri=" name for the service URI parameter:

ecap_service eRespmod respmod_precache 0 uri=ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement=zau

Or move the adapter-specific parameters in front of the anonymous URI argument:

ecap_service eRespmod respmod_precache 0 victim=the replacement=zau ecap://e-cap.org/ecap/services/sample/modifying

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#17

Thanks a lot. It works.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#18

Thanks Alex Rousskov, that solved my question.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#19

Is the writing to debug stream the same as in ecap v0.0.3?
thank you

Revision history for this message
Alex Rousskov (rousskov) said :
#20

Debugging API has not changed. The change.log file lists API changes.

Revision history for this message
Lucian Bazoi (dezvoltator) said :
#21

Hi,

  What is the Squid version that works with libecap v0.2.0 and ecap adapter v0.2.0?

Thank you.

Revision history for this message
Alex Rousskov (rousskov) said :
#22

Please direct Squid-specific questions to the Squid Project.

Current eCAP support status for Squid, including supported libecap versions, is documented at http://wiki.squid-cache.org/Features/eCAP

Revision history for this message
gianni (gianni-olivieri) said :
#23

Hi, I've tried the configuration:

ecap_service eRespmod respmod_precache 0 uri=ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement=zau

and all works good...

but I've a problem with:
ecap_service eRespmod respmod_precache 0 uri=ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement=Hello World!

It's seems that the space isn't good things... I've used " or ' but nothing:
ecap_service eRespmod respmod_precache 0 uri=ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement='Hello World!'
ecap_service eRespmod respmod_precache 0 uri=ecap://e-cap.org/ecap/services/sample/modifying victim=the replacement="Hello World!"

There is a Manner to pass a string with space? And there is a limit of dimension of this replacement?

Best regards.

Revision history for this message
Alex Rousskov (rousskov) said :
#24

The sample modifying adapter will take any replacement string that the host application supplies.

If you are using Squid, then Squid parser is currently incapable of escaping or quoting special characters in adaptation service parameters. I suggest that you file a Squid bug report with the corresponding enhancement request.

Meanwhile, if you must support spaces and other special characters in your adapter and you must use Squid, you have a few options, including:

(a) Use a stand-alone configuration file with adapter-specific syntax. The name of the file can be supplied by Squid from squid.conf as the file name itself does not have to contain spaces.

(b) Encode parameter values in squid.conf so that they do not contain special characters. Your adapter will decode them. Squid would not know the difference because it treats extension parameters as opaque strings. URL encoding can be used, for example.

N.B. Please create a new question for each new question. It helps others to find the answers they are looking for. It also helps us to convert useful questions to an FAQ entry.

Can you help with this problem?

Provide an answer of your own, or ask Lucian Bazoi for more information if necessary.

To post a message you must log in.