Skip to Content
0

Using the ESP socket adapters

Feb 05, 2017 at 09:06 PM

107

avatar image

I am trying to run the ESP Socket adapters with no luck. My customer has another 3rd party who has produced a program which submits XML data that is supposed to be received by the XML Socket adapter.

When the adapter starts, there is no connection. After a few seconds the adapter dies. Isn't it supposed to keep retrying the connection?


Here's the adapter definition in the ccl file:

ATTACH INPUT ADAPTER ClaimBillingRequest_IN TYPE toolkit_socket_xmllist_input to ClaimBillingRequest
PROPERTIES 
	host='<ipaddress>',
	port=15001,
	inputBufferSize=10000;

I've tried different ports. Netstat confirms they're not used by other programs. Are there any other properties I should use? How do I get the adapter to keep retrying the connection?

Here is the output in the adapter's log:

02-05-2017 20:55:17.951 INFO [main] (Framework.main) start C:\Sybase\ESP-5_1/adapters/framework/instances/file_xmllist_output/adapter_config.xml 
02-05-2017 20:55:18.060 INFO [main] (Framework.main) start C:\Sybase\ESP-5_1/adapters/framework/instances/socket_xmllist_input/adapter_config.xml 
02-05-2017 20:55:18.190 INFO [main] (AdapterConfig.load) C:\Sybase\ESP-5_1\adapters\framework\config\custommodulesdefine.xml
02-05-2017 20:55:18.205 INFO [main] (XmlUtils$1.resolveResource) C:\Sybase\ESP-5_1/adapters/framework/config/parametersdefine.xsd
02-05-2017 20:55:18.211 INFO [main] (XmlUtils$1.resolveResource) C:\Sybase\ESP-5_1/adapters/framework/config/standard_module_parametersdefine.xsd
02-05-2017 20:55:18.468 INFO [main] (AdapterConfig.load) C:\Sybase\ESP-5_1\adapters\framework\config\custommodulesdefine.xml
02-05-2017 20:55:18.460 INFO [main] (PortAllocator.allocateFromDataCenter) Trying to get global lock ... 
02-05-2017 20:55:18.496 INFO [main] (PortAllocator.allocateFromDataCenter) Success to get global lock.
02-05-2017 20:55:18.504 INFO [main] (XmlUtils$1.resolveResource) C:\Sybase\ESP-5_1/adapters/framework/config/parametersdefine.xsd
02-05-2017 20:55:18.559 INFO [main] (XmlUtils$1.resolveResource) C:\Sybase\ESP-5_1/adapters/framework/config/standard_module_parametersdefine.xsd
02-05-2017 20:55:18.787 INFO [main] (PortAllocator.allocateFromDataCenter) Trying to get global lock ... 
02-05-2017 20:55:18.805 INFO [main] (PortAllocator.allocateFromDataCenter) Success to get global lock.
02-05-2017 20:55:18.825 INFO [main] (AdapterController.sendCommand) start C:\sybase\ESP-5_1\adapters\framework\instances\file_xmllist_output\adapter_config.xml
02-05-2017 20:55:18.928 INFO [main] (AdapterController.sendCommand) start C:\sybase\ESP-5_1\adapters\framework\instances\socket_xmllist_input\adapter_config.xml
02-05-2017 20:55:19.888 INFO [main] (Log.initialized) Logging initialized @2907ms
02-05-2017 20:55:19.938 INFO [Thread-0] (Server.doStart) jetty-9.2.17.v20160517
02-05-2017 20:55:19.973 INFO [main] (Log.initialized) Logging initialized @2972ms
02-05-2017 20:55:19.996 INFO [Thread-0] (ContextHandler.doStart) Started o.e.j.s.ServletContextHandler@6efac41a{/,null,AVAILABLE}
02-05-2017 20:55:20.037 INFO [Thread-0] (Server.doStart) jetty-9.2.17.v20160517
02-05-2017 20:55:20.063 INFO [Thread-0] (AbstractConnector.doStart) Started ServerConnector@704900d2{HTTP/1.1}{172.16.2.35:19082}
02-05-2017 20:55:20.067 INFO [Thread-0] (Server.doStart) Started @3090ms
02-05-2017 20:55:20.081 INFO [Thread-0] (ContextHandler.doStart) Started o.e.j.s.ServletContextHandler@5c862881{/,null,AVAILABLE}
02-05-2017 20:55:20.151 INFO [Thread-0] (AbstractConnector.doStart) Started ServerConnector@4498d90{HTTP/1.1}{172.16.2.35:19083}
02-05-2017 20:55:20.153 INFO [Thread-0] (Server.doStart) Started @3155ms
02-05-2017 20:55:20.932 INFO [main] (AdapterController.executeStart) Adapter controller is started.
02-05-2017 20:55:20.932 INFO [main] (AdapterController.executeStart) Starting adapter
02-05-2017 20:55:20.944 WARN [main] (AdapterConfig.getAdapterName) The adapter name File/Hadoop Event XML Output configured in adapter runtime configuration file is different from the adapter name ClaimBillingRequest_OUT configured in the project. The later one ClaimBillingRequest_OUT will be used as adapter name. 
02-05-2017 20:55:20.950 INFO [main] (EspProjectInfo.connect) Login to default project ...
02-05-2017 20:55:20.951 INFO [main] (EspProjectInfo.connect) defaultSessionId = LOCAL_bf98672af684973741b993d10c505fb1_1
02-05-2017 20:55:20.951 INFO [main] (EspProjectInfo.connect) defaultHostName = <HOSTNAME>
02-05-2017 20:55:20.952 INFO [main] (EspProjectInfo.connect) defaultPortNumber = 63849
02-05-2017 20:55:20.952 INFO [main] (EspProjectInfo.connect) defaultSSL = false
02-05-2017 20:55:21.022 INFO [main] (AdapterController.executeStart) Adapter controller is started.
02-05-2017 20:55:21.022 INFO [main] (AdapterController.executeStart) Starting adapter
02-05-2017 20:55:21.034 WARN [main] (AdapterConfig.getAdapterName) The adapter name Socket Event XML Input configured in adapter runtime configuration file is different from the adapter name ClaimBillingRequest_IN configured in the project. The later one ClaimBillingRequest_IN will be used as adapter name. 
02-05-2017 20:55:21.044 INFO [main] (ModuleWrapper.initQue) Buffer Size for module MyOutStream_Subscriber is 10240.
02-05-2017 20:55:21.045 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module MyOutStream_Subscriber is true.
02-05-2017 20:55:21.047 INFO [main] (EspProjectInfo.connect) Login to default project ...
02-05-2017 20:55:21.050 INFO [main] (EspProjectInfo.connect) defaultSessionId = LOCAL_4ba0443017913ed88e69ce8f6cb04c27_2
02-05-2017 20:55:21.050 INFO [main] (EspProjectInfo.connect) defaultHostName = <HOSTNAME>
02-05-2017 20:55:21.051 INFO [main] (EspProjectInfo.connect) defaultPortNumber = 63849
02-05-2017 20:55:21.051 INFO [main] (SubscribeProcesser.init) EspSubscriber is initializing
02-05-2017 20:55:21.051 INFO [main] (EspProjectInfo.connect) defaultSSL = false
02-05-2017 20:55:21.065 INFO [main] (EspProjectInfo.connect) Login to default project ...
02-05-2017 20:55:21.066 INFO [main] (EspProjectInfo.connect) defaultSessionId = LOCAL_bf98672af684973741b993d10c505fb1_1
02-05-2017 20:55:21.066 INFO [main] (EspProjectInfo.connect) defaultHostName = <HOSTNAME>
02-05-2017 20:55:21.066 INFO [main] (EspProjectInfo.connect) defaultPortNumber = 63849
02-05-2017 20:55:21.067 INFO [main] (EspProjectInfo.connect) defaultSSL = false
02-05-2017 20:55:21.081 INFO [main] (ModuleWrapper.initQue) Buffer Size for module XmlListOutputFormatter is 10240.
02-05-2017 20:55:21.084 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module XmlListOutputFormatter is true.
02-05-2017 20:55:21.084 INFO [main] (FormatterWrapper.init) Before initializing the Formatter module XmlListOutputFormatter
02-05-2017 20:55:21.092 INFO [main] (FormatterWrapper.init) After initializing the Formatter module XmlListOutputFormatter
02-05-2017 20:55:21.103 INFO [main] (ModuleWrapper.initQue) Buffer Size for module FileOutputTransporter is 10240.
02-05-2017 20:55:21.105 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module FileOutputTransporter is true.
02-05-2017 20:55:21.106 INFO [main] (TransporterWrapper.init) Before initializing the Transporter module FileOutputTransporter
02-05-2017 20:55:21.112 INFO [main] (TransporterWrapper.init) After initializing the Transporter module FileOutputTransporter
02-05-2017 20:55:21.119 INFO [main] (ModuleWrapper.start) Before starting module FileOutputTransporter
02-05-2017 20:55:21.122 INFO [main] (ModuleWrapper.start) After module FileOutputTransporter started
02-05-2017 20:55:21.124 INFO [main] (ModuleWrapper.start) Before starting module MyOutStream_Subscriber
02-05-2017 20:55:21.137 INFO [Thread-15] (TransporterWrapper.run) Before running the Transporter module FileOutputTransporter
02-05-2017 20:55:21.139 INFO [main] (SubscribeProcesser.start) Subscriber of stream ClaimBillingRequest_out is started
02-05-2017 20:55:21.143 INFO [main] (ModuleWrapper.start) After module MyOutStream_Subscriber started
02-05-2017 20:55:21.144 INFO [main] (AdapterController.executeStart) Address 172.16.2.35:19082 is used to accept the control command.
02-05-2017 20:55:21.144 INFO [main] (AdapterController.executeStart) Adapter started
02-05-2017 20:55:21.144 INFO [main] (AdapterController.executeStart) Starting adapter controller
02-05-2017 20:55:21.144 INFO [Thread-16] (FormatterWrapper.run) Running Formatter module XmlListOutputFormatter
02-05-2017 20:55:21.144 INFO [Thread-19] (EspConnectorWrapper.run) Running EspConnector Module MyOutStream_Subscriber
02-05-2017 20:55:21.157 INFO [main] (ModuleWrapper.initQue) Buffer Size for module MyInStream_Publisher is 10240.
02-05-2017 20:55:21.159 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module MyInStream_Publisher is true.
02-05-2017 20:55:21.159 INFO [main] (EspPublisher.init) EspPublisher is initializing
02-05-2017 20:55:21.162 INFO [main] (EspPublisher.init) Transaction buffer size is 1.
02-05-2017 20:55:21.181 INFO [main] (EspProjectInfo.connect) Login to default project ...
02-05-2017 20:55:21.190 INFO [main] (EspProjectInfo.connect) defaultSessionId = LOCAL_4ba0443017913ed88e69ce8f6cb04c27_2
02-05-2017 20:55:21.200 INFO [main] (EspProjectInfo.connect) defaultHostName = <HOSTNAME>
02-05-2017 20:55:21.200 INFO [main] (EspProjectInfo.connect) defaultPortNumber = 63849
02-05-2017 20:55:21.201 INFO [main] (EspProjectInfo.connect) defaultSSL = false
02-05-2017 20:55:21.212 INFO [main] (ModuleWrapper.initQue) Buffer Size for module MyXmlListInputFormatter is 10240.
02-05-2017 20:55:21.213 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module MyXmlListInputFormatter is true.
02-05-2017 20:55:21.214 INFO [main] (FormatterWrapper.init) Before initializing the Formatter module MyXmlListInputFormatter
02-05-2017 20:55:21.216 INFO [main] (FormatterWrapper.init) After initializing the Formatter module MyXmlListInputFormatter
02-05-2017 20:55:21.216 INFO [main] (ModuleWrapper.initQue) Buffer Size for module MyExampleSocketInTransporter is 10240.
02-05-2017 20:55:21.217 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module MyExampleSocketInTransporter is true.
02-05-2017 20:55:21.217 INFO [main] (TransporterWrapper.init) Before initializing the Transporter module MyExampleSocketInTransporter
02-05-2017 20:55:21.220 INFO [main] (TransporterWrapper.init) After initializing the Transporter module MyExampleSocketInTransporter
02-05-2017 20:55:21.220 INFO [main] (ModuleWrapper.initQue) Buffer Size for module MyStreamingInputFormatter is 10240.
02-05-2017 20:55:21.221 INFO [main] (ModuleWrapper.initParallelParameters) Parallel setting of module MyStreamingInputFormatter is true.
02-05-2017 20:55:21.222 INFO [main] (FormatterWrapper.init) Before initializing the Formatter module MyStreamingInputFormatter
02-05-2017 20:55:21.224 INFO [main] (FormatterWrapper.init) After initializing the Formatter module MyStreamingInputFormatter
02-05-2017 20:55:21.229 INFO [main] (ModuleWrapper.start) Before starting module MyInStream_Publisher
02-05-2017 20:55:21.234 INFO [main] (EspPublisher.start) Publisher of stream ClaimBillingRequest is started
02-05-2017 20:55:21.234 INFO [main] (ModuleWrapper.start) After module MyInStream_Publisher started
02-05-2017 20:55:21.235 INFO [Thread-17] (EspConnectorWrapper.run) Running EspConnector Module MyInStream_Publisher
02-05-2017 20:55:21.236 INFO [main] (ModuleWrapper.start) Before starting module MyStreamingInputFormatter
02-05-2017 20:55:21.236 INFO [main] (ModuleWrapper.start) After module MyStreamingInputFormatter started
02-05-2017 20:55:21.236 INFO [Thread-18] (FormatterWrapper.run) Running Formatter module MyXmlListInputFormatter
02-05-2017 20:55:21.237 INFO [main] (ModuleWrapper.start) Before starting module MyExampleSocketInTransporter
02-05-2017 20:55:21.237 INFO [main] (ModuleWrapper.start) After module MyExampleSocketInTransporter started
02-05-2017 20:55:21.238 INFO [main] (AdapterController.executeStart) Address 172.16.2.35:19083 is used to accept the control command.
02-05-2017 20:55:21.238 INFO [main] (AdapterController.executeStart) Adapter started
02-05-2017 20:55:21.238 INFO [Thread-21] (TransporterWrapper.run) Before running the Transporter module MyExampleSocketInTransporter
02-05-2017 20:55:21.238 INFO [main] (AdapterController.executeStart) Starting adapter controller
02-05-2017 20:55:22.241 ERROR [Thread-21] (SocketInTransporter.execute) Exception is thrown
java.net.ConnectException: Connection refused: connect (port 15001 to address ::ffff:<IPADDRESS> (host.host.local))
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:173)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:591)
	at java.net.Socket.connect(Socket.java:538)
	at java.net.Socket.<init>(Socket.java:434)
	at java.net.Socket.<init>(Socket.java:211)
	at com.sybase.esp.adapter.transporters.socket.SocketInTransporter.execute(SocketInTransporter.java:128)
	at com.sybase.esp.adapter.framework.wrappers.TransporterWrapper.run(TransporterWrapper.java:99)
	at java.lang.Thread.run(Thread.java:812)
02-05-2017 20:55:23.244 ERROR [Thread-21] (SocketInTransporter.execute) Exception is thrown
java.net.ConnectException: Connection refused: connect (port 15001 to address ::ffff:<IPADDRESS> (host.host.local))
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:173)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:591)
	at java.net.Socket.connect(Socket.java:538)
	at java.net.Socket.<init>(Socket.java:434)
	at java.net.Socket.<init>(Socket.java:211)
	at com.sybase.esp.adapter.transporters.socket.SocketInTransporter.execute(SocketInTransporter.java:128)
	at com.sybase.esp.adapter.framework.wrappers.TransporterWrapper.run(TransporterWrapper.java:99)
	at java.lang.Thread.run(Thread.java:812)




Exception repeats 30 times...




02-05-2017 20:55:52.339 INFO [Thread-21] (Adapter.requestCommand) C:\sybase\ESP-5_1\adapters\framework\instances\socket_xmllist_input\adapter_config.xml
02-05-2017 20:55:52.340 INFO [Thread-21] (PortAllocator.queryFromDataCenter) Trying to get global lock ... 
02-05-2017 20:55:52.340 INFO [Thread-21] (PortAllocator.queryFromDataCenter) Success to get global lock.
02-05-2017 20:55:52.341 INFO [Thread-21] (AdapterController.sendCommand) stop C:\sybase\ESP-5_1\adapters\framework\instances\socket_xmllist_input\adapter_config.xml
02-05-2017 20:55:52.378 INFO [qtp1473981203-19] (AdapterControllerStub.stop) Stopping adapter
02-05-2017 20:55:52.379 INFO [qtp1473981203-19] (PortAllocator.queryFromDataCenter) Trying to get global lock ... 
02-05-2017 20:55:52.379 INFO [qtp1473981203-19] (PortAllocator.queryFromDataCenter) Success to get global lock.
02-05-2017 20:55:52.379 INFO [qtp1473981203-19] (AdapterController.sendCommand) status C:\sybase\ESP-5_1\adapters\framework\instances\socket_xmllist_input\adapter_config.xml
02-05-2017 20:55:52.384 INFO [qtp1473981203-19] (AdapterController.executeStatus) Adapter status: Running
02-05-2017 20:55:52.386 INFO [Thread-21] (TransporterWrapper.run) After running the Transporter module MyExampleSocketInTransporter
02-05-2017 20:55:52.386 INFO [Thread-23] (Adapter.stop) Before stopping module MyExampleSocketInTransporter
02-05-2017 20:55:52.386 INFO [Thread-23] (ModuleWrapper.stop) Input buffer of MyExampleSocketInTransporter contained 0 rows at max.
02-05-2017 20:55:52.387 INFO [Thread-23] (ModuleWrapper.stop) Before stopping module MyExampleSocketInTransporter
02-05-2017 20:55:52.388 INFO [Thread-23] (ModuleWrapper.stop) After module MyExampleSocketInTransporter stopped
02-05-2017 20:55:52.388 INFO [Thread-23] (Adapter.stop) After module MyExampleSocketInTransporter stopped
02-05-2017 20:55:52.388 INFO [Thread-23] (Adapter.stop) Before stopping module MyStreamingInputFormatter
02-05-2017 20:55:52.388 INFO [Thread-23] (ModuleWrapper.stop) Input buffer of MyStreamingInputFormatter contained 0 rows at max.
02-05-2017 20:55:54.389 INFO [Thread-23] (ModuleWrapper.stop) Before stopping module MyStreamingInputFormatter
02-05-2017 20:55:54.389 INFO [Thread-23] (ModuleWrapper.stop) After module MyStreamingInputFormatter stopped
02-05-2017 20:55:54.389 INFO [Thread-23] (Adapter.stop) After module MyStreamingInputFormatter stopped
02-05-2017 20:55:54.389 INFO [Thread-23] (Adapter.stop) Before stopping module MyXmlListInputFormatter
02-05-2017 20:55:54.389 INFO [Thread-23] (ModuleWrapper.stop) Input buffer of MyXmlListInputFormatter contained 0 rows at max.
02-05-2017 20:55:54.394 INFO [Thread-23] (Adapter.stop) After module MyXmlListInputFormatter stopped
02-05-2017 20:55:54.394 INFO [Thread-23] (Adapter.stop) Before stopping module MyInStream_Publisher
02-05-2017 20:55:54.395 INFO [Thread-23] (ModuleWrapper.stop) Input buffer of MyInStream_Publisher contained 0 rows at max.
02-05-2017 20:55:54.396 INFO [Thread-23] (ModuleWrapper.stop) Before stopping module MyInStream_Publisher
02-05-2017 20:55:54.396 INFO [Thread-23] (EspPublisher.stop) Totally 0 rows are published by module MyInStream_Publisher, 0 success.
02-05-2017 20:55:54.396 INFO [Thread-23] (EspPublisher.stop) Publisher of stream ClaimBillingRequest is stopped
02-05-2017 20:55:54.397 INFO [Thread-23] (ModuleWrapper.stop) After module MyInStream_Publisher stopped
02-05-2017 20:55:54.397 INFO [Thread-23] (Adapter.stop) After module MyInStream_Publisher stopped
02-05-2017 20:55:54.397 INFO [Thread-23] (ModuleWrapper.destroy) Before destroying module MyExampleSocketInTransporter
02-05-2017 20:55:54.397 INFO [Thread-23] (ModuleWrapper.destroy) After module MyExampleSocketInTransporter destroyed
02-05-2017 20:55:54.397 INFO [Thread-23] (FormatterWrapper.destroy) Before destroying module MyStreamingInputFormatter
02-05-2017 20:55:54.397 INFO [Thread-23] (FormatterWrapper.destroy) After module MyStreamingInputFormatter destroyed
02-05-2017 20:55:54.398 INFO [Thread-23] (FormatterWrapper.destroy) Before destroying module MyXmlListInputFormatter
02-05-2017 20:55:54.398 INFO [Thread-23] (FormatterWrapper.destroy) After module MyXmlListInputFormatter destroyed
02-05-2017 20:55:54.398 INFO [Thread-23] (ModuleWrapper.destroy) Before destroying module MyInStream_Publisher
02-05-2017 20:55:54.399 INFO [Thread-23] (EspPublisher.destroy) Publisher of stream ClaimBillingRequest is destroyed
02-05-2017 20:55:54.399 INFO [Thread-23] (ModuleWrapper.destroy) After module MyInStream_Publisher destroyed
02-05-2017 20:55:55.201 INFO [Thread-23] (ContextHandler.doStop) Stopped o.e.j.s.ServletContextHandler@5c862881{/,null,UNAVAILABLE}
02-05-2017 20:55:55.204 INFO [Thread-23] (AbstractConnector.doStop) Stopped ServerConnector@4498d90{HTTP/1.1}{172.16.2.35:19083}


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jeff Wootton
Feb 07, 2017 at 04:05 PM
0

I suggest you open a support ticket

Share
10 |10000 characters needed characters left characters exceeded