To create a valid service user login ticket, from the edge/replica host machine, run the following:
p4 -E P4TICKETS=p4ticketsFile -u serviceUser -p P4TARGET login
where p4ticketsFile is the location where the edge/replica server is configured to locate the service user tickets file, serviceUser is the configured service user name, and P4TARGET is configured P4TARGET value for this edge/replica. For example if p4 configure show against the edge/replica shows the following settings:
the following command will create the service user login ticket in the correct location:
p4 -E P4TICKETS=/p4/1/.p4tickets -u service -p perforce:1666 login
Note, the P4PORT value specified with the -p flag must exactly match the P4TARGET setting for this edge/replica. You can validate the login ticket by adding the -s option to the login command:
p4 -E P4TICKETS=/p4/1/.p4tickets -u service -p perforce:1666 login -s
User service ticket expires in 198200 hours 10 minutes.
Best practice is to explicitly set the P4TICKETS location of the service user ticket in the edge/replica configuration to avoid confusion on where the edge/replica locates the service user login ticket.