Re: problem when using RECORDS_FROM_FILE
Status: Alpha
Brought to you by:
coroberti
From: Gary F. <ga...@in...> - 2008-11-04 16:45:44
|
Matt, I've recently started using curl-loader, and I ran into this too. I think we're extending the use of FORM_STRING beyond what was originally intended. I fixed this in the source file parse_config.c by changing the line if (ftype != FORM_USAGETYPE_AS_IS) to if (ftype != FORM_USAGETYPE_AS_IS && ftype != FORM_USAGETYPE_RECORDS_FROM_FILE) Maybe you could give this a try. It seems to work for me, although I'm still testing this along with a few other changes. Gary Fitts On Nov 4, 2008, at 8:29 AM, Matt Love wrote: > Hello, > > I am encountering a parse error when reading username/password data > from a file. > > > > The following is my .conf file: > > ########### GENERAL SECTION ################################ > > > > BATCH_NAME= nomadeskpoll > > CLIENTS_NUM_MAX=10 # Same as CLIENTS_NUM > > CLIENTS_NUM_START=1 > > CLIENTS_RAMPUP_INC=1 > > INTERFACE=eth0 > > NETMASK=16 > > IP_ADDR_MIN= 192.168.2.70 > > IP_ADDR_MAX= 192.168.2.128 > > CYCLES_NUM=100 > > URLS_NUM= 1 > > > > ########### URL SECTION #################################### > > URL=http://test.nomadesk.com/nomadesk/index.php?TaskNavigator::Task=ReceiveMessage > > URL_SHORT_NAME="AddExistingAccount" > > TIMER_URL_COMPLETION = 500 > > TIMER_AFTER_URL_SLEEP = 500 > > REQUEST_TYPE=POST > > FORM_USAGE_TYPE= RECORDS_FROM_FILE > > FORM_STRING=<PipeMsg><Header><AccountName></ > AccountName><Password>aventiv23</Password><LocationID>%s</ > LocationID><ClientVersion>2.6.0.16</ > ClientVersion>bogus<CreationTstamp></ > CreationTstamp><Task>AddExistingAccount</Task></Header><Body><Email> > %s</Email><LocationName>%s</LocationName></Body></PipeMsg> > > FORM_RECORDS_FILE_MAX_NUM=10 > > FORM_RECORDS_FILE= locid-email-locname.cred > > FORM_RECORDS_RANDOM=1 > > > > > > And I am reading from this file (locid-email-locname.cred) > > # Separator used here is ',' > > a3d683db-67f1-4e42-94f4-d942623de79e,p0...@ml...,PROTEST- > VISTA32 > > 2ae2596e-7ade-4fbd-9b21-61d95c4ea387,p0...@ml...,PROTEST- > XP32-1 > > a3d683db-67f1-4e42-94f4-d942623de79e,p0...@ml...,PROTEST- > VISTA32 > > 2ae2596e-7ade-4fbd-9b21-61d95c4ea387,p0...@ml...,PROTEST- > XP32-1 > > a3d683db-67f1-4e42-94f4-d942623de79e,p0...@ml...,PROTEST- > VISTA32: > > . > > . > > . > > > > > > I get the following error when running “curl-loader –f poll.conf”: > > parse_config_file - processing file string > "FORM_STRING=<PipeMsg><Header><AccountName></ > AccountName><Password>aventiv23</Password><LocationID>%s</ > LocationID><ClientVersion>2.6.0.16</ > ClientVersion>bogus<CreationTstamp></ > CreationTstamp><Task>AddExistingAccount</Task></Header><Body><Email> > %s</Email><LocationName>%s</LocationName></Body></PipeMsg> > > > > > > - to load user credentials (records) from a file two "%%s" , > something like "user=%%s&password=%%s" > > and _FILE defined. > > - error: FORM_STRING (form_string_parser) is not valid. > > Please, use: > > - to generate unique users with unique passwords two "%s%d" , > something like "user=%s%d&password=%s%d" > > - to generate unique users with the same passwords one "%s%d" > > for users and one "%s" for the password,something like "user=%s > %d&password=%s" > > - for a single configurable user with a password two "%s" , > something like "user=%s&password=%s" > > add_param_to_batch - error: parser failed for tag FORM_STRING and > value <PipeMsg><Header><AccountName></ > AccountName><Password>aventiv23</Password><LocationID>%s</ > LocationID><ClientVersion>2.6.0.16</ > ClientVersion>bogus<CreationTstamp></ > CreationTstamp><Task>AddExistingAccount</Task></Header><Body><Email> > %s</Email><LocationName>%s</LocationName></Body></PipeMsg>. > > parse_config_file - error: add_param_to_batch () failed processing > line "FORM_STRING" > > main - error: parse_config_file () failed. > > > > I have tried the %%s usage, as suggested in the error message above > but got the same result. Any ideas? Is there any additional > documentation about how to use this templating feature? > > > > Best Regards, > > Matt Love > > <ATT00001.txt><ATT00002.txt> |