Identifying Server Addresses

An important step in embedding a Corda® image is to tell the Corda Embedder where Corda Server™ is located. This typically involves specifying the address using special Corda Embedder attributes (externalServerAddress and internalCommPortAddress).

Thus, determining server addresses is a very important step in using Corda Server. To better understand the appropriate addresses for Corda Server, review the two types of addresses used with Corda Embedder.

Server Address

In order for Web clients to request images from Corda Server, they must contact the Corda Server over its server address. Web clients always access Corda Server over its server port, which by default is 2001. This means that in typical development environments, where the Corda Server is running locally, the server address is http://localhost:2001 (or, in the case of some systems, http://127.0.0.1:2001 .

This address, of course, is always going to depend on the way Corda Server has been configured. If Corda Server is running on a different machine, or if its port has been changed, the server address is different. When using the Corda Redirector, clustering, or the Corda Server Servlet, the server address also may be different.

The following table indicates what the server address may be under various circumstances. For situations where Corda Server is not running locally, replace <server_address> or <ip address> with the external host name, or IP address, of the server where Corda Server is actually running.

Situation

Server Address

Normal

http://<server_address>:2001

Server port changed to 4001

http://localhost:4001

Server running on non-local machine

http://<server_address>:2001

Server running on non-local machine (IP address)

http://<ip address>:2001

Corda Redirector

http://<server_address>/ctRedirector

Corda Redirector (Windows* IIS)

http://<server_address>/scripts/ctredirector.dll

Corda Server Servlet

http://<server_address>/corda

 

Comm Port Address

The comm port address is the address that the Corda Embedder uses to access the Corda Server. The Corda Embedder always accesses the Corda Server over its comm port, which by default is 2002.

The address part of the comm port (minus the port) address is often the same as the address for the server address. The only difference is the port used—2002 instead of 2001. This means that in typical development environments, where the Corda Server is running locally, the comm port address is always http://localhost:2002 (or, in the case of some systems, http://127.0.0.1:2002 .

This address, of course, is always going to depend on the way Corda Server has been configured. If Corda Server is running on a different machine, or if its comm port has been changed, the comm port address is different. When using clustering or the Corda Server Servlet, the comm port address also may be different.

The following table indicates what the server address may be under various circumstances. For situations where Corda Server is not running locally, replace <server_address> or <ip address> with the external host name, or IP address, of the server where Corda Server is actually running.

Situation

Server Address

Normal

http://localhost:2002

Comm port changed to 4002

http://localhost:4002

Server running on non-local machine

http://<server_address>:2002

Server running on non-local machine (IP address)

http://<ip address>:2002

Corda Redirector

http://<server_address>:20021

Corda Server Servlet

http://<server_address>/corda

1. The Corda Embedder cannot talk to the Corda Server through the Corda Redirector. It must talk directly with the Corda Server, therefore redirection does not change the comm port address.