License File Not Specified & com.apama.EngineException: Failed to connect to engine..

Hi All,

Hope everyone is doing well.

I am running a java application which is internally pushing some message to Apama. I am facing two issues as below

  1. License File Not Specified : Though I have copied a valid license file under the Apama work folder as below


    but still I am getting an error like License File not specified , Correlator will run for 30mins and accept only
    local clients…

  2. Second error is something like below:

WARN : EngineClientBean failed to create EngineManagement interface: Failed to connect to engine; root exception is: Connection refused: connect
ERROR : Event sending failed:
com.apama.EngineException: Failed to connect to engine; root exception is: Connection refused: connect
at com.apama.engine.EngineManagementFactory.connectToEngineViaTCP(
at com.apama.engine.EngineManagementFactory.connectToEngineViaTCP(
at com.apama.engine.EngineManagementFactory.connectToEngine(
at com.apama.engine.beans.EngineClientBean.connect(
at com.apama.engine.beans.EngineClientBean.getEngineManagement(
at com.apama.engine.beans.EngineClientBean.sendEvents(
at com.twitter.TwitterWatch.(
at com.twitter.MyScheduler1.getData(
at com.twitter.TwitterWatch.main(
Caused by: com.apama.message.MessagingException: Connection refused: connect
at com.apama.transport.rpc.ControlConnection.transformExceptionStatic(
at com.apama.transport.rpc.ControlConnection.getConnection(
at com.apama.correlator.corba.CorrelatorManagement_TCP.(
at com.apama.engine.EngineManagementFactory.connectToEngineViaTCP(
… 9 more
Caused by: Connection refused: connect
at Method)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at com.apama.transport.rpc.Connection.(
at com.apama.transport.rpc.ControlConnection.(
at com.apama.transport.rpc.ControlConnection.getConnection(
… 11 more

Please help me to get rid of this error at the earliest.


In 5.3 it’s necessary to explicitly pass the location of the license file to the correlator when starting it (using the --license option; from designer see the option in Apama section of preferences)

This probably also explains the second problem you’re seeing, as without a license you would not be able to connect to the correlator from a different machine. If that doesn’t help, then you should check the host/port information you’re using for your client matches the correlator’s and that there is no firewall interfering. The “Connection refused” error you’re getting is from the OS sockets layer and simply means there is nothing to connect to on the specific host and port.