History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3128
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Blocker Blocker
Assignee: Robin Shen
Reporter: CBMarin
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Perforce Plugin - can only be used from host (switch host for P4 workspace)

Created: 01/Feb/18 01:52 PM   Updated: 19/Jan/19 01:09 PM
Component/s: None
Affects Version/s: 7.0.31, 7.0.30, 7.0.29, 7.0.28, 7.0.27, 7.0.26, 7.0.25, 7.0.24, 7.0.23, 7.0.22, 7.0.21, 7.0.20, 7.0.19, 7.0.18, 7.0.17, 7.0.16, 7.0.15, 7.0.14, 7.0.13, 7.0.12, 7.0.11, 7.0.10, 7.0.9, 7.0.8, 7.0.7, 7.0.6, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 7.0.0, 6.1.36, 6.1.35, 6.1.34, 6.1.33, 6.1.32, 6.1.31, 6.1.30, 6.1.29, 6.1.28, 6.1.27, 6.1.26, 6.1.25, 6.1.24, 6.1.23, 6.1.22, 6.1.21, 6.1.20, 6.1.19, 6.1.18, 6.1.17, 6.1.16, 6.1.15, 6.1.14, 6.1.13, 6.1.12, 6.1.11, 6.1.10, 6.1.9, 6.1.8, 6.1.7, 6.1.6, 6.1.5, 6.1.4, 6.1.3, 6.1.2, 6.1.1, 6.1.0, 6.0.36, 6.0.35, 6.0.34, 6.0.33, 6.0.32, 6.0.31, 6.0.30, 6.0.29, 6.0.28, 6.0.27, 6.0.26, 6.0.25, 6.0.24, 6.0.23, 6.0.22, 6.0.21, 6.0.20, 6.0.19, 6.0.18, 6.0.17, 6.0.16, 6.0.15, 6.0.14, 6.0.13, 6.0.12, 6.0.11, 6.0.10, 6.0.9, 6.0.8, 6.0.7, 6.0.6, 6.0.5, 5.1.43, 6.0.4, 5.1.42, 6.0.3, 6.0.2, 6.0.1, 5.1.41, 6.0.0, 5.1.40, 5.1.39, 5.1.38, 5.1.37, 5.1.36, 5.1.35, 5.1.34, 5.1.33, 5.1.32, 5.1.31, 5.1.30, 5.1.29, 5.1.28, 5.1.27, 5.1.26, 5.1.25, 5.1.24, 5.1.23, 5.1.22, 5.1.21, 5.1.20, 5.1.19, 5.1.18, 5.1.17, 5.1.16, 5.1.15, 5.1.14, 5.1.12, 5.1.11, 5.1.10, 5.1.9, 5.0.42, 5.1.8, 5.1.7, 5.1.6, 5.1.5, 5.1.4, 5.1.3, 5.1.2, 5.1.1, 5.1.0
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. pme_master.png
(21 kb)

2. qb_repository.JPG
(81 kb)
Environment:
Windows 7 for server.
Windows 10 for agent.


 Description  « Hide

Sometimes (and more often since new server on 7.0.31)
I have this error when sync workspace before done any step
Its change the host from CLIENT to SERVER and i don't understand why, i try to use 'Auto-generated safe name based on node and root directory', 'Use specific client name' but still this message ....
I see that the command is launch during : PerforceRepository.java on function revertWorkspace()
I use one repository by agent.

Thanks.

Here the detail of the error message :

Checking out revision '66666' of repository 'P4-REPOSITORY'...
 - Client 'client_AGENT can only be used from host client_SERVER'.
 - Executing post-execute action...
- Step 'master>checkout' is failed: Failed to run command: "C:\Program Files\Perforce\p4.exe" -p server:66 -u user -P ****** -c client_AGENT revert -w //...
Command return code: 1
Command error output: Client 'client_AGENT' can only be used from host 'client_SERVER'.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [01/Feb/18 11:56 PM]
Can you please attach the whole build log with step name information included?

CBMarin [05/Feb/18 09:30 AM]
Hi,
Here the checkout step detail, its a perforce use.

Name checkout
Type Checkout
Description not defined
Enabled yes
Execute Condition If all previous sibling steps are successful
Node Selection On specified build agent
Build Agent AGENT:8811
Inheritable yes
Repository P4-REPOSITORY
Node Preference Prefer least loaded node
Pre-Execute Action No action
Post-Execute Action Execute a script
Script groovy:vars.get("PerforceSyncCL").setValue(repositories.get("P4-REPOSITORY").getRevision().toString())
Repeat Parameters not defined
Fetch Input Files not defined
Send Output Files not defined
Timeout 0
Retry Upon Failure not defined

-----------------------------------------------
And here the full log :

INFO - Executing pre-execute action...
INFO - Running step...
INFO - Checking step execute condition...
INFO - Step execute condition satisfied, executing...
INFO - Executing pre-execute action...
INFO - Running step...
INFO - Checking out revision 666 of repository 'P4-REPOSITORY'...
WARN - Client 'client_AGENT' can only be used from host 'client_SERVER'.
INFO - Executing post-execute action...
ERROR - Step 'master>checkout' is failed: Failed to run command: "C:\Program Files\Perforce\p4.exe" -p server:66 -u user -P ****** -c client_AGENT revert -w //...
Command return code: 1
Command error output: Client 'client_AGENT' can only be used from host 'client_SERVER'.

Robin Shen [06/Feb/18 04:40 AM]
Sorry I am not clear previously. When show the build log, there is a checkbox "show step info". Please check that option and download the build log. Please also include the repository definition.

CBMarin [06/Feb/18 08:51 AM]
Hi, thanks for the details so here the log with step :

 [master>checkout@AGENT:8811] INFO - Checking step execute condition...
 [master>checkout@AGENT:8811] INFO - Step execute condition satisfied, executing...
 [master>checkout@AGENT:8811] INFO - Executing pre-execute action...
 [master>checkout@AGENT:8811] INFO - Running step...
[master>checkout@AGENT:8811] INFO - Checking out revision '666' of repository 'P4-AGENT_REPOSITORY'...
 [master>checkout@AGENT:8811] WARN - Client 'USER_AGENT' can only be used from host 'SERVER'.
 [master>checkout@AGENT:8811] INFO - Executing post-execute action...
 [master>checkout@AGENT:8811] ERROR - Step 'master>checkout' is failed: Failed to run command: "C:\Program Files\Perforce\p4.exe" -p perforce:77 -u USER -P ****** -c USER_AGENT revert -w //...
Command return code: 1
Command error output: Client 'USER_AGENT' can only be used from host 'SERVER'.

It seems that client USER_AGENT want to be used on SERVER host.

Please see the repository definition on attach file.

Robin Shen [06/Feb/18 11:32 PM]
Please do not use the option "Use specified client name" as this option will always use the same client name even if multiple clients are used across different machines. Please use the auto-generated name based on configuration and path.

CBMarin [07/Feb/18 08:40 AM]
Hi,
I can't use this kind of workspace, my workstation use client hardcode name, use on other software and i don't want to change it.
I have already try this solution but the generated workspace name don't respect my name convention...

That i don't understand its why the SERVER try to use the client workspace from AGENT, why it do this....

Thanks for your respond.


CBMarin [07/Feb/18 08:44 AM]
And I already try the solution to use the generated workspace but exaclty the same trouble the server change the workspace host on his side and client crash when use it.

Robin Shen [07/Feb/18 11:47 PM]
Using specified name is fine, but you need to configure your master step running on AGENT also. That is to say:the master step, the checkout step and the label step (if you have) should all running on the same machine (AGENT here).

CBMarin [08/Feb/18 08:45 AM]
Thanks Robin for all your help.
I was using on Node selection the option : "On node with specified resource" using Ressource from AGENT, but i will try the 'On specified build Agent' on AGENT to test.
Tell you if its better !

Another thanks, your help is really appreciated.

CBMarin [08/Feb/18 09:47 AM]
OK its not work the way intended, configuration are started without wait for the node just start multi configuration on the same node... so i re-put the "on node with specified ressource' because i don't want my agent start configurations without wait for previous check to be done.

Robin Shen [09/Feb/18 12:19 AM]
If you hard-code the perforce client name, you should make sure that all steps of the build runs on same machine. You may specify your node selection setting as:

if all criterias are matched:
the first criteria: your previous resource match criteria
the second criteria: on the AGENT node

This way the build will only run on AGENT node but will also wait for the resource to be available.

CBMarin [14/Feb/18 08:42 AM]
Hi !
I will try this method and return to give you the feedback.
Thanks for your help !

CBMarin [14/Feb/18 01:30 PM]
No its a failed. I put a new screenshot about my master configuration can you check it ? thanks !!

Robin Shen [15/Feb/18 03:02 AM]
I noticed that you are using the same value for "Client Name" and "Existing Client Name". "Existing Client Name" should be specified as an existing client used as template for QB client. It should be pre-created manually and the name should be different from "Client Name" used by QB for build purpose. Please use a different name, and make sure that:
1. Existing client name is created before-hand.
2. Client name should not be exist before-hand (will be created by QB). If it already exists, please delete it first.

CBMarin [20/Feb/18 10:02 AM]
No solution is working, create workspace as a template, remove the current one, use the Existing Client Name to be used as template.
Still no working, I create a script in lua to force the host before any operation, it works.

Robin Shen [20/Feb/18 11:21 PM]
This works at my side with your setting, so not sure what happens? Are you able to reproduce this issue with a sample database and then send the backup to me for demonstration?