Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #10666] API calls hangs on ubuntu/precise #3681

Closed
icinga-migration opened this issue Nov 18, 2015 · 6 comments
Closed

[dev.icinga.com #10666] API calls hangs on ubuntu/precise #3681

icinga-migration opened this issue Nov 18, 2015 · 6 comments
Labels
area/api REST API bug Something isn't working

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10666

Created by louisgab on 2015-11-18 18:57:52 +00:00

Assignee: (none)
Status: Rejected (closed on 2015-12-07 07:23:57 +00:00)
Target Version: (none)
Last Update: 2015-12-07 07:23:57 +00:00 (in Redmine)

Icinga Version: 2.4.0-1~ppa1~precise1
Backport?: Not yet backported
Include in Changelog: 1

enable api feature
do a API call using curl -k -s -u root:icinga -H 'Accept: application/json' -X GET 'https://localhost:5665/v1/hosts' | python -m json.tool

While call hangs, netstat shows port 5665 ESTABLISHED.

Debug log outputs:
[2015-11-18 11:45:40 -0500] notice/ApiListener: New HTTP client
[2015-11-18 11:45:40 -0500] debug/HttpRequest: line: GET /v1/hosts HTTP/1.1, tokens: 3


Relations:

@icinga-migration
Copy link
Author

Updated by louisgab on 2015-11-18 19:03:53 +00:00

api-users.conf:
/**
 * The APIUser objects are used for authentication against the API.
 */
object ApiUser "root" {
  password = "icinga"
  // client_cn = ""

  permissions = [ "*" ]
}

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-11-20 10:17:57 +00:00

  • Status changed from New to Feedback
  • Assigned to set to louisgab

Works for me:

root@5841dc1cdb8a:~# curl -s -k -u root:988c8f51a5979b1f https://localhost:5665/v1/hosts | python -m json.tool
{
    "error": 404, 
    "status": "The requested path 'v1/hosts' could not be found or the request method is not valid for this path."
}
root@5841dc1cdb8a:~# 

Try to attach gdb to the icinga2 process while curl hangs and post the output of "thread apply all bt full" here.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-11-25 14:12:02 +00:00

Any updates on the gdb backtrace?

@icinga-migration
Copy link
Author

Updated by louisgab on 2015-11-25 14:24:45 +00:00

The API's working in my devenv but not on my prod environment. Both are based on ubuntu precise.

I just setup a new prod environment, and API's working just fine. Must have screwed up something on the previous unit. I remember creating a api-users.conf manually as opposed as running icinga2 api setup. So I probably ended up with a messy icinga2 database which I didn't dump of course.

Please close issue and thanks for your time.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-11-26 06:49:27 +00:00

  • Relates set to 10714

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-12-07 07:23:57 +00:00

  • Status changed from Feedback to Rejected
  • Assigned to deleted louisgab

Closed because we're unable to reproduce the problem.

@icinga-migration icinga-migration added bug Something isn't working area/api REST API labels Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api REST API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant