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

    SoftwareAG\ApamaWork_5.3\license\license.txt

    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:

Weight45.0
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(EngineManagementFactory.java:169)
at com.apama.engine.EngineManagementFactory.connectToEngineViaTCP(EngineManagementFactory.java:120)
at com.apama.engine.EngineManagementFactory.connectToEngine(EngineManagementFactory.java:56)
at com.apama.engine.beans.EngineClientBean.connect(EngineClientBean.java:1318)
at com.apama.engine.beans.EngineClientBean.getEngineManagement(EngineClientBean.java:285)
at com.apama.engine.beans.EngineClientBean.sendEvents(EngineClientBean.java:1808)
at com.apama.services.event.internal.EventService.sendEvent(EventService.java:414)
at com.twitter.TwitterWatch.(TwitterWatch.java:47)
at com.twitter.MyScheduler1.getData(TwitterWatch.java:129)
at com.twitter.TwitterWatch.main(TwitterWatch.java:71)
Caused by: com.apama.message.MessagingException: Connection refused: connect
at com.apama.transport.rpc.ControlConnection.transformExceptionStatic(ControlConnection.java:500)
at com.apama.transport.rpc.ControlConnection.getConnection(ControlConnection.java:1038)
at com.apama.correlator.corba.CorrelatorManagement_TCP.(CorrelatorManagement_TCP.java:253)
at com.apama.engine.EngineManagementFactory.connectToEngineViaTCP(EngineManagementFactory.java:157)
… 9 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at com.apama.transport.rpc.Connection.(Connection.java:98)
at com.apama.transport.rpc.ControlConnection.(ControlConnection.java:124)
at com.apama.transport.rpc.ControlConnection.getConnection(ControlConnection.java:1030)
… 11 more

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

Regards,
Venkat.

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.