19 ноября 2010 г. 17:27 пользователь nap <napar...@gmail.com> написал:

> 2010/11/19 QuickeneR <q...@tut.by>
>
>> 19 ноября 2010 г. 16:48 пользователь nap <napar...@gmail.com> написал:
>>
>>> 2010/11/19 QuickeneR <q...@tut.by>
>>>
>>> Indeed, this helps, the next error the broker gives is
>>>>
>>> ...
>>>> I open for append the log file c:/shinken/var/shinken.log
>>>> ...
>>>> I am simple log Broker
>>>> Process Process-1:
>>>>
>>>> Traceback (most recent call last):
>>>> File "E:\Python27\lib\multiprocessing\process.py", line 232, in
>>>> _bootstrap
>>>> self.run()
>>>> File "E:\Python27\lib\multiprocessing\process.py", line 88, in run
>>>> self._target(*self._args, **self._kwargs)
>>>> File "c:\shinken\shinken\modules\simplelog_broker.py", line 182, in main
>>>> self.manage_brok(b)
>>>> File "c:\shinken\shinken\modules\simplelog_broker.py", line 145, in
>>>> manage_bro
>>>> k
>>>> f(b)
>>>> File "c:\shinken\shinken\modules\simplelog_broker.py", line 151, in
>>>> manage_log
>>>> _brok
>>>> self.file.write(data['log'].encode('UTF-8'))
>>>> ValueError: I/O operation on closed file
>>>>
>>> Hum... The close is only in the quit() method if I remember right. I'll
>>> try it.
>>>
>>>
>>>>  Got a new conf
>>>> Error : the external module Simple-log-Autogenerated goes down
>>>> unexpectly!
>>>>
>>>> Traceback (most recent call last):
>>>> File "E:\Python27\lib\multiprocessing\queues.py", line 238, in _feed
>>>> send(obj)
>>>> IOError: [Errno 232]
>>>>
>>>> Now I'm stuck. The file is opened, as the diagnostic message in the
>>>> console verifies, but then it seems to be closed. Maybe it has something to
>>>> do with the multi-process architecture, like file handle not being 
>>>> available
>>>> in a child process
>>>>
>>> In fact the log module is a whole process, and its his reponsability to
>>> open/close the file. The main broker process open/close nothing else than
>>> modules that do the job. You don't have anyother message like "I close the
>>> file"  or something like this?
>>>
>>
>> Nope. I skipped some earlier messages, but these are the last that the
>> broker produces.
>>
>>>
>>>
>>>> By the way, here is a script I use to get this info, as the services
>>>> give away nothing ))
>>>>
>>>> start "arbiter" python c:\shinken\bin\shinken-arbiter.py -c
>>>> c:\shinken\etc\nagios-windows.cfg
>>>> start "poller" python c:\shinken\bin\shinken-poller.py -c
>>>> c:\shinken\etc\pollerd-windows.ini
>>>> start "reactionner" python c:\shinken\bin\shinken-reactionner.py -c
>>>> c:\shinken\etc\reactionnerd-windows.ini
>>>> start "scheduler" python c:\shinken\bin\shinken-scheduler.py -c
>>>> c:\shinken\etc\schedulerd-windows.ini
>>>> start "broker" python c:\shinken\bin\shinken-broker.py -c
>>>> c:\shinken\etc\brokerd-windows.ini
>>>>
>>>
>>> Thanks :)
>>>
>>> But the services are not good? (the broker should failed, but for the
>>> others?)
>>>
>>
>> Other processes give lots of output that does not look like errors.
>> Whether they can actually monitor anything, I still have to try. I wanted to
>> get the log file first, so I can run shinken as services instead of 5
>> console windows.
>>
>> I just reproduce it, and solve it. In fact you were right : it was a
> process child problem! The open() was in the init() function, but it's
> something that is call in the main process, then it make the fork() on the
> main. So the main do not have the filedescriptor under windows (on Linux it
> was ok so I miss it).
>
> So a big thanks for this bug report :)
> The code is commited, you can test :)
>
Well, sorry to inform you but it does not work ))) Only the scheduler runs,
all the other processes fail to find pyro. Looks like adding shinken to
sys.path was still necessary, since the scheduler does not have that "if
os.name != 'nt'" condition and it runs.

Shinken require the Python Pyro module. Please install it.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to