Caused by: java.io.FileNotFoundException: /export/home/webluser/.p4tickets (Permission denied)
at java.io.FileOutputStream.open(Native Method)
My guess is both threads call IServer.login(), both decide a new ticket value should be stored and attempt to update the .p4tickets file at nearly the same instant, one succeeds and the other fails.
So if my Cultural Learnings of Perforce for Make Benefit Glorious Corporation of America is correct, yes?, then I have a few questions hopefully someone can help me with:
- What should I do? Some of my ideas include:
- Copy .p4tickets into a temp file, tell IServer to use the temp file. That way each thread would be operating on its own single-use temporary .p4tickets file.
- If login() typically doesn't write to the .p4tickets file, only writing to it when it decides a new ticket should be stored, then it seems like immediately re-trying the login() call should always succeed, right?