Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #10757] Icinga-Web doesn't write to pipe #1370

Closed
icinga-migration opened this issue Dec 1, 2015 · 9 comments
Closed

[dev.icinga.com #10757] Icinga-Web doesn't write to pipe #1370

icinga-migration opened this issue Dec 1, 2015 · 9 comments
Milestone

Comments

@icinga-migration
Copy link

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

Created by Tux12Fun on 2015-12-01 13:29:25 +00:00

Assignee: mhein
Status: Resolved (closed on 2015-12-21 11:55:07 +00:00)
Target Version: 1.14
Last Update: 2016-01-13 09:46:51 +00:00 (in Redmine)

Icinga Version: 2.4.1
Icinga Web Version: 1.13.1
IDO Version: 1.14.0
OS Version: any
DB Type: UNKNOWN
DB Version: any
Browser Version: any

Hi,

my Icinga-Web is running for months, but now I'am unable to send commands.

So I tried to get every Info. Here is what I found.

root@sm01:/var/log/icinga-web# cat *
[Tue Dec  1 14:22:20 2015] [command] (Thomas) [1448976140] DEL_HOST_DOWNTIME;1
[Tue Dec  1 14:22:20 2015] [info] SendCommandAction: Prepare to send command (command=DEL_HOST_DOWNTIME)
[Tue Dec  1 14:22:20 2015] [debug] SendCommandAction: Successfull authentication (hmac=68749bd85d44cb312be601cbda543ce704d2a4ff)
[Tue Dec  1 14:22:20 2015] [info] Array
(
    [0] => Array
        (
            [downtime_id] => 1
            [instance] => default
        )

)

[Tue Dec  1 14:22:20 2015] [info] Array
(
    [0] => Array
        (
            [downtime_id] => 1
            [instance] => default
        )

)

[Tue Dec  1 14:22:20 2015] [debug] Trying to send commands, targets: [{"downtime_id":"1","instance":"default"}] , data: []  (Cronks_System_CommandSenderModel::dispatchCommands(), line 69)
[Tue Dec  1 14:22:20 2015] [debug] Setting up console for instance default  (Cronks_System_CommandSenderModel::getConsoleInstance(), line 79)
[Tue Dec  1 14:22:20 2015] [debug] Submitting command DEL_HOST_DOWNTIME to {"downtime_id":"1","instance":"default"} (Cronks_System_CommandSenderModel::dispatchCommands(), line 69)
[Tue Dec  1 14:22:20 2015] [debug] Sending icinga-command [1448976140] DEL_HOST_DOWNTIME;1 (Api_Commands_CommandDispatcherModel::submitCommand(), line 83)
[Tue Dec  1 14:22:20 2015] [debug] ["Finished submitting command"] (Cronks_System_CommandSenderModel::dispatchCommands(), line 69)

root@sm01:/var/log/icinga-web# grep pipe /etc/icinga-web/conf.d/access.xml
                        /tmp/icinga2.cmd
                        

root@sm01:/var/log/icinga-web# ls -lt /tmp/icinga2.cmd
-rwxrwxrwx 1 root root 0 Dec  1 14:20 /tmp/icinga2.cmd

root@sm01:/var/log/icinga-web# cat /tmp/icinga2.cmd
>>>> EMPTY <<<<

I created a text file at /tmp/icinga2.cmd to see if any command reaches it. But it stays empty.

Can you give me a hint to fix this?
The file is writeable for everyone.
I can't find any error.

Changesets

2015-12-21 11:49:52 +00:00 by mhein 9480252

Append EOL to command string

fixes #10757

Relations:

@icinga-migration
Copy link
Author

Updated by Tux12Fun on 2015-12-01 14:03:57 +00:00

After a clear cache Icinga-web writes to file.

But at the pipe I can see the following:

[2015-12-01 15:00:13 +0100] information/ExternalCommandListener: Executing external command: [1448978413] PROCESS_SERVICE_CHECK_RESULT;k82.xxxx.local;SAP_SMQ2_CHECK;0;SMQ2 OK 9 Entries.: |QUEUES=6 ENTRIES=9 SYSFAIL=3 READY=3 RUNNING=3;0;0
[2015-12-01 15:00:15 +0100] information/ExternalCommandListener: Executing external command: [1448978414] DEL_SVC_DOWNTIME;17[1448978415] PROCESS_SERVICE_CHECK_RESULT;k01.xxxx.local;K01__SAP_SM12_CHECK;0;SM12 OK 15 Entries.: |ENTRIES=15;0;0
[2015-12-01 15:00:15 +0100] warning/ExternalCommandListener: External command failed.Error: Can't convert '17[1448978415] PROCESS_SERVICE_CHECK_RESULT;k01.xxxx.local;K01__SAP_SM12_CHECK;0;SM12 OK 15 Entries.: |ENTRIES=15;0;0' to an integer.

        (0) libicinga.so: void boost::throw_exception >(boost::exception_detail::error_info_injector const&) (+0xe8) [0x2acf62265a08]
        (1) libicinga.so: void boost::exception_detail::throw_exception_(std::invalid_argument const&, char const*, char const*, int) (+0x69) [0x2acf62265ac9]
        (2) libicinga.so: long icinga::Convert::ToLong(icinga::String const&) (+0x2c7) [0x2acf62272927]
        (3) libicinga.so: icinga::ExternalCommandProcessor::DelSvcDowntime(double, std::vector > const&) (+0x1d) [0x2acf621f41bd]
        (4) libicinga.so: icinga::ExternalCommandProcessor::Execute(double, icinga::String const&, std::vector > const&) (+0x1ae) [0x2acf6223c26e]
        (5) libicinga.so: icinga::ExternalCommandProcessor::Execute(icinga::String const&) (+0x1d3) [0x2acf6223cc03]
        (6) libcompat.so: icinga::ExternalCommandListener::CommandPipeThread(icinga::String const&) (+0x29b) [0x2acf62adef2b]
        (7) libboost_thread.so.1.54.0:  (+0xba4a) [0x2acf5b02ca4a]
        (8) libpthread.so.0:  (+0x8182) [0x2acf5b6b1182]
        (9) libc.so.6: clone (+0x6d) [0x2acf5c88147d]

Looks like a missing \n or something?

@icinga-migration
Copy link
Author

Updated by mhein on 2015-12-01 14:07:00 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mhein

Hi,

yes I agree. I'll have a look. Thanks you.

Kind regards,

Marius

@icinga-migration
Copy link
Author

Updated by Tux12Fun on 2015-12-01 14:12:28 +00:00

I think this could be a Bug at Icinga2 because this was the last component I updated.

IcingaWeb2 is working, but if I send Commands vom IcinigaWeb1x they don't appear in Icinga2 Log as external Command.

@icinga-migration
Copy link
Author

Updated by domin on 2015-12-01 14:28:57 +00:00

I have the same issue but i think i have found a solution:

I think the reason of this behavour is that icinga 2 expects that there is an \n at the end of the command, but icinga-web uses printf to send the command which does not add a new-line character.

The corresponding icinga 2 commit: github

The corresponding code line in the icinga-web repo: github

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-15 09:41:07 +00:00

  • Tracker changed from Support to Bug
  • Subject changed from Icinga-Web doesn't wirte to pipe to Icinga-Web doesn't write to pipe
  • Icinga Version set to 2
  • Icinga Web Version set to 1
  • IDO Version set to 1
  • OS Version set to any
  • DB Type set to UNKNOWN
  • DB Version set to any
  • Browser Version set to any

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-15 09:41:21 +00:00

  • Relates set to 10841

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-15 09:41:48 +00:00

  • Relates set to 10700

@icinga-migration
Copy link
Author

Updated by mhein on 2015-12-21 11:55:07 +00:00

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

Applied in changeset 9480252.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-13 09:46:51 +00:00

  • Target Version set to 1.14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant