I am trying to integrate, JIRA Task with Perforce Jobs, constantly getting error saying that
Problem connecting to Perforce:
com.perforce.api.CommitException java.io.IOException: Perforce client error: Connect to server failed; check $P4PORT. TCP connect to url:1666 failed. No such host is known.
I am using evaluation license in JIRA, hosted locally. Need help, if any one has resolved this issue
Thanks in Advance.
That's simple - your JIRA service is running on a machine that does not have access to, or cannot resolve the name for, your perforce server.
Can you run a perforce client, or even just "p4 info" on the JIRA machine and see if that can reach it. I suspect it won't, and you'll need to work out why and fix that.
Thanks for your response. I tried running "p4 info", I can reach to it. I have Perforce Client and Perforce Server running locally. I am still getting the error saying that
com.perforce.api.CommitException java.io.IOException: Perforce client error: Connect to server failed; check $P4PORT. TCP connect to localhost:1666 failed. No such host is known.
Can you please help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you check what "p4 info" returns when you run it on the JIRA Server as I asked before?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I run P4 info in JIRA Server, I got a response which has username, client host, client address and other fields which we normally get when I run p4 info in command prompt.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having a similar problem. The Legacy P4 plugin worked fine on Linux (with a very old version of P4), but it would not work on a Windows server machine.
I could ping the hostname to my heart's content, and p4 info worked as expected – running as my user, running as admin, or running as jirauser (a local Windows account).
Yet, the Legacy P4 job creation always failed – I tried several versions of 32 and 64-bit p4.exe – I also tried hostname, FQDN version of hostname, and IP address of hostname. I always included :1666 in the specification of the port – the "TCP connect failed" message would not always include the port number (depending upon which version of the p4 client I used).
Most of the time, I get the "no such host" message. With some older versions of the p4 client, particularly when using ip.ad.dr.ess:1666, I got a slightly different message (actual IP address masked)
Caused by: java.io.IOException: Perforce client error: Connect to server failed; check $P4PORT. TCP connect to www.xxx.yyy.zzz:1666 failed. socket: www.xxx.yyy.zzz:1666: WSAEPROVIDERFAILEDINIT
I've adjusted the timeout (and the "p4.threshold" in the perforce-jira-plugin.properties), to no avail either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The p4info tells you that it can connect, and hence rules out a number of problems, but that's a short and simple connection. You always need to run it.
In the original question, that was simple - the network was not allowing JIRA to reach the Perforce server, but you have a more complex problem - the server is killing the connection after it's been established and some data has been exchanged.
It probably remains a networking error, but start at http://answers.perforce.com/articles/KB/2968
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just curious to know, do you have a P4 installed on the JIRA box
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. Perforce was always running on its own Linux server. When the JIRA server starts (on Windows Server 2016), I get the following message:
2017-03-16 17:31:24,084 JIRA-Bootstrap ERROR [c.a.jirafisheyeplugin.perforce.PerforceConfigImpl] Failed to resolve p4 server from alias: myp4server.mydomain.com:1666
Then, when I create jobs, most of the time I get the exact same message you get:
Caused by: java.io.IOException: Perforce client error: Connect to server failed; check $P4PORT. TCP connect to myp4server.mydomain.com:1666 failed. No such host is known. at com.perforce.api.P4Process.closeProcess(P4Process.java:587)
None of these problems happened until I moved the JIRA server from Linux to Windows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have Perforce installed on JIRA Box?Try installing a P4 on box, where your JIRA server is running. In the configuration page, make sure you have your path to point to P4.exe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem described by Miles was caused by SystemRoot variable being set to C:\WINNT.
It is reproducible outside of JIRA plugin. Just by setting SystemRoot environment variable screws p4 info, even if the rest of the parameters are set correctly.
Changing it to C:\Windows fixed the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.