Strange API behavior, when creating Config Packages.

This forum was archived to /woltlab and is now in read-only mode.
  • Hi,


    I'm trying to use the REST-API of Icinga2 in order to use the Configuration Management features (Documentation).

    Distrubution name and its version

    I'm using the Vagrant-Box "icinga2x" with the following Version:

    Code
    1. $ git describe --tags
    2. v1.3.1-137-ge85495f

    Steps to reproduce or understand the questoins

    I'm using curl to generate a request to the REST-API:

    Code
    1. curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://192.168.33.5:5665/v1/config/packages/testpackage' --noproxy '*'

    I'm - however - getting this strange reply:

    Code
    1. {"error":500.0,"status":"Could not create package."}{"results":[{"code":200.0,"status":"Created package."}]}

    Debug Log Output

    Code
    1. [2017-12-15 14:09:54 +0000] information/ApiListener: New client connection from [192.168.33.1]:36536 (no client certificate)
    2. [2017-12-15 14:09:54 +0000] notice/ApiListener: New HTTP client
    3. [2017-12-15 14:09:54 +0000] debug/HttpRequest: line: POST /v1/config/packages/testpackage HTTP/1.1, tokens: 3
    4. [2017-12-15 14:09:54 +0000] notice/WorkQueue: Spawning WorkQueue threads for 'HttpServerConnection'
    5. [2017-12-15 14:09:54 +0000] information/HttpServerConnection: Request: POST /v1/config/packages/testpackage (from [192.168.33.1]:36536, user: root)
    6. [2017-12-15 14:09:54 +0000] warning/HttpResponse: Tried to set Http response status after headers had already been sent.
    7. [2017-12-15 14:09:54 +0000] debug/HttpServerConnection: Http client disconnected


    If anyone could help me troubleshoot this, i would be really glad!


    If needed I also could create an issue on GitHub


    All the best! :thumbsup:

  • It is. Sometimes I'm scrolling over threads and forget to reply to open an issue. This forum doesn't replace Github, developers are actively working over there, not here.

  • It is. Sometimes I'm scrolling over threads and forget to reply to open an issue. This forum doesn't replace Github, developers are actively working over there, not here.

    Hi!


    Thank you so much. I just wanted to make sure, that it's not me that is doing something wrong :)


    BR,

    Paraidomat

  • Vagrant boxes use the snapshot packages atm, though they are not built on each push/merge. I'll schedule a new build for CentOS 7, should be available soon.

  • Vagrant boxes use the snapshot packages atm, though they are not built on each push/merge. I'll schedule a new build for CentOS 7, should be available soon.

    That's great!


    Thank you so much! :thumbsup: