Skip to main content
Karl Heinz  Kremer
Community Expert
Community Expert
January 28, 2021
Answered

InDesign Server: Adminport and Heartbeat - How Does It Work?

  • January 28, 2021
  • 1 reply
  • 2511 views

Hi my fellow ID server developers, 

I am trying to find information about the -heartbeatupdateinterval and -adminport parameters. The parameters are documented, but not now to acutally use the admin port. I found a couple of unanswered questions here in the forum, and there is an AIR application that seems to monitor the heartbeat, but I don't have an AIR development system. I've tried to telnet into the port to see if anything comes back at the specified interval, but I don't see any information on that port. 

I am using the Windows version of ID Server.

 

Any information you can provide is appreciated.

 

Thanks, 

 

Karl Heinz 

This topic has been closed for replies.
Correct answer Alo Lohrii

@Rishabh_Tiwari can you help us out on this one as well. With LBQ no longer shipped, can we get some information on how to access these admin features of InDesign Server from an application like a C++ or JAVA application.

-Manan


InDesignServer has some administrative features like "ping"(status) and "kill"(terminate instances), useful to check whether IDS is hung or is actually busy processing a job. In order to use these administrative features, you need to specify a mandatory "-adminport" parameters when starting IDS, the other two optional parameters are "-host" and "-heartbeatUpdateInterval".

Say for example you want to monitor the health of your running IDS instances, the parameter "-heatbeatinterval" is used to specify the time interval IDS keep a record of the last activity timestamp, it's an optional parameter as it defaults to 20 seconds

Example

 

 

InDesignServer -port 12345 -adminport 3002 -heartbeatUpdateInterval 5

 

 

 

To perform administrative tasks, create a socket and send a message, either "ping" or "kill"

Example

 

 

import socket

HOST = "localhost"  # server's hostname or IP address
ADMINPORT = 3002  # admin port number of the running IDS instance

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect((HOST, ADMINPORT))
    s.sendall(b"ping")
    data = s.recv(1024)

print(f"Last activity timestamp : {data!r}")

 

 

Messaged receieved example : 

 

 

Last activity timestamp : b'2024-01-11 10:27:36'

 

 

1 reply

Srishti Bali
Community Manager
Community Manager
January 29, 2021

Hi there,

 

Thanks for reaching out. I am not sure if we get your query completely. If you are looking for some info about the adminport and heartbeat usage as command line arguments, here are the details:

  • ‘‐adminport’ or ‘/adminport’: This is the port number at which console opens a server socket & listens for administrative requests like kill, ping etc. It’s a mandatory argument if ping IDS feature needs to be used.
  • ‘‐host’ or ‘/host’: This is the host name or IP address of system where IDS is launched. If not specified, then we try to get host address programmatically.
  • ‘‐heartbeatupdateinterval’ or ‘/heartbeatupdateinterval’: This is the interval at which IDS application updates IDS console application with last activity timestamp. It is an optional parameter & it has a default value of 20 seconds.

Following are exposed as read only properties

  • adminPort: Admin port number. It is ‐1 if no admin port is specified.
  • hostname: host name of IP address of the system where IDS is running.
  • heartbeatUpdateInterval: This is the interval at which IDS application updates IDS console application with last active timestamp.

 

Regards,

Srishti

Karl Heinz  Kremer
Community Expert
Community Expert
January 29, 2021

Srishti,

 

thanks for your reply. What you quoted is the information I already have from the InDesign server documentation and the JavaScript documentation. Maybe the missing piece is that I don't know what the IDS console is. How do I monitor the health of multiple instances of InDesign Server? 

I was hoping to write e.g. a Python program to do that, but I am not getting any information from the admin port. 

Thanks,

Karl Heinz

Karl Heinz  Kremer
Community Expert
Community Expert
February 5, 2021

@Srishti Bali - Are you still monitoring this question? Please see my comments in my last reply. Is there any other information you can provide to help me with my task. As I mentioned in my original question, the SDK has source code for an AIR application, but with the EOL of Flash, it would be more useful to have this as e.g. a Java or C++ tool. I have not had access to a Flex development environment in probably ten years, so compiling and running this application is not an option for me. I am looking for an alternative. 

 

Thanks.