gam batch missing oauth2.txt.lock

529 views
Skip to first unread message

Tiago Jobling

unread,
Oct 3, 2019, 9:58:12 AM10/3/19
to GAM for G Suite
Hi everyone!

I updated gam today and I can't run batch commands anymore.

$ gam version
Python 3.7.4 64-bit final
google-api-python-client 1.7.11
MacOS Mojave 10.14.6 x86_64
Path: /Users/user/bin/gam

I'm attaching a redacted example below:

$ gam batch batch.txt
Using 12 processes...

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

<6 lines containing command output.>
Finished 6 of 12 processes.
Finished 6 of 12 processes.
^C

This was already after trying to run the batch file with the commit-batch command in it, which gave me the following output:

$ gam batch .batch.txt
Using 25 processes...
commit-batch - waiting for running processes to finish before proceeding

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

ERROR: [Errno 2] No such file or directory: '/Users/user/bin/gam/oauth2.txt.lock'

<12 lines containing command output.>

^C


I could complete the task at hand by reducing the file size, but I think this may be a bug.
Should I create a blank '/Users/user/bin/gam/oauth2.txt.lock' file to test?

Best Regards,


Tiago Jobling

unread,
Oct 3, 2019, 10:01:40 AM10/3/19
to GAM for G Suite
Created a test batch file:

gam version
gam version
gam version
gam version
gam version


gam version


commit
-batch


gam version
gam version

And it worked correctly.
Testing a bit further.

Tiago Jobling

unread,
Oct 3, 2019, 10:04:43 AM10/3/19
to GAM for G Suite
Created yet another file:

gam print users > /dev/null
gam
print groups > /dev/null
gam info user user


commit
-batch


gam
print users > /dev/null
gam
print groups > /dev/null
gam info user user

Besides the error in gam formatting due to trying to redirect output, the batch itself worked.
I'm not sure what caused this anymore.

Tiago Jobling

unread,
Oct 31, 2019, 8:55:44 AM10/31/19
to GAM for G Suite
Happened again with a 

gam updategroup$group clear member

This group had 20 users (19 members) and it only finished 18 of 19 processes, getting stuck.

Edward Danley

unread,
Nov 3, 2019, 8:45:53 AM11/3/19
to GAM for G Suite
You are not alone. I've been seeing this for a while now. I was hoping the 4.96 update would fix it but no luck so far. I came hunting this morning looking for a solution. Glad to know I'm not alone.

Ed

Ross Scroggs

unread,
Nov 3, 2019, 8:52:22 AM11/3/19
to google-ap...@googlegroups.com
Edward,

Give an example of the problem you're experiencing.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/81ec827c-15a2-4155-a9c5-acf4335882b0%40googlegroups.com.

Edward Danley

unread,
Nov 3, 2019, 9:00:06 AM11/3/19
to GAM for G Suite
I'm on a Mac (if that matters). I issue a command similar to: gam update group E...@ilwg.cap.gov sync member file ES

This is what I'm seeing (right now). If I kill the process and start over, it works fine but then dies on another group update. I have a list of about 300 groups that I update 2-3 times per month based on membership records. Not sure when it started or what caused it.

Thanks.

Group: e...@ilwg.cap.gov, Will add 4 and remove 48 MEMBERs.

Using 25 processes...


ERROR: [Errno 2] No such file or directory: '/Users/ed/bin/gam/oauth2.txt.lock'

 Group: e...@ilwg.cap.gov, x...@ilwg.cap.gov Removed

 Group: e...@ilwg.cap.gov, x...@yahoo.com Removed

 Group: e...@ilwg.cap.gov, x...@gmail.com Removed

... (about 50 more)

 Group: e...@ilwg.cap.gov, x...@gmail.com Removed

 Group: e...@ilwg.cap.gov, x...@gmail.com Removed

Finished 51 of 52 processes.

Finished 51 of 52 processes.

Finished 51 of 52 processes.

Finished 51 of 52 processes.

Finished 51 of 52 processes.

Finished 51 of 52 processes.

Abhishek Srivastava

unread,
Nov 3, 2019, 9:06:07 AM11/3/19
to GAM for G Suite
Hi ,

Can someone help me to send the password reset email through gam?

Ross Scroggs

unread,
Nov 3, 2019, 9:45:27 AM11/3/19
to google-ap...@googlegroups.com
Abhishek,

You can do this with Advanced GAM(https://github.com/taers232c/GAMADV-XTD3):
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Send-Email#send-an-email-to-notify-a-person-of-their-new-gsuite-account

This is geared toward sending a message to a newly created user but can be modified to do you want.
Where in the Admin GUI do you generate the reset password email? I can set up a message templat from that.

Ross

--
ross.s...@gmail.com



> On Nov 3, 2019, at 6:06 AM, 'Abhishek Srivastava' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
>
> Hi ,
>
> Can someone help me to send the password reset email through gam?
>
> --
> You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/01cec2cb-f0d2-4245-bc49-13db460e35f6%40googlegroups.com.

Abhishek Srivastava

unread,
Nov 3, 2019, 10:59:51 AM11/3/19
to google-ap...@googlegroups.com, ross.s...@gmail.com
Hey Ross,

I really appreciate your quick response. 

while resetting the password of users I want to trigger the reset password email to the user's personal email address through gam. 

Thanks & Regards,
Abhishek Srivastava
Corporate Office - Gurgaon


Greer, Ronald

unread,
Nov 4, 2019, 8:57:50 AM11/4/19
to google-ap...@googlegroups.com
I often see this in my domain (on PC). When it happens, it always repeats one shy of total several times before ending.

Ronald E. Greer
Director of Technology
Warren County R-III School District
gre...@warrencor3.k12.mo.us
p.636/456-6955  f.636/456-6931


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages