0
votes

I'm having a problem while trying to deploy an adapter to Worklight Console.

I figured out that the adapter which is reading the worklight.properties file does not get deployed. But an adapter that does not read the worklight.properties file is able to deploy without any problem.

I looked at the WAS log and its seems that the unsuccessful adapter deployment was actually deployed, but then they got rollbacked (undeployed) immediately.

Using Worklight 5.0.6.1 with latest iFix.

Edit:

  1. Verified that both server and studio are using the same worklight version
  2. The same configuration working fine in the UAT environmenet; problem happens only in the Production environment.

The Adapter XML:

<displayName>ConfigFileAdapter</displayName>
<description>ConfigFileAdapter</description>
<connectivity>
    <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
        <protocol>${adapter.config.protocol}</protocol>
        <domain>${adapter.config.domain}</domain>
        <port>${adapter.config.port}</port> 
        <!-- Following properties used by adapter's key manager for choosing specific certificate from key store  
        <sslCertificateAlias></sslCertificateAlias> 
        <sslCertificatePassword></sslCertificatePassword>
        -->     
    </connectionPolicy>
    <loadConstraints maxConcurrentConnectionsPerNode="30" />
</connectivity>

<procedure name="getConfigData"  securityTest="adapterProtectionTest" requestTimeoutInSeconds="10" />


<procedure name="getLoggingLevel"  securityTest="adapterProtectionTest" requestTimeoutInSeconds="10" />
</wl:adapter>

Logs captured in SystemOut.log:

com.worklight.integration.services.impl.DeployServiceImpl syncAdaptersFromDB FWLSE0084I: Deployed adapter 'xxx' successfully. com.worklight.integration.services.impl.DeployServiceImpl deleteAdapterInternal FWLSE0039I: Deleted adapter 'xxx' successfully.

From the log the adapter were deleted immediate after deployed.

1
Adapters do not read the worklight.properties directly. It is the worklight .war that uses the worklight.properties file. Can you post the error you see in the WAS log file when you try to deploy the adapter.Srik
Please add your adapter XML as well as authenticationConfig.xml; this may be a securityTest mismatch.Idan Adar
Please also add any errors you get in the Worklight Console as well as log files. As well as clarify what you mean by "reading worklight.properties". Are you using custom properties?Idan Adar
Please also verify that both the server and studio are using the SAME version (exact same build).Idan Adar
yes just checked that both server and studio are using the same worklight version.deadcode

1 Answers

0
votes

Make sure that the .war file you have deployed to the Production environment contains a worklight.properties file that contains these adapter.config.protocol/host/port properties.

In my testing the only time I could not deploy an adapter that uses custom properties from worklight.properties was when these properties did not exist in worklight.properties. When this happened I saw this error: Failed to deploy adapter 'test.adapter'. Could not resolve placeholder 'test.idan'