Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google analytics .dat file missing, falling back to noauth_local_webserver

I have an AWS EC2 machine that has been running nightly google analytics scripts to load into a database. It has been working fine up for months until this weekend. I have not made any changes to the code.

These are the two errors that are showing up in my logs:

/venv/lib/python3.5/site-packages/oauth2client/_helpers.py:256: UserWarning: Cannot access analytics.dat: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

Failed to start a local webserver listening on either port 8080 or port 8090. Please check your firewall settings and locally running programs that may be blocking or using those ports.

Falling back to --noauth_local_webserver and continuing with authorization.

It looks like it is missing my analytics.dat file but I have checked and the file is in the same folder as the script that calls the GA API. I have been searching for hours trying to figure this out but there are very little resources on the above errors for GA.

Does anyone know what might be going on here? Any ideas on how to troubleshoot more?

like image 354
espfome Avatar asked May 04 '17 15:05

espfome


1 Answers

I am not sure why this is happening, But I have a list of steps which might help you.

  1. check if this issue is caused by google analytics API version, google generally deprecates the previous versions of their API.
  2. I am guessing that you are running this code on cron on your EC2 serv, make sure that you include the path to the folder where the .dat file is. 3.check whether you have the latest credentials in the .dat file.

Authentication to the API will happen through the .dat file. Hope this solves your issue.

like image 86
Lakshmana Deepesh Avatar answered Nov 08 '22 17:11

Lakshmana Deepesh