Jump to content


[P4D][P4Server] A P4D question, sorry.

P4D P4Server

  • Please log in to reply
8 replies to this topic

#1 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 24 December 2018 - 08:22 AM

A P4D question, sorry.

I was not new to P4V,
But never create a server myself until recently....
And it didn't work as I expected.

Here is the case:

I have an computer at home, let's call it computer A.
I install both P4D and P4V.
I created 2 users and the related passwords.
I create the depot.
And be able to connect to my P4Server locally with
localhost:1666

But I want another machine connect to my computer, too.

So,
The public network address of the router which computer A connected is:
aaa.bbb.ccc.ddd // let's say these are numbers
I did an port forwarding for my computer A on the router, for port:1666

Then I keep the computer A on and move to another place where I have the computer B.
now I tried to connect to the server on computer A from computer B.

aaa.bbb.ccc.ddd:1666

But failed.....
"Connect to server failed; check $P4PORT.
TCP connected to aaa.bbb.ccc.ddd:1666 failed.
connect: aaa.bbb.ccc.ddd:1666: WSAETIMEOUT"

So did I miss something?
I don't know how to check...

Also I can't connect to server from
aaa.bbb.ccc.ddd:1666
at computer A either.
only

localhost:1666

works.

I don't know what's going wrong...
Thx a lot for the help is there will be any.

#2 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 24 December 2018 - 06:02 PM

Also the same strategy works for SVN.
I mean create a local server + portForwarding
Then I can access the machine at home from another machine at another place with SVN.
But I don't know why this didn't work for P4. :-P

#3 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 764 posts

Posted 24 December 2018 - 06:18 PM

If you start your P4D instance with a P4PORT of "localhost:1666", it will ONLY accept connections via localhost.  If you start it with a P4PORT of "1666" it will accept connections via any network interface.

#4 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 27 December 2018 - 08:07 AM

thx very much for the answer!
I think you're correct!
But,
After I install the P4D, it will automatically start when I start the windows. (the service auto started)
How do I change the P4D Instanced start params??
:ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r: :ph34r:

#5 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 764 posts

Posted 28 December 2018 - 10:54 AM

p4 set -S Perforce P4PORT=1666

will set the P4PORT value for the service called "Perforce" (which is how the installer sets P4D up by default on Windows).

#6 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 02 January 2019 - 08:20 AM

I tried this
D:\Tools\W\Perforce\Server>p4 set -S Perforce P4PORT=1666
Perforce client error:
registry: create key: The system could not find the environment option that was entered.

also this is my p4 info

D:\Tools\W\Perforce\Server>p4 info
User name: HoHo
Client name: DESKTOP-FAAPEDH
Client host: DESKTOP-FAAPEDH
Client unknown.
Current directory: d:\Tools\W\Perforce\Server
Peer address: 127.0.0.1:6157
Client address: 127.0.0.1
Server address: DESKTOP-FAAPEDH:1666
Server root: D:\Tools\W\Perforce\Server
Server date: 2019/01/02 01:09:13 -0800 Pacific Standard Time
Server uptime: 52:41:00
Server version: P4D/NTX64/2018.1/1660568 (2018/05/09)
Server license: none
Case Handling: insensitive

Also I can't find any tutorials from Youtube....
Sorry to say...

#7 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 02 January 2019 - 08:23 AM

OK, I tried stop the server and use the cmd you send to me,
But it won't start the server
D:\Tools\W\Perforce\Server>p4 admin stop
D:\Tools\W\Perforce\Server>p4 set -S Perforce P4PORT=1666

Perforce client error:
registry: create key: The system could not find the environment option that was entered.

And I can only re-start the server from windows <ServicesWindow>

Which there's I can't place the param when start it from services window

#8 btbt9527

btbt9527

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 02 January 2019 - 09:29 AM

Also is that possible to create the server from P4Admin?
I can't find the related UI...

Also I tried to add the cmd [p4 set-S Perforce P4PORT=1666] as service start param at windows <ServicesWindow>, gave me error, didn't work

#9 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 764 posts

Posted 07 January 2019 - 10:45 AM

I've never seen that error before -- were you running this in a shell with admin privileges?  You probably need that these days to be able to set registry variables for a service.

Also, just to sanity check, your service is called "Perforce", right?  If it's not, replace the "-S Perforce" with whatever the name of the service is.




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users