Not tracking visits since upgrading to 1.1.1

A few days ago, I used the automatic upgrade button to upgrade to 1.1.1

Since the upgrade, Piwik is not tracking any new data (everything 0 visits). But the Live Visitors on the dashboard is working so the tracking code must still be working.

Any ideas for what I need to check?

thanks, Rob

Just to clarify, I just checked the database and the data is there in the database, but it is not shown in Piwik.

thanks, Rob

If you’re using the cron script, make sure the execute (x) bit is set.

Yes, the execute bit is set. I’ve also run the archive script manually to make sure but still nothing showing.

thanks, Rob

Hi Rob - I experience exactly the same problem. Any solution yet ?

Sort of. In Settings -> General Settings I changed" Allow Piwik archiving to trigger when reports are viewed from the browser" back to “Yes” and it is now working.

I haven’t figured out why it no longer works by running the archiving from the command line using /misc/cron/archive.sh which is also why the cron job no longer works.

Rob

I found out about another solution:

On my server i use the cron for archiving, so i tried to run it from the shell. It reported permission problems that cold be corrected with the following commands:

chmod 0777 /path/to/piwik/tmp
chmod 0777 /path/to/piwik/tmp/templates_c
chmod 0777 /path/to/piwik/tmp/cache
chmod 0777 /path/to/piwik/tmp/assets

The exact path was shown in th error report of the cron scrip (misc/cron/archive.sh)

The strange thing is, when I run the misc/cron/archive.sh script manually from the command line, it looks like it is working, it says “Starting archiving” or whatever it says, but it doesn’t actually do anything.

Rob

I can confirm this. After upgrading to 1.1.1. the archive.sh starts archiving but stops without any error or notice.

The solution is to add write rights to the /path/to/piwik/tmp folder

or simply execute:

chmod -R a+w /path/to/piwik/tmp

as stated by cialog.

Raw Rob, Zero, I am unable to reproduce the archive.sh bug where "it looks like it is working, it says “Starting archiving”, but it doesn’t actually do anything. "

Can you please elaborate how I can reproduce this issue? In the case where permissions are not enough, the archive should show an error message rather than nothing (it does in my tests)

[quote=matthieu]
Raw Rob, Zero, I am unable to reproduce the archive.sh bug where "it looks like it is working, it says “Starting archiving”, but it doesn’t actually do anything. "

Can you please elaborate how I can reproduce this issue? In the case where permissions are not enough, the archive should show an error message rather than nothing (it does in my tests)[/quote]

I was running version 1 (I assume it was 1.0, not entirely sure) and everything was working fine. Used the automatic upgrade to upgrade to 1.1.1 and from that point on the archive.sh script stopped working. It would just say “Starting Piwik reports archiving…” and then immediately return to the command prompt.

I’ve just changed the permissions as stated above and it now works as it should.

What else do you need to know?

Rob

(Thanks to Cialog and Zero for the solution.)

are you able to change the permission back to what they were and see the original problem? then please write the steps to reproduce here and I’ll look into it

[quote=matthieu]
are you able to change the permission back to what they were and see the original problem? then please write the steps to reproduce here and I’ll look into it[/quote]

Yes, type the command chmod -R a-w tmp to remove write permissions
run archive.sh
The message says "Starting Piwik reports archiving…"
and then it immediately finished and goes back to the command prompt, doing nothing.

Rob

When I run the command I see the error message:


root@pwk1:~# su www-data -c "sh /path/piwik/misc/cron/archive.sh"
Starting Piwik reports archiving...


Archiving period = day for idsite = 0777...
<html>
<head>
        <title>Piwik &rsaquo; Error</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" href="plugins/CoreHome/templates/images/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="themes/default/simple_structure.css" />
</head>
<body>
<div id="content">
        <div id="title"><span id="h1">Piwik </span><span id="subh1"> # open source web analytics</span></div>

<p><p><b>Piwik couldn't write to some directories</b>.</p> <p>Try to Execute the following commands on your server:</p><blockquote><code>chmod 0777 /path/piwik/tmp</code><br /><code>chmod 0777 /path/piwik/tmp/templates_c</code><br /><code>chmod 0777 /path/piwik/tmp/cache</code><br /><code>chmod 0777 /path/piwik/tmp/assets</code><br /></blockquote><p>If this doesn't work, you can try to create the directories with your FTP software, and set the CHMOD to 0777 (with your FTP software, right click on the directories, permissions).</p><p>After applying the modifications, you can <a href='index.php'>refresh the page</a>.</p><p>If you need more help, try <a href='?module=Proxy&action=redirect&url=http://piwik.org'>Piwik.org</a>.</p></p> <ul>
                                                <li><a target="_blank" href="?module=Proxy&action=redirect&url=http://piwik.org">Piwik homepage</a></li>
                                                <li><a target="_blank" href="?module=Proxy&action=redirect&url=http://piwik.org/faq/">Piwik Frequently Asked Questions</a></li>
                                                <li><a target="_blank" href="?module=Proxy&action=redirect&url=http://piwik.org/docs/">Piwik Documentation</a></li>
                                                <li><a target="_blank" href="?module=Proxy&action=redirect&url=http://forum.piwik.org/">Piwik Forums</a></li>
                                                <li><a target="_blank" href="?module=Proxy&action=redirect&url=http://demo.piwik.org">Piwik Online Demo</a></li>
                                                </ul></div>
</body>
</html>

Maybe because I’m logged in as root… not sure?

If I use su to become root, archive.sh works even if the there are no write permissions (for anyone) to tmp.

That’s strange, I don’t understand that!

Rob