Unexpected end of file when using new CDB

using Cdb cdbReadSocket = new Cdb ( “MyReadCdbSocket”,
new Socket ( “10.203.10.146” ,2022) );

Causes the exception -
2017-01-10 13:20:07,488 ERROR - unexpected end of file
com.tailf.conf.ConfException: unexpected end of file
at com.tailf.conf.ConfInternal.readFill(ConfInternal.java:415)
at com.tailf.conf.ConfInternal.termRead(ConfInternal.java:196)
at com.tailf.conf.ConfInternal.termRead(ConfInternal.java:113)
at com.tailf.maapi.MaapiSchemas$TermList.read(MaapiSchemas.java:183)
at com.tailf.maapi.MaapiSchemas.loadHashDB(MaapiSchemas.java:669)
at com.tailf.maapi.MaapiSchemas.init(MaapiSchemas.java:647)
at com.tailf.maapi.Maapi.loadSchemas(Maapi.java:6126)
at com.tailf.maapi.Maapi.loadSchemas(Maapi.java:6097)
at com.tailf.maapi.Maapi.(Maapi.java:234)
at com.tailf.conf.ConfInternal.checkMaapi(ConfInternal.java:1624)
at com.tailf.conf.ConfInternal.doConnect(ConfInternal.java:1394)
at com.tailf.cdb.Cdb.(Cdb.java:254)
at com.mitel.cms.OSSSnmpManager.main(OSSSnmpManager.java:113)
Caused by: java.io.EOFException
… 13 more
2017-01-10 13:20:07,488 WARN - Could not perform initial Maapi.loadschemas()
com.tailf.maapi.MaapiException: unexpected end of file
at com.tailf.maapi.MaapiSchemas.loadHashDB(MaapiSchemas.java:718)
at com.tailf.maapi.MaapiSchemas.init(MaapiSchemas.java:647)
at com.tailf.maapi.Maapi.loadSchemas(Maapi.java:6126)
at com.tailf.maapi.Maapi.loadSchemas(Maapi.java:6097)
at com.tailf.maapi.Maapi.(Maapi.java:234)
at com.tailf.conf.ConfInternal.checkMaapi(ConfInternal.java:1624)
at com.tailf.conf.ConfInternal.doConnect(ConfInternal.java:1394)
at com.tailf.cdb.Cdb.(Cdb.java:254)
at com.mitel.cms.OSSSnmpManager.main(OSSSnmpManager.java:113)
Caused by: com.tailf.conf.ConfException: unexpected end of file
at com.tailf.conf.ConfInternal.readFill(ConfInternal.java:415)
at com.tailf.conf.ConfInternal.termRead(ConfInternal.java:196)
at com.tailf.conf.ConfInternal.termRead(ConfInternal.java:113)
at com.tailf.maapi.MaapiSchemas$TermList.read(MaapiSchemas.java:183)
at com.tailf.maapi.MaapiSchemas.loadHashDB(MaapiSchemas.java:669)
… 8 more
Caused by: java.io.EOFException

Hi,

What does your developer log say?

To enable the developer log at trace level, in confd.conf you can for example add:

...
<developerLog>
  <enabled>true</enabled>
  <file>
    <enabled>true</enabled>
    <name>./devel.log</name>
  </file>
</developerLog>
<developerLogLevel>trace</developerLogLevel>
...

Nothing is coming in devel log.

This seems to be the exact same issue as in your other post - as pointed out by @mnovak there, your use of port 2022 is probably wrong. Making a connection to the NETCONF/SSH port with anything other than a ssh client requesting the “netconf” subsystem can be expected to result in an immediate close of the connection from the server side.