It's all about the answers!

Ask a question

concurrent scm commands: 2nd login user will replace 1st login user


Don Yang (7.7k21109138) | asked Mar 28 '17, 7:23 a.m.
edited Mar 28 '17, 7:23 a.m.

RTC/SCM tools 4.0.x.

There are several scm commands in a batch to login, load, unload and logout. In two projects, two users are login and running the similar commands concurrently. The user notice that when 2nd user login, it will replace the 1st user as if they are in the same session. Because of that, the below command failed:

"D:/Program Files/IBM/TeamConcert/scmtools/eclipse/scm" workspace replace-components "JPFV_Stream_Current_Prod workspace" stream "JPFV_Stream_Current_Prod" "JPFV_Comp" -b "ESSRIT201703200386" -r https://xxxxx:9443/ccm
Exception when executing “workspace replace-components”:
User “user2 ” has no permission to access to “JPFV_Stream_Current_Prod workspace”

ERROR :Fetch Baseline : "ESSRIT201703200386" to Component : "JPFV_Comp" failed!

Obviously it is intended that user1 to do the above execution and it has the permission for the workspace. Since user2 somehow replaces user1 after login, it has no permission and throws the exception. If it is not concurrent execution, both users can do the jobs properly.

I was thinking that two different users login should have its own session and uses its own .jazz-scm configuration. What could be wrong here? (Sandbox is different for the two batch executions)

Now the end user tries to workaround the issue by using the same user login. However, as the two batch execution take different time, when one execution completed early, it runs logout command and that leads to another batch execution to be logout as well because it is the same user. I am wondering if using scm --config path and specifying different path for the two logins would help here. If anyone could shed some lights here, it would be appreciated.

One answer



permanent link
Donald Nong (14.5k414) | answered Mar 30 '17, 7:32 a.m.

Note that when you use scm, the session information is stored in a location different to the configuration location and the sandbox. I don't have a 4.0.x environment, but for 5.0.x, the session location is %userprofile%\AppData\Local\jazz-scm. As you can see, it is unique to the Windows user only, and if you run multiple scm commands with the same Windows user at the same time, there will be conflicts.

There are two ways I can think of to avoid the problem that you described.
1. Use different Windows user login for different jobs.
2. Force the jobs to run in sequence - no concurrent jobs allowed.


Comments
Don Yang commented Mar 30 '17, 6:59 p.m.

Thanks Donald for the suggestions.
Yes those two options should work around the problem but it is not what the user prefers.
We suggested to use scm --config path to specify different configuration path for different execution and that works in this case.


Donald Nong commented Mar 30 '17, 7:23 p.m.

Agree. The --config solution would be the best. Just make sure all subsequent scm commands use the same --config parameter till the logout subcommand.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.