Connection Refused

The error:

Instead of getting the wait-screen, the client window disappears. In the output of the client there is a line similar to this:

[java] FATAL JMSAgentClientThread - Creating Connection With the Server Failed:javax.jms.JMSException: Could not connect to broker URL: 
tcp://localhost:8081?wireFormat.maxInactivityDuration=0. Reason: java.net.ConnectException: Connection refused
The error explained:

What the client is saying is that it tried to reach the server at a certain address ('tcp://localhost'), on a certain port (8081), but failed, because the connection was refused.

The cause:
The solution: