I'm getting an error when trying to access my Droplet with P4V.

I’m getting an error when trying to access my Droplet with P4V or any Perforce software. It is as follows: Connect to server failed; check $P4PORT. TCP connect to [Droplet IP Address]:1666 failed. connect: [Droplet IP Address]:1666: WSAECONNREFUSED. It seems the droplet is refusing my access, which is weird because when I set up perforce with puTTY, I don’t get rejected. Any ideas on troubleshooting this?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi Davidtveraas,

Remember that P4PORT not only specifies the port you connect to but also the host. This can be mildly confusing from time to time.

First check that your environment variable P4PORT is set to “devel:1666” (or “YourIP:1666” which one is more appropriate):

Windows: "set P4PORT"
unix: "echo $P4PORT"

If not, you have to set it

Windows: "set P4PORT=devel:1666"
unix (bash): "export P4PORT=devel:1666"

and then try to connect, for example using “p4 info”, to verify.

I’m not sure what OS you are running but if it is WinXP then I should also have a look at the built-in firewall. If that one is enabled you might as well have a block on port 1666 since that one is a non-standard port from a windows perspective.

Have a nice day.