[1.6] Stats stored in DB, doesn't show in dashboard

Hi,

First of all, thanks you all people from piwik community !

As i read here, i can see data correctly inserted in the database, but nothing showing to the dashboard except an orange message error that fade fast (fr) :

Oups ! Problème rencontré durant la requête, veuillez réessayer.

If you have a tip or advice (or just a link, maybe i didnt search enought) to solve this problem, you are welcome’d.

thanks you

Check your webserver error logs
If all else fails, it is possible that there is a server misconfiguration preventing Piwik from tracking your visits or processing reports. Often, there will be an error in the webserver error logs (apache logs, IIS logs, nginx logs, etc.). This will help you find the source of the problem, for example search for the error message on this website.

@matt
Hi,

Thanks you for helping. I checked all logs i could from apache, but nothing special except a

sqlsrv:MYHOSTNAME

but i suppose it should be something like

mysqlsrv:MYHOSTNAME.intra.foo.bar

i checked config:


[database]
host = "MYHOSTNAME.intra.foo.bar"
username = "piwikuser"
password = "pass"
dbname = "piwik"
tables_prefix = "piwik_"
adapter = "PDO_MYSQL"
port = 3306
charset = "utf8"

Stats are stored in database, i can login with my superuser account, but on the dashboard, no stats to be displayed, loading with error message. Sometime it load a part of data “Real time”, but nothing more.

I checked /php/ext/ and php.in, all looks fine, especially when the piwik installer tell me that all is ok. I changed 2000 to 20000 if ever, but nothing new.

Not sure what to check more :confused:

edit: i check with adapter = “MYSQLI”, can’t display index.php like if no connexion, so I came back to adapter = “PDO_MYSQL”, not loading widgets as before

edit2: username piwikuser for database piwik has all access.

edit3:
PHP version= 5.3.2
MySql version= 5.1.46

can you try to setup as explained in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

this will probably solve the issue

@matt, thanx for keep helping

I made all change asked by this howTo, but nothing resolved.

I found (i strongly supose) the origin of the problem:

MYHOSTNAME.intra.foo.bar
is transformed to
MYHOSTNAME

It is cleared in database everytimes into piwik_option.option_name .piwikUrl with option_value
from http://MYHOSTNAME.intra.foo.bar/piwik to http://MYHOSTNAME/piwik

It comes in output html as

<script type="text/javascript">
var piwik = {};
piwik.token_auth = "***********";
piwik.piwik_url = "http://MYHOSTNAME/piwik";
piwik.userLogin = "PADM000"; piwik.idSite = "1"; piwik.siteName = "my site"; piwik.siteMainUrl = "http://MYHOSTNAME.intra.foo.bar/site"; piwik.period = "day"; piwik.currentDateString = "2011-12-06";
piwik.startDateString = "2011-12-06"; piwik.endDateString = "2011-12-06"; piwik.minDateYear = 2011; piwik.minDateMonth = parseInt("10", 10); piwik.minDateDay = parseInt("26", 10); piwik.maxDateYear = 2011; piwik.maxDateMonth = parseInt("12", 10); piwik.maxDateDay = parseInt("07", 10);
</script>

piwik.piwik_url = “http://MYHOSTNAME/piwik”; instead of piwik.piwik_url = “http://MYHOSTNAME.intra.foo.bar/piwik”;

Other bug thing, i open firebug/console, and i can see it is trying to load some css for page of other server at *.intra.foo.bar

I am looking into the code to see if i can disable the cleaner to see if this is the origin.

edit:
NOTE: i can see the widget “log visitor” in his tab

edit2:
i commented line #159 in Piwik.php so i can have the good piwik.piwik_url value on js, and on database

//Piwik_SetOption($key, $currentUrl, $autoload = true);

but probleme of no-loading widget is camping :’(

on a new install i have the same probleme, can load the visitor log widget in his own tab, live widget can be loaded from the main dashboard, nothing for the rest

i commented line #159 in Piwik.php so i can have the good piwik.piwik_url value on js, and on database

This is interesting, good investigation!

Maybe there is a bug in our function to detect the URL, or a bug in your configuration.
Can you PM me the result of <?php phpinfo(); ?> , and a link to this thread?
I would be interested to see if the hostname in your case is still populated in some other fields.

on a new install i have the same probleme, can load the visitor log widget in his own tab, live widget can be loaded from the main dashboard, nothing for the rest

check with firebug NET panel the requests, are they working, or keep loading?
then check your error logs ? is the CPU working at all ?

Hi,

Here the result of network tab in firebug : http://pix.toile-libre.org/?img=1323360659.png

I just PM you with phpInfo()

Nothing to notice in CPU nor apache log (any other log i should check?).

Widget displaying as loading again and again, but XHR request arborted.

So when you “Copy request url” and paste it in a new tab, it also fails and return nothing?

If that’s the case Iwould really check error logs, make sure that when you generate an error it is really logged into error logs.

Hi,

So when you “Copy request url” and paste it in a new tab, it also fails and return nothing?
sometimes it return something, but was randomly this morning; nothing now (edit2: maybe due to other application on the same serveur ?). I tryed disable one after one plugin then refresh, but nothing. Should i give more ressources RAM/etc than what is given in your previous doc link ?

If that’s the case Iwould really check error logs, make sure that when you generate an error it is really logged into error logs.

What log should i check ? apache/php doesn’t give any informations :cry:

Edit:
I just checked if there are logs in piwik, but i think, nothing to declare :
___________________ lignes
piwik_logger_message ___0 ___0 b ___1024 b ___1024 b
piwik_logger_api_call ____0 ___0 b ___1024 b ___1024 b
piwik_logger_error ______0 ___0 b ___1024 b ___1024 b
piwik_logger_exception __0 ___0 b ___1024 b ___1024 b

( @ index.php?module=DBStats&action=index&idSite=1&period=year )

You should have errors in your webserver error logs, or load balancer something is not right in your setup.

Hi,

i run test:
/tests/all_tests.php
/tests/core/ArchiveProcessing.test.php
these two page never awsered
( cf http://pix.toile-libre.org/?img=1323866624.jpg thumb-> http://pix.toile-libre.org/upload/thumb/1323866624.jpg )

[quote=/tests/core/Http.test.php]string(64) “curl_exec: Could not resolve host: api.piwik.org; Host not found” Fail: Test_Piwik_Http → test_fetchRemoteFile → curl at [D:\Apache2215\htdocs\stats\tests\core\Http.test.php line 31]

Fail: Test_Piwik_Http → test_fetchRemoteFile → fopen at [D:\Apache2215\htdocs\stats\tests\core\Http.test.php line 31]

string(126) "Error while connecting to: api.piwik.org. Please try again later. php_network_getaddresses: getaddrinfo failed: Hôte inconnu. " Fail: Test_Piwik_Http → test_fetchRemoteFile → socket at [D:\Apache2215\htdocs\stats\tests\core\Http.test.php line 31]

string(64) “curl_exec: Could not resolve host: api.piwik.org; Host not found” Fail: Test_Piwik_Http → test_fetchRemoteFile → at [D:\Apache2215\htdocs\stats\tests\core\Http.test.php line 42]

string(60) “curl_exec: Could not resolve host: piwik.org; Host not found” Fail: Test_Piwik_Http → test_fetchRemoteFile → at [D:\Apache2215\htdocs\stats\tests\core\Http.test.php line 52]

1/1 test cases complete: 1 passes, 5 fails and 0 exceptions.
Time elapsed: 11.494s - Current date: 2011-12-14 12:25:51 - Memory delta: 734.9 K - PHP Version: 5.3.2[/quote]

all other test were succes 1/1 without message added before the green box

Note:
I run http://MYHOSTNAME.intra.foo.bar/stats/tests/… from my browser
My machine is not at piwik’s server ( “not localhost” )
piwik server does not have access to internet, it is full intranet (I think this may have provoked errors in some test, I am trying to check if there is a setting to be full offline )

Thanks for the test results it is surprising that some unit tests are failing on your machine… Ill look into these, but they shouldnt cause the problem you see.

  1. create test.php and inside put <?php hello();
    it should generate an error

  2. check in your apache error log. Check the error is logged

  3. “Copy request url” and paste it in a new tab, when it fails to return something, there should be an error in the error log or in the access log ?

Otherwise, what other system is between you and the webserver (load balancer etc) that could make this fail?

Hi and happy new year !

I’m back, and i just get this error, so i though it could have relation:

VisitsSummary is activated, and i tested :

be righ back tomorow

Hi,

Testing 1.7b7

having same issue with an updated from 1.6 or new db:
Response was ‘curl_exec: Failure when receiving data from the peer’ in D:\Apache2215\htdocs\stats

I try to re-explain since the begining, I hope I provide good infos :
[ul]
[li] When I active auto-archiving, dashboard got XHR fails, and orange-red alert says “oups …”. (I use firebug in firefox 9.0.1)
[/li][li] When I disable auto-archiving, no XHR problem, no “oups” on dashboard.
[/li][li] Both case, live widget load data live widget show green flag when a goal is done, i can see browser icon, pages…
[/li][li] But others widgets load with ‘no data for this report/graph’
[/li][li] In widget graph visit, when i clic on vertical graph, widget looks loading when XHR response got:

http://MYHOSTNAME.intra.foo.bar/stats/index.php?viewDataTable=graphEvolution&module=VisitsSummary&action=getEvolutionGraph&date=last7&idGoal=-1&widget=1&idSite=1&period=range&controllerActionCalledWhenRequestSubTable=&rows=

[/li]


(...)The parameter 'columns' isn't set in the Request, and a default value wasn't provided.
(...)
Backtrace:
#0 D:\Apache2215\htdocs\stats\plugins\VisitsSummary\Controller.php(40): Piwik_Common::getRequestVar('columns')
#1 [internal function]: Piwik_VisitsSummary_Controller->getEvolutionGraph()
#2 D:\Apache2215\htdocs\stats\core\FrontController.php(138): call_user_func_array(Array, Array)
#3 D:\Apache2215\htdocs\stats\index.php(53): Piwik_FrontController->dispatch()
#4 {main}
(...)

[li] I test from a client webbrowser (http://MYHOSTNAME.intra.foo.bar) and server browser(http://localhost)
[/li][li] Its an apache mysql php server on microsoft server.
[/li][li] php.ini have curl extension activate
[/li][li] I cant install powershell at the moment
[/li][li] I can have a script that launch automaticly ./misc/cron/archiving.php
[/li][li] When I launch it from CLI i have a bad curl issue
[/li][li] I suppose problem migh be from the server configs because all work in a dev machine “localhost”.
[/li][/ul]

Every help are welcome :frowning:

cm-t , do you see any error in the apache error logs ? Because the request that is returned seems empty.

Or in the archive.php script you can try to echo $curlOutput to see if some data was returned from the script? Let me know if you need help

Hi matt,

Thanx you for having patience with me :’)

I am not sure to understand “echo $curlOutput” so i did some things that I hope it will provide more info:

[ul]
[li] using 1.7b7, with db created with 1.7b7
[/li][li] I can’t find error in php nor apache logs (there were 1 to be honest, in beta7, no theme/logo.png so I added one)
[/li][li] In /core/Http.php I added curl opt :

CURLOPT_VERBOSE=> true,

[/li][li] In /core/Http.php I added print_r(curl_getinfo($ch)
[/li][li] At server console I did

D:\Apache2215\htdocs\stats>D:\php532\php.exe -c D:\cm-t\php.ini -f D:\Apache2215\htdocs\stats\misc\cron\archiv
[/li]e.php localhost/stats>> log_hostname_at_serveur.txt

[li] The output can be read after renaming log_hostname_at_serveur.png to log_hostname_at_serveur.txt
[/li][li] At server console I did

D:\Apache2215\htdocs\stats>D:\php532\php.exe -c D:\cm-t\php.ini -f D:\Apache2215\htdocs\stats\misc\cron\archiv
[/li]e.php localhost/stats>> log_localhost_at_serveur.txt

[li] The output can be read after renaming log_localhost_at_serveur.png to log_localhost_at_serveur.txt
[/li][li] or all.pdf ( less readable)
[/li][/ul]

Tomorow I will ask for update to lastest version of curl (didnt checked yet ).

Thanks for trying!

In your URL: http://localhost/stats/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=day&date=last52&format=php

It did return status code 0 so this is an error.

When you execute this URL maybe you will experience an “Empty request” and then find some error in your web server logs?

Hi,

[ul]
[li] I tested your url with different param:
[/li][li] no session, no token : don’t work
[/li]

a:2:{s:6:"result";s:5:"error";s:7:"message";s:107:"Vous ne pouvez pas accéder à cette ressource, ceci requiert un accès de type 'view' pour le site id = 1.";}

[li] I open a session (superadmin) in other tab, no token: same view error
[/li][li] I try with an user with the view access to this id site, login session: don’t work, same error
[/li][li] I add token in url: it works
[/li][li] I add anonymous access, remove session/token: it works
[/li][li] I try live widget in iframe: work with the token or session, ask to login if no token (error: view for site id=1), no backtrace
[/li][li] I try same with other widget: give no data to report when session/token and don’t work when no session with backtrace
[/li]


#0 D:\Apache2215\htdocs\stats\core\ViewDataTable\GenerateGraphHTML.php(92): Piwik_ViewDataTable_GenerateGraphHTML->buildView()
#1 D:\Apache2215\htdocs\stats\core\Controller.php(146): Piwik_ViewDataTable_GenerateGraphHTML->main()
#2 D:\Apache2215\htdocs\stats\plugins\VisitTime\Controller.php(43): Piwik_Controller->renderView(Object(Piwik_ViewDataTable_GenerateGraphHTML_ChartVerticalBar), true)
#3 [internal function]: Piwik_VisitTime_Controller->getVisitInformationPerLocalTime(true)
#4 D:\Apache2215\htdocs\stats\core\FrontController.php(138): call_user_func_array(Array, Array)
#5 D:\Apache2215\htdocs\stats\core\FrontController.php(159): Piwik_FrontController->dispatch('VisitTime', 'getVisitInforma...', Array)
#6 D:\Apache2215\htdocs\stats\plugins\Widgetize\Controller.php(67): Piwik_FrontController->fetchDispatch('VisitTime', 'getVisitInforma...', Array)
#7 [internal function]: Piwik_Widgetize_Controller->iframe()
#8 D:\Apache2215\htdocs\stats\core\FrontController.php(138): call_user_func_array(Array, Array)
#9 D:\Apache2215\htdocs\stats\index.php(53): Piwik_FrontController->dispatch()
#10 {main}

and

[li] I retested archive.php when anonymous had access
[/li] [li] in mysql some of

 Aborted connection 12414 to db : ‘dbpiwik’ host : MYHOSTNAME (got an error reading communication packets)

[/li] [li] It seems there are many line about piwik in apache logs but too numerous, i check tomorow
[/li] [li] I added a new site, with stats generated automaticly from the plugin for that, it has the same issue. page when generation of fake stats are in the header: > [JavaScript] generation of fake stats piwik - Pastebin.com
[/li]
[/ul]

I will investigate more tomorow

Hi,

From my piwik localhost (dev machine) I bind to server mysql and then it works (for the first time (with server datas ofc)
( sources here, db there)
So it means I can active auto archiving from my machine, go to dashboard, and disable auto archiving then go to server url to watch dashboard

I checked php.ini in both case, i can’t find the difference

quézako ?
It is a first big step in this very long debugage, but it must in final, works from server url

EDIT: I just upgraded to 1.7b8, looks working from server url, making test, I wil erport here

I am sorry to report I have the same type of problems.
Some widgets do come up (veeeeerrry sloooowly), some never do.
Sometimes, I get the "Oups ! Problème rencontré durant la requête, veuillez réessayer. " error message.
If I insist clicking on tabs or others, I may get:


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@www.<beep>.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

I’m afraid I’m not quite up to trying some of the problem determination procedures suggested here. Just thought I’d report another datapoint (similarly, the stats seem to accrue OK into the DB, it’s really the data retrieval/analysis/display that fails).

My site is hosted at OVH, it’s a 60gp pack.
1.5 was working just fine for this site so far
1.6 started exhibiting this behavior
1.7-b9 (which I tried tonight) has no more success

My client browser is FireFox 9.0.1, running under WindowsXP, if that matters (after all, the failures may be on the client side as well, no?)…
[edit: same problem under MSIE 8, on the same machine, the browser/client code is probably not the culprit]