To use Web API health diagnostic calls, you must use Redis as your caching application. Otherwise, the call always returns 200 OK (healthy). For more information, see Caching and Install Redis (Optional).
You can check the overall health status of the Web API using the health resource at the service root.
Request URL
GET <ServiceRoot>/health
For example:
GET https://<servername.domainname.com>/webapi/s3d/v1/health
Response status codes
-
200 OK - API is functional.
-
503 Unhealthy - API is not fully functional.
-
Any other response or no response (such as when a timeout occurs) - Some other non-healthy state.
Error logs
For any response status code other than 200 OK, information about the error is written to the log file:
C:\inetpub\logs\LogFiles\NLog_S3DWebApi_ErrorLog.log
The information includes the error code, computer name, site alias, and plant name of the failed instance.
Common error codes and suggested troubleshooting are listed here.
Error code |
Error name |
Description |
Suggested troubleshooting |
---|---|---|---|
-1 |
UnknownError |
Web service instance failed due to an unknown error. |
Run the test configuration feature of the configuration tool to gather more information. |
-2 |
LossOfDatabaseConnection |
Web service instance lost the connection to the database for an extended period. |
Check the status of your database server and database. |
-3 |
RabbitMqConnection |
RabbitMQ connection for the web service instance failed, resulted in errors within the service. |
Restart the RabbitMQ service. |
-4 |
CannotConnectToSite |
Web service instance cannot create a connection to the Smart 3D site database. |
Check the status of your site database. |
-5 |
CannotConnectToModel |
Web service instance cannot create a connection to the model database. |
Check the status of your model database. |
-6 |
RedisConnection |
Web service instance cannot establish a functional connection to the cache (in-memory caching or Redis). |
If using Redis, restart the service. If using in-memory cache, investigate why it is failing to save to your local cache. |
-7 |
MissingMetadata |
Web service instance is missing metadata. |
Regenerate metadata using the configuration tool. |
-9 |
InvalidParameters |
Web service instance received invalid parameters on startup. |
Check configuration and try restarting the service manager. |
-10 |
CannotConnectToConfiguration |
Web service instance cannot connect to the database for configuration information. |
Check configuration and verify that the user running the service manager has database access. |
If you still encounter issues, try testing your configuration.