Verify the connection to the server
To verify a connection, run the p4 info
command.
$ p4 info
If P4PORT
is set correctly, information like the following
is displayed:
User name: bruno Client name: dhcp-133-n101 Client host: dhcp-133-n101.dhcp.perforce.com Client unknown. Current directory: /Users/bruno/tutorial Peer address: 127.0.0.1:49917 Client address: 127.0.0.1 Server address: localhost:1666 Server root: /Users/bruno/server Server date: 2016/03/01 16:15:38 -0800 PST Server uptime: 00:03:26 Server version: P4D/DARWIN90X86_64/2015.2/1340214 (2016/02/03) Server license: none Case Handling: insensitive
The Server address:
field shows the host to which
p4
connected and also displays the host and port
number on which the
Helix Server is listening. If P4PORT
is set incorrectly, you
receive a message like the following:
Perforce client error: Connect to server failed; check $P4PORT. TCP connect to perforce:1666 failed. perforce: host unknown.
If you get the "host unknown" error, speak to your administrator.