|
General Tips
How to reduce the time taken to check for web server connection during server startup?
How to disable the creation of tables on starting the server.
Trouble Shooting Tips
General Tips
Is there any specific order in which the modules
of Web NMS get Started and shut down?
When the Web NMS BE and FE servers are running in separate
JVMs, they obey the rules of the Module Services in the order of starting
up and shutting down the modules specified in the respective configuration
files.
When they both run in the same JVM, during server startup the BE modules
are started first followed by the FE modules. During server shutdown,
the FE modules are shutdown first followed by the BE modules.
The startup and shut down operations obey the ordering specified in the
respective configuration files. In case, a module is specified to be plugged
in both the BE and FE servers (has an entry in both NmsProcessesBE.conf
and NmsProcessesFE.conf) then only the entry specified in the NmsProcessesBE.conf
will be taken.
Is there any document which explains the dependency
between Web NMS Modules/Processes?
Yes. The document titled "Dependency
between Web NMS Modules"
lists down the processes which are mandatory for the functioning of Web NMS
lists the processes needed by each of the services offered by Web NMS
brings out the dependency between various processes/services
lists the processes that can be enabled/disabled on need basis
Note: The terms 'Modules' and 'Processes' mean the same and are used interchangeably.
Edit startnms.bat/sh script file located in the <Web NMS Home>/bin directory and add a system property -Dwebcontainer.port="% WEBCONTAINER_PORT%" for NmsMainBE JVM instance and then start the Web NMS server.
Example:
%JAVA_HOME%\bin\java -cp %CLASS_PATH% -Dcatalina.home=%TOMCAT_HOME% -Dmysql.home=%MYSQL_HOME% -Dwebserver.port=%WEBSERVER_PORT% -Xmx100m -Dresource_check="%WEBSERVER_PORT%,%WEBCONTAINER_PORT%,%TOMCAT_SHUTDOWNPORT%" -Dwebcontainer.port="% WEBCONTAINER_PORT%" -Dwebserver.rootdir=%WEBSERVER_HOME% -Djava.rmi.server.codebase=%CODEBASE_LIST% com.adventnet.nms.startnms.NmsMainBE NMS_BE_PORT 2000 ROOT_DIR %NMS_HOME% NATIVE_PING true
[Note: All in a single line]
I want to start Web NMS based on the result of our
Business Logic. If the result of our logic is positive, we would start
the Web NMS. Otherwise, we would stop the server. In short, we want
to have a handle which would enable us to control server startup before
the initialization of the processes. Is there any utility to achieve this
requirement?
You can achieve this requirement by using the Pre-startup Hook
provided by Web NMS.
Web NMS provides an interface named 'StartupAction'. This interface
provides the prestartup hook. Using this interface, you can get the handle
of the server. During server startup, prior to the initialization of the
processes, you can internally handle starting or stopping of the server.
For getting the prestartup hook, you need to do the following:
1. Write a class implementing the interface StartUpAction
2. In that custom class, you need to overwrite the method "handleStartUp(Map
map)".
3. Make an entry in the nmsinterfaces.conf file mentioning the
name of your custom class as shown below:
StartUpAction="Your class name"
4. Inside the handleStartUp method, you can handle your own
business logic and depending upon the result, you can start or stop the
server.
To Start the server:
Return the interger value StartUpAction.CONTINUE to start
the server.
To Stop the server:
Return the interger value StartUpAction.ABORT to stop the server.
(Web NMS internally calls the handleStartUp method of your class
before initializing the processes).
5. The method handleStartUp will provide the java.Util.Map object
as an argument. This Map object contains the parameter isPrimary.
If the role of the server is primary, the value for this parameter will
be "true", else "false".
This pre-starup hook can be used in our failover mechanism as a failover
hook also. Using this hook, you can decide at runtime if your Standby
has to start or stop after the failure of the Primary.
When there are more than one NIC card, the IP address that the Web NMS should pick when starting the client. How to provide the entry in startnms.bat for this scenario.
When there are more than one NIC card, the
IP address that the Web NMS should pick when starting the client can be
provided with the "-Dnms.server.host"
parameter. An
example startnms.sh/bat entry is as follows:
%JAVA_HOME%\bin\java -cp %CLASS_PATH% -Dcatalina.home=%TOMCAT_HOME%
-Dmysql.home=%MYSQL_HOME% -Dwebserver.port=%WEBSERVER_PORT% -Xmx100m
-Dresource_check="%WEBSERVER_PORT%,%WEBCONTAINER_PORT%,%TOMCAT_SHUTDOWNPORT%"
-Dwebserver.rootdir=%WEBSERVER_HOME% -Djava.rmi.server.codebase=%CODEBASE_LIST%
-Dnms.server.host=192.168.9.14
com.adventnet.nms.startnms.NmsMainBE NMS_BE_PORT 2000 ROOT_DIR %NMS_HOME%
NATIVE_PING true
How to group devices in the Home Page of Web Client?
When writing a device-specific map filter, setting a property HTML-TABLE, creates a separate group. The property setting is shown below:
p.put("HTML-TABLE","Infrastructure View");
The
device is grouped under Infrastructure View
in the tree.
How
to modify the Alarm Graph (Bar chart) in the Home page of Web Client?
Adding the category node in <WebNMS Home>/conf/ACCCategoryInfo.xml
displays
the category as bar chart in home page. See example entry given below:
<CATEGORY Name="Public">
</CATEGORY>
The creation of tables can be disabled by setting the system property disable-schema-creation for NmsMainBE in startnms.bat as true.
-Ddisable-schema-creation=true
Troubleshooting Tips
My module does not get started
Check if the CLASSPATH variable set for the Web NMS server includes
the classpath where your implementation of RunProcessInterface is present
(the fully qualified class name given in the configuration file.)
Arguments specified for the module are not
proper
Every PROCESS entry in the NmsProcesses[BE/FE].conf
file must also have a corresponding ARGS entry. If your module does not
need to take any parameters, still you should have the ARGS entry with
a "NULL" against it (ARGS NULL). Otherwise, the configuration
file will not be parsed properly and all the entries following this mismatch
will not take effect.
Web NMS server hangs during startup
Check if your implementation of the isInitialized method indeed returns
true in finite time. The Web NMS server waits for all the module's
isInitialized methods to return true as part of its startup process.
I am getting a java.rmi.ConnectException while shutting
down Web NMS Server using the ShutDownAPI from a remote JVM. Why?
You are getting this exception since RMI Registry is also killed during
the shut down process. As a result, a ConnectException is thrown at the
end of shutdown process. This exception is harmless and can be ignored.
|