Discussion:
[p4] Unable to connect to P4 server from P4V
P4Sam
2014-10-07 20:40:01 UTC
Permalink
Posted on behalf of forum user 'P4Sam'.

The "p4 info" output shows that the server is
running.��Possibly it's not listening on the right network
interface?��
kristo5747
2014-10-07 21:40:01 UTC
Permalink
Posted on behalf of forum user 'kristo5747'.

That's interesting. Why does it fail?


pxclpd33:/home/perforce => p4 -p localhost:16666 info Perforce client error:
Connect to server failed; check $P4PORT. TCP connect to localhost:16666
failed. connect: 127.0.0.1:16666: Connection refused
when this works?

pxclpd33:/home/perforce => p4 -p blahblah33:16666 info User name: perforce
Client name: perforce Client host: pxclpd33 Client root:
/opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer address:
147.22.111.80:50249 Client address: 147.22.111.80 Server address: pxclpd33:16666
Server root: /opt/perforce/P4ROOT Server date: 2014/10/07 15:36:25 -0600 MDT
Server uptime: 20:50:55 Server version: P4D/LINUX26X86_64/2013.2/740201
(2013/11/11) Server license: DIRECTV 36 users (support ends 2014/10/16) Server
license-ip: 147.22.111.80:16666 Case Handling: sensitive
It's the same machine....... :wacko: Confused.......



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/3622-unable-to-connect-to-p4-server-from-p4v
P4Sam
2014-10-07 21:55:01 UTC
Permalink
Posted on behalf of forum user 'P4Sam'.



[http://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=15477]
Post by kristo5747
That's interesting. Why does it fail?
blahblah33:/home/perforce => p4 -p localhost:16666 info Perforce client error: Connect to server failed; check $P4PORT. TCP connect to localhost:16666 failed. connect: 127.0.0.1:16666: Connection refused
when this works?
blahblah33:/home/perforce => p4 -p blahblah33:16666 info User name: perforce Client name: perforce Client host: blahblah33 Client root: /opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer address: 147.22.111.80:50249 Client address: 147.22.111.80 Server address: blahblah33:16666 Server root: /opt/perforce/P4ROOT Server date: 2014/10/07 15:36:25 -0600 MDT Server uptime: 20:50:55 Server version: P4D/LINUX26X86_64/2013.2/740201 (2013/11/11) Server license: MYEMPLOYER 36 users (support ends 2014/10/16) Server license-ip: 147.22.111.80:16666 Case Handling: sensitive
It's the same machine, right? Is it a different network interface?
Yep.��Restart p4d with P4PORT=16666 (I don't know what starts your
Perforce server so I can't be more specific than that, but it's probably
a script somewhere on your server machine that invokes "p4d -p
blahblah33:16666"; remove the "blahblah33:" from that) and that
should fix it.

There may be more debugging to do given that "p4 -p blahblah33:16666
info" DOESN'T work on your Windows workstation; that suggests that
"blahblah33" doesn't resolve to the same thing from everywhere,
which is problematic.��You mentioned that you were specifying the IP
manually in the client's hosts file; you might double-check what
"blahblah33" resolves to on the server machine and make sure
that's the same IP you were using on the client machine.



--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/3622-unable-to-connect-to-p4-server-from-p4v
Thandesha VK
2014-10-28 07:47:56 UTC
Permalink
I had similar issue today after upgrading from 12.2 to 14.2

Command used to start:

$p4d -d -r <root> -p server:1666 -L server.log -J server.journal

With above command, I am unable to connect to server from any other machine
than the local host.
$ p4 -p server:1666 info
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to server:1666 failed.
connect: server:1666: Connection refused

Immediately tried "telnet server 1666" from the server which gave me the
clue that when hostname is passed to p4d start command, it is converting it
into 127.0.0.1/localhost.

$ netstat -an | grep 1666
tcp 0 127.0.0.1:1666 0.0.0.0:*
LISTEN

So immediately restarted my p4d without hostname entry and netstat showed
it can accept connections.

$p4d -d -r <root> -p 1666 -L server.log -J server.journal

$ netstat -an | grep 1666
tcp 0 0 0.0.0.0:1666 0.0.0.0:*
LISTEN

So finally restarted p4d with IP:PORT that works best.

$p4d -d -r <root> -p IP:1666 -L server.log -J server.journal

$ netstat -an | grep 1666
tcp 0 0 IP:1666 0.0.0.0:* LISTEN


So guessing something changed in recent releases compared to 12.2?

On Wed, Oct 8, 2014 at 3:25 AM, P4Sam <
Post by P4Sam
Posted on behalf of forum user 'P4Sam'.
[http://forums.perforce.com/index.php?app=forums&module=
forums&section=findpost&pid=15477]
Post by kristo5747
That's interesting. Why does it fail?
blahblah33:/home/perforce => p4 -p localhost:16666 info Perforce
client error: Connect to server failed; check $P4PORT. TCP connect to
localhost:16666 failed. connect: 127.0.0.1:16666: Connection refused
when this works?
/opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer
address: 147.22.111.80:50249 Client address: 147.22.111.80 Server
P4D/LINUX26X86_64/2013.2/740201 (2013/11/11) Server license: MYEMPLOYER
36 users (support ends 2014/10/16) Server license-ip: 147.22.111.80:16666
Case Handling: sensitive It's the same machine, right? Is it a different
network interface?
Yep. Restart p4d with P4PORT=16666 (I don't know what starts your
Perforce server so I can't be more specific than that, but it's probably
a script somewhere on your server machine that invokes "p4d -p
blahblah33:16666"; remove the "blahblah33:" from that) and that
should fix it.
There may be more debugging to do given that "p4 -p blahblah33:16666
info" DOESN'T work on your Windows workstation; that suggests that
"blahblah33" doesn't resolve to the same thing from everywhere,
which is problematic. You mentioned that you were specifying the IP
manually in the client's hosts file; you might double-check what
"blahblah33" resolves to on the server machine and make sure
that's the same IP you were using on the client machine.
--
http://forums.perforce.com/index.php?/topic/3622-unable-
to-connect-to-p4-server-from-p4v
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"

Your Non-Quitting Friend
Thandesha VK
Thandesha VK
2014-10-28 09:21:14 UTC
Permalink
Interesting. Now since we started p4d with IP:1666, from localhost, it
can't accept connections from localhost without IP:1666 format

$ netstat -an | grep 1666
tcp 0 0 10.0.0.55:1666 0.0.0.0:*
LISTEN

$ p4 -p 1666 info
Perforce client error:
TCP connect to 1666 failed.
connect: 127.0.0.1:1666: Connection refused

$ p4 -p server:1666 info
Perforce client error:
TCP connect to server:1666 failed.
connect: 127.0.0.1:1666: Connection refused

p4 -p IP:1666 info works though.
Post by Thandesha VK
I had similar issue today after upgrading from 12.2 to 14.2
$p4d -d -r <root> -p server:1666 -L server.log -J server.journal
With above command, I am unable to connect to server from any other
machine than the local host.
$ p4 -p server:1666 info
Connect to server failed; check $P4PORT.
TCP connect to server:1666 failed.
connect: server:1666: Connection refused
Immediately tried "telnet server 1666" from the server which gave me the
clue that when hostname is passed to p4d start command, it is converting it
into 127.0.0.1/localhost.
$ netstat -an | grep 1666
tcp 0 127.0.0.1:1666 0.0.0.0:*
LISTEN
So immediately restarted my p4d without hostname entry and netstat showed
it can accept connections.
$p4d -d -r <root> -p 1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 0.0.0.0:1666 0.0.0.0:*
LISTEN
So finally restarted p4d with IP:PORT that works best.
$p4d -d -r <root> -p IP:1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 IP:1666 0.0.0.0:*
LISTEN
So guessing something changed in recent releases compared to 12.2?
On Wed, Oct 8, 2014 at 3:25 AM, P4Sam <
Post by P4Sam
Posted on behalf of forum user 'P4Sam'.
[http://forums.perforce.com/index.php?app=forums&module=
forums&section=findpost&pid=15477]
Post by kristo5747
That's interesting. Why does it fail?
blahblah33:/home/perforce => p4 -p localhost:16666 info Perforce
client error: Connect to server failed; check $P4PORT. TCP connect to
localhost:16666 failed. connect: 127.0.0.1:16666: Connection refused
when this works?
/opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer
address: 147.22.111.80:50249 Client address: 147.22.111.80 Server
P4D/LINUX26X86_64/2013.2/740201 (2013/11/11) Server license: MYEMPLOYER
147.22.111.80:16666 Case Handling: sensitive It's the same machine,
right? Is it a different network interface?
Yep. Restart p4d with P4PORT=16666 (I don't know what starts your
Perforce server so I can't be more specific than that, but it's probably
a script somewhere on your server machine that invokes "p4d -p
blahblah33:16666"; remove the "blahblah33:" from that) and that
should fix it.
There may be more debugging to do given that "p4 -p blahblah33:16666
info" DOESN'T work on your Windows workstation; that suggests that
"blahblah33" doesn't resolve to the same thing from everywhere,
which is problematic. You mentioned that you were specifying the IP
manually in the client's hosts file; you might double-check what
"blahblah33" resolves to on the server machine and make sure
that's the same IP you were using on the client machine.
--
http://forums.perforce.com/index.php?/topic/3622-unable-
to-connect-to-p4-server-from-p4v
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"
Your Non-Quitting Friend
Thandesha VK
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"

Your Non-Quitting Friend
Thandesha VK
Michael Mirman
2014-10-28 13:07:05 UTC
Permalink
Hi Thandesha -

I thought the notation "1666" as well as "localhost:1666" were specifically to allow only local connections.
We never used this method, but it was recommended by some (maybe even Perforce?) to use that for maintenance.
That's my vague recollection.

--
Michael Mirman
MathWorks, Inc.
508-647-7555


-----Original Message-----
From: perforce-user-***@perforce.com [mailto:perforce-user-***@perforce.com] On Behalf Of Thandesha VK
Sent: Tuesday, October 28, 2014 5:21 AM
To: perforce-***@perforce.com
Subject: Re: [p4] Unable to connect to P4 server from P4V

Interesting. Now since we started p4d with IP:1666, from localhost, it
can't accept connections from localhost without IP:1666 format

$ netstat -an | grep 1666
tcp 0 0 10.0.0.55:1666 0.0.0.0:*
LISTEN

$ p4 -p 1666 info
Perforce client error:
TCP connect to 1666 failed.
connect: 127.0.0.1:1666: Connection refused

$ p4 -p server:1666 info
Perforce client error:
TCP connect to server:1666 failed.
connect: 127.0.0.1:1666: Connection refused

p4 -p IP:1666 info works though.
Post by Thandesha VK
I had similar issue today after upgrading from 12.2 to 14.2
$p4d -d -r <root> -p server:1666 -L server.log -J server.journal
With above command, I am unable to connect to server from any other
machine than the local host.
$ p4 -p server:1666 info
Connect to server failed; check $P4PORT.
TCP connect to server:1666 failed.
connect: server:1666: Connection refused
Immediately tried "telnet server 1666" from the server which gave me the
clue that when hostname is passed to p4d start command, it is converting it
into 127.0.0.1/localhost.
$ netstat -an | grep 1666
tcp 0 127.0.0.1:1666 0.0.0.0:*
LISTEN
So immediately restarted my p4d without hostname entry and netstat showed
it can accept connections.
$p4d -d -r <root> -p 1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 0.0.0.0:1666 0.0.0.0:*
LISTEN
So finally restarted p4d with IP:PORT that works best.
$p4d -d -r <root> -p IP:1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 IP:1666 0.0.0.0:*
LISTEN
So guessing something changed in recent releases compared to 12.2?
On Wed, Oct 8, 2014 at 3:25 AM, P4Sam <
Post by P4Sam
Posted on behalf of forum user 'P4Sam'.
[http://forums.perforce.com/index.php?app=forums&module=
forums&section=findpost&pid=15477]
Post by kristo5747
That's interesting. Why does it fail?
blahblah33:/home/perforce => p4 -p localhost:16666 info Perforce
client error: Connect to server failed; check $P4PORT. TCP connect to
localhost:16666 failed. connect: 127.0.0.1:16666: Connection refused
when this works?
/opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer
address: 147.22.111.80:50249 Client address: 147.22.111.80 Server
P4D/LINUX26X86_64/2013.2/740201 (2013/11/11) Server license: MYEMPLOYER
147.22.111.80:16666 Case Handling: sensitive It's the same machine,
right? Is it a different network interface?
Yep. Restart p4d with P4PORT=16666 (I don't know what starts your
Perforce server so I can't be more specific than that, but it's probably
a script somewhere on your server machine that invokes "p4d -p
blahblah33:16666"; remove the "blahblah33:" from that) and that
should fix it.
There may be more debugging to do given that "p4 -p blahblah33:16666
info" DOESN'T work on your Windows workstation; that suggests that
"blahblah33" doesn't resolve to the same thing from everywhere,
which is problematic. You mentioned that you were specifying the IP
manually in the client's hosts file; you might double-check what
"blahblah33" resolves to on the server machine and make sure
that's the same IP you were using on the client machine.
--
http://forums.perforce.com/index.php?/topic/3622-unable-
to-connect-to-p4-server-from-p4v
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"
Your Non-Quitting Friend
Thandesha VK
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"

Your Non-Quitting Friend
Thandesha VK
------------------------------------------------------------------------------------
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
Thandesha VK
2014-10-29 05:17:47 UTC
Permalink
Hello Michael,

Behavior is not the same in older version (12.2)

Regards,
Thandesha

On Tue, Oct 28, 2014 at 6:37 PM, Michael Mirman <
Post by Michael Mirman
Hi Thandesha -
I thought the notation "1666" as well as "localhost:1666" were
specifically to allow only local connections.
We never used this method, but it was recommended by some (maybe even
Perforce?) to use that for maintenance.
That's my vague recollection.
--
Michael Mirman
MathWorks, Inc.
508-647-7555
-----Original Message-----
Sent: Tuesday, October 28, 2014 5:21 AM
Subject: Re: [p4] Unable to connect to P4 server from P4V
Interesting. Now since we started p4d with IP:1666, from localhost, it
can't accept connections from localhost without IP:1666 format
$ netstat -an | grep 1666
tcp 0 0 10.0.0.55:1666 0.0.0.0:*
LISTEN
$ p4 -p 1666 info
TCP connect to 1666 failed.
connect: 127.0.0.1:1666: Connection refused
$ p4 -p server:1666 info
TCP connect to server:1666 failed.
connect: 127.0.0.1:1666: Connection refused
p4 -p IP:1666 info works though.
Post by Thandesha VK
I had similar issue today after upgrading from 12.2 to 14.2
$p4d -d -r <root> -p server:1666 -L server.log -J server.journal
With above command, I am unable to connect to server from any other
machine than the local host.
$ p4 -p server:1666 info
Connect to server failed; check $P4PORT.
TCP connect to server:1666 failed.
connect: server:1666: Connection refused
Immediately tried "telnet server 1666" from the server which gave me the
clue that when hostname is passed to p4d start command, it is converting
it
Post by Thandesha VK
into 127.0.0.1/localhost.
$ netstat -an | grep 1666
tcp 0 127.0.0.1:1666 0.0.0.0:*
LISTEN
So immediately restarted my p4d without hostname entry and netstat
showed
Post by Thandesha VK
it can accept connections.
$p4d -d -r <root> -p 1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 0.0.0.0:1666 0.0.0.0:*
LISTEN
So finally restarted p4d with IP:PORT that works best.
$p4d -d -r <root> -p IP:1666 -L server.log -J server.journal
$ netstat -an | grep 1666
tcp 0 0 IP:1666 0.0.0.0:*
LISTEN
So guessing something changed in recent releases compared to 12.2?
On Wed, Oct 8, 2014 at 3:25 AM, P4Sam <
Post by P4Sam
Posted on behalf of forum user 'P4Sam'.
[http://forums.perforce.com/index.php?app=forums&module=
forums&section=findpost&pid=15477]
Post by kristo5747
That's interesting. Why does it fail?
blahblah33:/home/perforce => p4 -p localhost:16666 info
Perforce
Post by Thandesha VK
Post by P4Sam
Post by kristo5747
client error: Connect to server failed; check $P4PORT. TCP connect to
localhost:16666 failed. connect: 127.0.0.1:16666: Connection refused
when this works?
blahblah33:/home/perforce => p4 -p blahblah33:16666 info User
/opt/perforce/WORKSPACE/perforce Current directory: /home/perforce Peer
address: 147.22.111.80:50249 Client address: 147.22.111.80 Server
address: blahblah33:16666 Server root: /opt/perforce/P4ROOT Server
P4D/LINUX26X86_64/2013.2/740201 (2013/11/11) Server license: MYEMPLOYER
147.22.111.80:16666 Case Handling: sensitive It's the same machine,
right? Is it a different network interface?
Yep. Restart p4d with P4PORT=16666 (I don't know what starts your
Perforce server so I can't be more specific than that, but it's probably
a script somewhere on your server machine that invokes "p4d -p
blahblah33:16666"; remove the "blahblah33:" from that) and that
should fix it.
There may be more debugging to do given that "p4 -p blahblah33:16666
info" DOESN'T work on your Windows workstation; that suggests that
"blahblah33" doesn't resolve to the same thing from everywhere,
which is problematic. You mentioned that you were specifying the IP
manually in the client's hosts file; you might double-check what
"blahblah33" resolves to on the server machine and make sure
that's the same IP you were using on the client machine.
--
http://forums.perforce.com/index.php?/topic/3622-unable-
to-connect-to-p4-server-from-p4v
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
------------------------------------------------------------------------------------
Post by Thandesha VK
"The only thing worse than losing is quitting"
Your Non-Quitting Friend
Thandesha VK
------------------------------------------------------------------------------------
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"
Your Non-Quitting Friend
Thandesha VK
------------------------------------------------------------------------------------
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
--
------------------------------------------------------------------------------------
"The only thing worse than losing is quitting"

Your Non-Quitting Friend
Thandesha VK
Loading...