Request failed running VisitorGenerator


#1

I’m setting up my development environment as explained at Setting Up: Develop - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3 When I ask the VisitorGenerator plugin to create some fake visitor data, I get errors such as the following, repeated indefinitely.

There is an error. Please report the message (Piwik 2.8.0-rc1) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: file_get_contents(http://localhost:8000/piwik.php?idsite=1&rec=1&apiv=1&rand=1636495582&_id=e4002ba0f2c2dd70&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&_cvar={"5"%3A["VisitorType"%2C"NewLoggedOut"]}&cvar={"3"%3A["_pks"%2C"SKU2"]%2C"4"%3A["_pkn"%2C"PRODUCT+name"]%2C"5"%3A["_pkc"%2C"Electronics+%26+Cameras"]}&url=http%3A%2F%2Fexample.org%2Findex.htm&urlref=&action_name=incredible+title!&urlref=http%3A%2F%2Fpiwik.org%2Fcontribute%&cdt=2014-10-13+04%3A18%3A38&cip=13.5.111.3&token_auth=4da92361e4fcef6b73a67ad83b5984b4&dp=1): failed to open stream: HTTP request failed! in /home/ron/git/piwik/core/Http.php on line 408

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [:]
#1 file_get_contents(…) called at [/home/ron/git/piwik/core/Http.php:408]
#2 Piwik\Http::sendHttpRequestBy(…) called at [/home/ron/git/piwik/core/Http.php:94]
#3 Piwik\Http::sendHttpRequest(…) called at [/home/ron/git/piwik/plugins/VisitorGenerator/Generator/VisitsFromLogs.php:58]
#4 Piwik\Plugins\VisitorGenerator\Generator\VisitsFromLogs->generate(…) called at [/home/ron/git/piwik/plugins/VisitorGenerator/Controller.php:74]
#5 Piwik\Plugins\VisitorGenerator\Controller->generate(…) called at [:]
#6 call_user_func_array(…) called at [/home/ron/git/piwik/core/FrontController.php:579]
#7 Piwik\FrontController->doDispatch(…) called at [/home/ron/git/piwik/core/FrontController.php:87]
#8 Piwik\FrontController->dispatch(…) called at [/home/ron/git/piwik/core/dispatch.php:34]
#9 require_once(…) called at [/home/ron/git/piwik/index.php:46]


(Matthieu Aubry) #2

It looks like your PHP cannot connect to http://localhost:8000/piwik.php

Does this work when you open it directly?

Another way to generate data is explained here, maybe try this: Generating test data - Introducing the Piwik Platform - Analytics Platform - Matomo