Console Log

When developing software on NetKernel, it is essential to have access to a local running NetKernel instance on which you can hot-deploy modules from your application. This gives you access to the embedded “backend fulcrum” web application (normally available on http://localhost:1060) with its various development, testing, monitoring and diagnosis tools.

It also gives you access to the NetKernel server console log, which provides a lot of information on the health and integrity of your NetKernel - based system, if you know how what to look out for and how to interpret the information.

This page collates and describes some of the most common and not-so-common examples of NetKernel console log messages and errors to help you understand what they mean and advice on how to go about fixing them.

Console Log

During its bootstrap sequence, NetKernel progressivily loads modules according to their Run Level, starting from Run Level 1 which is reserved for core system modules. By default, all application - level modules have a Run Level = 7 and are loaded together.

The normal sequence of related console log messages when starting a NetKernel instance will look something like this:

... (Ignoring startup before Run Level 7)
I 21:05:52 ModuleManager System changing to RunLevel [7]
... (ModuleManager loads each module it can find at Run Level 7)
... (eg:)
I 21:05:53 ModuleManager Loading Lang / Math v0.10.0
I 21:05:53 ModuleManager Loading Database / H2 v1.3.1
I 21:05:53 ModuleManager Loading Doc / Patterns v1.6.0
... (All modules are now loaded)
I 21:05:53 ModuleManager Commissioning Modules...
I 21:05:55 Kernel        Initialising commissioned modules...
... (Each loaded module is now commissioned)
I 21:05:59 Kernel        NetKernel Ready, accepting requests...
I 21:05:59 ModuleManager System now at RunLevel [7]
I 21:05:59 InitEndpoint  Init completed - system at RunLevel [7]
I 21:06:01 ModuleListAc~ ModuleListAccessor complete
... (NetKernel is operational)

The NetKernel ModuleManager endpoint is responsible for the co-ordination of loading and commissioning every module. If there is something wrong with a module definition, a NetKernel module - related class will report an error which will be visible in the console.log.

Look out particularly for console log messages prefixed by W (warn) or E (error).

As well as watching the system log in a realtime system console, you can also use the NetKernel Logs View page of the Backend Fulcrum (but you have to keep hitting Refresh to get an update).

Module Commissioning Errors

When you are writing or modifying a module.xml file of a Standard Module, it is really important to watch the NetKernel console log to spot any problems.

Some of the error messages related to module initialisation are fairly easy to figure out, whilst some of them do not give you much to go on.

Basic module.xml syntax error

I have a typo in one of the xml tag declaratios in a ‘module.xml’ file:


After saving the module.xml and re-building the module, NetKernel re-loads the module:

I 21:37:59 ModuleManager Changes detected in deployed modules
I 21:37:59 ModuleManager Unloading Football - Matches v1.0.0
I 21:38:00 ModuleManager Loading Football - Matches v1.0.0
I 21:38:00 ModuleManager Commissioning Modules...
I 21:38:00 Kernel        Initialising commissioned modules...
W 21:38:00 MapperOverlay Failed to create mapping [/config/endpoint[1]] in space [Football - Matches - Results (private)]: Invalid Mapper Configuration: [/config/endpoint[1]/grammar/active/identifiet] active tag must only contain tags identifier,argument,varargs, [/config/endpoint[1]/grammar/active] active tag must contain one or more identifier tags
I 21:38:01 ModuleListAc~ ModuleListAccessor complete

Here, the MapperOverlay has found and reported the error. Let’s break down the message in a bit more detail:

Substring Description
MapperOverlay The endpoint class loading a subtree of the module.xml that has found an issue. So we know the problem is somewhere within a Mapper Overlay definition.
Failed to create mapping The error message, so something has prevented the Mapper configuration from being parsed
[/config/endpoint[1]] A relative xpath expression to the location of the directly affected endpoint: the 1st <endpoint> child node of the <config> element.
in space [Football ...)] Tells us the name of the <rootspace> the erroneous endpoint declaration is in
Invalid Mapper Configuration: A more detailed error name
[/config/endpoint[1]/...,varargs Tells us that an <active> grammar tag cannot contain a identifiet element (with a more detailed xpath expression to the exact location of the incorrect tag).
[/config/endpoint[1]...tags Tells us that an <active> grammar tag must contain a identifier tag.

I correct the typo in the module.xml:


and rebuild the module:

I 22:29:06 ModuleManager Changes detected in deployed modules
I 22:29:07 ModuleManager Commissioning Modules...
I 22:29:07 Kernel        Initialising commissioned modules...
I 22:29:07 Kernel        NetKernel Ready, accepting requests...

This time, the ModuleManager is able to commission my fixed module without further problems.

Missing import

W 11:37:01 Import        Import [urn:com:ten60:netkernel:nkp2:loadbalance] in [Server / Virtual Worker  (private)] cannot be resolved

This indicates that the NetKernel instance cannot find a declaration for a space called urn:com:ten60:netkernel:nkp2:loadbalance in any of the modules loaded in the system.

In this case, I need to use the Apposite Package Manager to download and install the NKP2-LoadBalancer module into my system.

Expired NKEE License

If the NKEE license expires, the NK log will start reporting errors in a number of modules (all the EE - licensed ones as it happens). e.g. :

W 13:35:50 ModuleListAc~ Unhandled exception obtaining space meta from Enterprise HTTP Server Module  :
  <request>META &quot;&quot; in Enterprise HTTP Server Module </request>
  <id>Request Resolution Failure</id>
  <message>META &quot;&quot; in Enterprise HTTP Server Module </message>

If you look in the NK instance backend fulcrum, you will see a warning that the Enterprise license has expired. Unfortunately the console log does not report an expired license notification. There is a webhook available in the Backend Control Panel to setup to receive such warnings, but that is intended for use in a production environment.