Home Help Center

Event Viewer

JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
Hi all. My registry and nodes are install how windows services.

In Event Viewer can i found exception, which in StdErr(node) is current: !! unable load dll .... ?This exception in StdErr begin with !! . In event log which Type message is correspond this sign !!?

I can found in Event viewer only message: Node up, node down, replica master... and etc.( this message in StdErr begin with --, -! - exception,warning)

but in event viewer maybe message about: failed load server or not load dll?

Please Help!

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Victor,

    When you install icegridregistry/icegridnode as a Windows service, all logs go to the Windows event log (the Application log by default).

    Error messages (prefixed with !! when using the stderr logger) are reported as errors, warnings messages (!-) are reported as warnings and trace messages (--) as informational messages.

    Best regards,
    Bernard
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Thank you very much for your response!

    But, I m not found this event(see below) in Event Viewer (but in windows registry:Types Supported-(7) - EVENTLOG_ERROR_TYPE EVENTLOG_WARNING_TYPE EVENTLOG_INFORMATION_TYPE):
    Why?
    !! 09.12.2014 11:03:57:000 FrontendServer1: error: IceBox.FailureException
           reason = "ServiceManager: unable to load service '..\..\..\Projects\Frontend\bin\Debug\Aigrind.Warspear2.Server.Frontend.dll:Aigrind.Warspear2.Serveer.Frontend.IceBoxService': GetType failed for 'Aigrind.Warspear2.Serveer.Frontend.IceBoxService'"
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 795
          at IceBox.ServiceManagerI.run() in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 390
       Caused by: System.TypeLoadException: Could not load type 'Aigrind.Warspear2.Serveer.Frontend.IceBoxService' from assembly 'Aigrind.Warspear2.Server.Frontend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
          at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
          at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 543
    
    
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    -! 12/09/14 12:54:14.239 NodeFrontend: warning: couldn't reach the IceGrid registry (this is expected if it's down, otherwise please check the value of the Ice.Default.Locator property):
       Network.cpp:2513: Ice::ConnectionRefusedException:
       connection refused: The remote computer refused the network connection.
    -- 12/09/14 12:54:14.240 NodeFrontend: Replica: trying to establish session with replica `Master'
    -- 12/09/14 12:54:15.272 NodeFrontend: Replica: established session with replica `Master'
    warning: bzip2.dll could not be loaded (likely due to 32/64-bit mismatch). Make sure the directory containing the 64-bit bzip2.dll is in your PATH.
    
    

    this events i can found in Event Viewer

    but this event im not found
    !! 09.12.2014 13:04:22:816 FrontendServer1: error: IceBox.FailureException
           reason = "ServiceManager: unable to load service '..\..\..\Projects\Frontend\bin\Debug\Aigrind.Warspear2.Server.Frontend.dll:Aigrind.Warspear2.Serveer.Frontend.IceBoxService': GetType failed for 'Aigrind.Warspear2.Serveer.Frontend.IceBoxService'"
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 795
          at IceBox.ServiceManagerI.run() in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 390
       Caused by: System.TypeLoadException: Could not load type 'Aigrind.Warspear2.Serveer.Frontend.IceBoxService' from assembly 'Aigrind.Warspear2.Server.Frontend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
          at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
          at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Users\jose\Desktop\RC3\build-x86-VC100-release\Ice-3.5.1-src\cs\src\IceBox\ServiceManagerI.cs:line 543
    
    
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Why I can not found this event, its especial? Please Help.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Victor,

    Only the IceGrid node logging goes to the Windows event log. The logging from servers started by the IceGrid node still goes to stderr which goes nowhere if the IceGrid node is started as a service.

    To access the output of the servers you should configure the IceGrid.Node.Output property. With this property, servers started by the IceGrid node will redirect their stderr/stdout to files.

    Cheers,
    Benoit.
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Thank you very much for your response! I m understand that no way get info about server error in Event Viewer,only events about nodes. Is it?
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    My target is next: All log messages are write in EventLog.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, there's currently no easy or built-in way to log the output the servers started by an IceGrid node to the Windows event log. However, since you're using C#, you could add a configuration to redirect the C# tracing to the event log (Ice uses System.Diagnostics.Trace by default for logging its messages). This can be done either programmatically or using a .NET application configuration file.

    See this link on Microsoft web site for additional information on this.

    Cheers,
    Benoit.
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Please show me example, Which file configuration? file config of ice box? file config of services?

    I think i m need in file config ice box, is it?
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    .NET Logger
    The default logger in Ice for .NET writes its messages using the System.Diagnostics.Trace facility. By default, the Ice run time registers a ConsoleTraceListener that writes to stderr. You can disable the logging of messages via this trace listener by setting the property Ice.ConsoleListener to zero.

    You can change the trace listener for your application via the application's configuration file.

    In IceBox is config file. Im need in events such as:
    !! 09.12.2014 13:04:22:816 FrontendServer1: error: IceBox.FailureException
           reason = "ServiceManager: unable to load service '..\..\..\Projects\Frontend\bin\Debug\Aigrind.Warspear2.Server.Frontend.dll:Aigrind.Warspear2.Serveer.Frontend.IceBoxService': GetType failed for 'Aigrind.Warspear2.Serveer.Frontend.IceBoxService'"...
    

    Thus i could change config of Ice Box?
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Ice Box write this message(see above). Is it? How make that this message was write in Event Log ?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    As explained earlier, there's currently no easy way to do this. The easiest is to redirect server tracing to files using the IceGrid.Node.Output property (to be set in the IceGrid node configuration file).

    With .NET, it's possible to also redirect the tracing to the event log but this requires either some additional coding or a .NET application configuration file (iceboxnet.exe.config for iceboxnet.exe). It also requires that you create the event source (this requires administrative privileges). This is really nothing specific to Ice so this goes a bit beyond the free support we can provide here on the forums. The setup of event log trace listener is explained on the link I provided in my previous post (EventLogTraceListener Class (System.Diagnostics)).

    So you could for instance add the following code to your IceBox service start method:
            bool found = false;
            foreach(TraceListener listener in Trace.Listeners) {
                found |= listener is EventLogTraceListener;
            }
            if(!found) {
                //
                // Install the event log trace listener with the source name "IceBox" if no 
                // other service did it already.
                //
                Trace.Listeners.Add(new EventLogTraceListener("IceBox"));
            }
    

    You will then need to make sure the "IceBox" event source exists. This can be done by creating a sample event with the correct source name ("IceBox" in the example above). You can execute the following command with a command prompt that has administrative privileges to create the event source:
    C:\Windows\system32>eventcreate /SO IceBox /T INFORMATION /ID 1 /L Application /D  "Creating source"
    

    For more information on this, please see Introduction to the EventLog Component from Microsoft web site.

    Cheers,
    Benoit
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Thank you very much!!! I am understand and can create event log for icebox=) .
    The last question:
    Inside this key we must add a value specifies the location of the Ice run time DLL:
    /v EventMessageFile /t REG_EXPAND_SZ /d C:\Ice\bin\ice34.dll - this for Ice patch2
    /v EventMessageFile /t REG_EXPAND_SZ /d C:\Ice\bin\ice35.dll - this for services(Icegridregistry, icegridnode)

    Which dll is for Ice box?
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    in event log this message is going with level: "Information"
    !! 12.12.2014 13:07:56:772 FrontendServer1: error: IceBox.FailureException
           reason = "ServiceManager: unable to load service 'C:\Users\Administrator\Documents\Projects\server\Test\GridConfigurations\LocationChannel\1.dll:LocationService': unable to load assembly: C:\Users\Administrator\Documents\Projects\server\Test\GridConfigurations\LocationChannel\1.dll"
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args)
          at IceBox.ServiceManagerI.run()
       Caused by: System.IO.FileLoadException: Could not load file or assembly 'C:\\Users\\Administrator\\Documents\\Projects\\server\\Test\\GridConfigurations\\LocationChannel\\1.dll' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
          at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args)
    

    Can I change level this message?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    The Ice .NET assembly or executables don't include a event message file so the easiest is to just use the message file from the C++ Ice DLL.

    The Ice logger only traces "Information" messages. You will need to implement your own Ice C# logger if you want to trace errors/warnings with another level in the event log. See Custom Loggers - Ice 3.5 - ZeroC for more information on custom loggers. I'll add an item to our TODO list to improve this, it would indeed be better to trace errors/warnings with the correct level.

    Cheers,
    Benoit.
  • JinnJinn Member Victor LebedevOrganization: BFUProject: monitoring server ✭✭
    Thank you very much for your response!

    Cheers,
    Jinn.
Sign In or Register to comment.