(Click to open topic with navigation)
This topic details some common problems and general solutions for Nitro Web Services.
In this topic:
Logs are located in /opt/nitro-web-services/logs/*.log.
Logging is set to INFO (just below DEBUG) by default. Each service has it's own log_level setting. See /opt/nitro-web-services/etc/*.cfg for details.
If you change the log_level, you must restart the respective service.
Try running the service from the command line.
The following procedure is an example of debugging the nitro-web-services service.
[root]# service nitro-web-services stop
[root]# nitro-web-services
Exercise the service from a client/UI.
Check for stacktraces in STDOUT/STDERR.
5.5.3 Viewpoint does not show job status updates
If you are not getting job status updates after launching your Nitro job, it is likely to be an inter-node communication problem (reachability, firewall, etc.) or an authentication/authorization issue (incorrect username/password).
This section provides a diagram and depicted steps to diagnose the problem. The order in which you follow these steps isn't significant, but is recommended.
Use the following diagram as a reference to the steps that follow.
Your installation may differ from what is depicted, but the flow is the same regardless where you have chosen to install Adaptive components. Steps 1 - 9 illustrate Nitro job submission from Viewpoint. "A" and "A prime" represent Viewpoint polling Nitro job status from Nitro Web Services following job submission.
Click to enlarge |
Use the following steps to diagnose the problem. The order in which you follow these steps isn't required, but is recommended.
Job status updates are published to the ZMQ message bus by the Nitro Coordinator (node1, step 7 in the diagram). Each node (node1, node2, ..., node(N)) can play the role of the Nitro coordinator, therefore, each node must define the "nws-connector-address" in their respective Nitro configuration file (/opt/nitro/etc/nitro.cfg).
Next steps:
Modify the /opt/nitro/etc/nitro.cfg as needed.
If you are using a shared file system, you will only have to make the modification once; otherwise, make the update on each compute node.
<nitro-web-services-hostname> must be reachable from each Nitro coordinator and the designated ZMQ port (47100) must match the "msg_port" defined in /opt/nitro-web-services/etc/zmq_job_status_adapter.cfg (defaults to 47100 when not explicitly defined).
...
# Viewpoint connection allows Nitro to communicate job status information
# to viewpoint. This option indicates name and port of the remote server
# in the form: <host>:<port>
nws-connector-address <nitro-web-services-hostname>:47100
...
Next steps:
If your system uses firewalls, verify the necessary ports are open. See 1.1.1 Open Necessary Ports for more information.
You may also be able to use telnet, netstat, etc. to check if <nitro-web-services-hostname> is reachable and the configured ZMQ port is open.
Check the ZMQ Job Status Adapter log for information. Check "log_level" in /opt/nitro-web-services/etc/zmq_job_status_adapter.cfg on the Nitro Web Services host (for example, the Moab Head Node). When "log_level" is not defined, the default is "INFO". The only log level more verbose is "DEBUG". Restart the zmq-job-status-adapter service if you change any configuration options.
Tail the the ZMQ Job Status Adapter log (/opt/nitro-web-services/logs/zmq_job_status_adapter.log) while running a Nitro job.
[Moab Head Node]# tail -f /opt/nitro-web-services/logs/zmq_job_status_adapter.log
Next steps:
The following are the ZMQ Job Status Adapter configuration settings (/opt/nitro-web-services/etc/zmq_job_status_adapter.cfg).
After initial installation, the defaults are depicted as comments in the configuration file.
# DNS/IP and port where REST API (i.e. Nitro Web Services) is hosted #http_protocol = https #rest_api_host = localhost #rest_api_port = 9443 #username = nitro-writeonly-user #password = ChangeMe4!
Try authenticating to Nitro Web Services from the ZMQ Job Status Adapter host (Moab Head Node).
[root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-writeonly-user", "password": "ChangeMe4!"}' \ https://localhost:9443/auth
Next steps:
If you get an HTTP status code of 401, the configured "username" (nitro-writeonly-user) is unable to authenticate.
Do the following:
If you still don't get an HTTP status code of 200, try resetting the nitro-writeonly-user's password in MongoDB.
# Any user can update its own password. # The nitro-admin user can update any user's password. # Obtain a nitro-key (session token) by authenticating as either the nitro-admin or the nitro-writeonly-user # Option 1: nitro-admin [root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-admin", "password": "ChangeMe2!"}' https://localhost:9443/auth # Option 2: nitro-writeonly-user [root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-writeonly-user", "password": "ChangeMe4!"}' https://localhost:9443/auth # Example nitro-admin authentication response: > {"status": 200, "data": {"nitro-key": "3e0fb95e9a0e44ae91daef4deb500dcc67a3714880e851d781512a49", "user": {"username": "nitro-admin", "last_updated": "2016-08-19 16:46:17.395000", "name": "Nitro Admin", "created": "2016-08-19 16:46:17.395000", "auth": {"job": ["read", "write", "delete"], "user": ["read", "write", "delete"]}}}} # Use the nitro-key from the authentication response to change nitro-writeonly-user's password [root@MoabHeadNode]# curl --insecure -X PUT --header "nitro-key: 3e0fb95e9a0e44ae91daef4deb500dcc67a3714880e851d781512a49" --data '{"password": "Astr0ngPa$$!"}' https://localhost:9443/user/nitro-writeonly-user
Check if Viewpoint can authenticate to Nitro Web Services. Follow the instructions in the 1.1.4 Configure Viewpoint for Nitro Web Services.
If the TEST button indicates failure, then try the following curl command from the Nitro Web Services host, using the 'ws_readonly_username' and 'ws_readonly_password' defined in /opt/nitro-web-services/etc/nitro.cfg.
[root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-readonly-user", "password": "ChangeMe3!"}' \ https://localhost:9443/auth
Next steps:
If you get an HTTP status code of 401, in Viewpoint, the configured "username" (i.e. nitro-readonly-user) is unable to authenticate.
Do the following:
If you still don't get an HTTP status code of 200, try resetting the nitro-readonly-user's password in MongoDB.
# Any user can update his/her/it's own password. # The nitro-admin user can update any user's password. # Obtain a nitro-key (session token) by authenticating as either the nitro-admin or the nitro-readonly-user # Option 1: nitro-admin [root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-admin", "password": "ChangeMe2!"}' https://localhost:9443/auth # Option 2: nitro-readonly-user [root@MoabHeadNode]# curl --insecure --data '{"username": "nitro-readonly-user", "password": "ChangeMe4!"}' https://localhost:9443/auth # Example nitro-admin authentication response: > {"status": 200, "data": {"nitro-key": "3e0fb95e9a0e44ae91daef4deb500dcc67a3714880e851d781512a49", "user": {"username": "nitro-admin", "last_updated": "2016-08-19 16:46:17.395000", "name": "Nitro Admin", "created": "2016-08-19 16:46:17.395000", "auth": {"job": ["read", "write", "delete"], "user": ["read", "write", "delete"]}}}} # Use the nitro-key from the authentication response to change nitro-readonly-user's password [root@MoabHeadNode]# curl --insecure -X PUT --header "nitro-key: 3e0fb95e9a0e44ae91daef4deb500dcc67a3714880e851d781512a49" --data '{"password": "Astr0ngPa$$!"}' https://localhost:9443/user/nitro-readonly-user