google bigquery - oauth2client.client.AccessTokenRefreshError: invalid_grant Only in Docker -


i have same code same p12 file (checked md5 sums), same account_email, , same scope working on number of computers, not working in docker containers on of working computers. code snippet follows:

with open(self.pkcs12_file_path, 'rb') f:     key = f.read()     scope = ['https://www.googleapis.com/auth/bigquery',              'https://www.googleapis.com/auth/cloud-platform']     credentials = signedjwtassertioncredentials(self.account_email,                                                     key, scope) http = httplib2.http() self.http = credentials.authorize(self.http) service = discovery.build('bigquery', 'v2', http=self.http) 

whenever try inside of docker container, oauth2client.client.accesstokenrefresherror: invalid_grant @ discovery.build line. i'm thinking might have needing expose ports, have no idea i'd need expose, or if that's actual problem. have ideas?

this sounds clock issue. google's oauth access tokens valid 1 hour (google refresh tokens valid forever , can use them retrieve new access token). can verify docker container's clock synced host machine (or set expected time zone?).

see: will docker container auto sync time host machine?


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -