Dear all,
I am trying to write a JIRA plugin using PHP and the JIRA Rest API.
The problem is I cannot connect to JIRA using curl.
Even when I try from command line:
root@mydevel:~# curl -u admin:admin http://localhost:2990/jira/rest/api/2/user/search/?username=admin
curl: (7) couldn't connect to host
I get this "could not connect to host" error.
I can fetch other site like "http://www.google.com" though.
However when try the RESP call in the browser I get the correct response.
Does anybody know, what the problem could be?
Thanks a lot,
Bernd
Community moderators have prevented the ability to post new answers.
Hi Bernd,
What version of JIRA are you running?
Also, this could be caused by some firewall blocking the port. I'm assuming that if you make the request to that URL in the browser it works?
Best regards
Hi Benito,
Thanks for you input - obviously that was the problem.
Jira is running on my macbook, however my helloworld.php script is running on my webserver which is a virtual machine. Hence, the virtual machine cannot access jira via localhost:2990.
When I access jira via http://bernds-macbook-pro.local:2990/jirafrom within the VM it is working.
Best regards,
Bernd
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.