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 #10079] Improve error message for socket errors in Livestatus #3373

Closed
icinga-migration opened this issue Sep 2, 2015 · 5 comments
Labels
area/livestatus Legacy interface bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by xtra on 2015-09-02 13:57:31 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-10-15 13:00:03 +00:00)
Target Version: 2.3.11
Last Update: 2015-10-15 13:00:03 +00:00 (in Redmine)

Icinga Version: 2.3.8
Backport?: Already backported
Include in Changelog: 1

We are running icinga2 version v2.3.8
and we have some scripts that use livestatus however
we get the error Cannot write to TCP socket when using unixcat

example:
echo 'GET hosts' | unixcat /var/run/icinga2/cmd/livestatus

in icinga2 log :
[2015-09-02 15:49:33 +0200] critical/LivestatusQuery: Cannot write to TCP socket.

Changesets

2015-10-15 12:58:21 +00:00 by mfriedrich 8ebf087

Improve error message for socket errors in Livestatus

fixes #10079

2015-10-15 12:58:50 +00:00 by mfriedrich 29bc5cb

Improve error message for socket errors in Livestatus

fixes #10079
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-03 08:58:44 +00:00

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

Your echo call misses at least a line ending terminator. Please verify that your command looks the same as described in the documentation:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/alternative-frontends#livestatus-get-queries

@icinga-migration
Copy link
Author

Updated by dcarp on 2015-09-16 13:32:53 +00:00

Initially I had the same problem, but after dnsmichi's suggestion I found out that this works:

echo -en 'GET hosts\n\n' | nc -U /var/run/icinga2/cmd/livestatus

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-15 12:58:17 +00:00

  • Subject changed from LivestatusQuery gives Cannot write to TCP socket to Improve error message for socket errors in Livestatus
  • Status changed from Feedback to Assigned
  • Assigned to changed from xtra to mfriedrich
  • Target Version set to 2.4.0

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-15 12:59:08 +00:00

  • Target Version changed from 2.4.0 to 2.3.11
  • Backport? changed from TBD to Yes

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-10-15 13:00:03 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 8ebf087.

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

No branches or pull requests

1 participant