Spring Integration tcp/ip connection delay
We are using Spring integration 4.1.3.
Sometimes it takes more than 5 seconds to request a connection from a particular server.
What is happening between step1 and step2?
Why is it delayed?
Client Log
step1 :▶ DEBUG 11.28 18:14:33.237 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory[obtainNewConnection:98] - Opening new socket connection to 10.0.12.111:36401
step2 :▶ DEBUG 11.28 18:14:38.306 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetConnection[<init>:138] - New connection 10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
Client Config
<int:gateway id="gw-vacct-tcp-sender"
service-interface="com.mainpay.pay.service.TcpSendVacctGateway"
default-request-channel="vacct-input"
default-reply-channel="vacct-reply"
/>
<int-tcp:tcp-connection-factory id="vacct-client"
type="client"
host="#{springSetting['pay.pg.ngin.vip']}"
port="#{springSetting['pay.pg.ngin.vacct.port']}"
serializer="TCPJsonSerializer8"
deserializer="TCPJsonDeserializer8"
single-use="true"
so-timeout="20000"
/>
<int:channel id="vacct-input" />
<int-tcp:tcp-outbound-gateway id="vacct-outGateway"
request-channel="vacct-input"
reply-channel="vacct-reply"
connection-factory="vacct-client"
reply-timeout="20000"
/>
<int:channel id="vacct-reply" datatype="java.lang.String" />
java spring spring-integration tcp-ip
add a comment |
We are using Spring integration 4.1.3.
Sometimes it takes more than 5 seconds to request a connection from a particular server.
What is happening between step1 and step2?
Why is it delayed?
Client Log
step1 :▶ DEBUG 11.28 18:14:33.237 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory[obtainNewConnection:98] - Opening new socket connection to 10.0.12.111:36401
step2 :▶ DEBUG 11.28 18:14:38.306 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetConnection[<init>:138] - New connection 10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
Client Config
<int:gateway id="gw-vacct-tcp-sender"
service-interface="com.mainpay.pay.service.TcpSendVacctGateway"
default-request-channel="vacct-input"
default-reply-channel="vacct-reply"
/>
<int-tcp:tcp-connection-factory id="vacct-client"
type="client"
host="#{springSetting['pay.pg.ngin.vip']}"
port="#{springSetting['pay.pg.ngin.vacct.port']}"
serializer="TCPJsonSerializer8"
deserializer="TCPJsonDeserializer8"
single-use="true"
so-timeout="20000"
/>
<int:channel id="vacct-input" />
<int-tcp:tcp-outbound-gateway id="vacct-outGateway"
request-channel="vacct-input"
reply-channel="vacct-reply"
connection-factory="vacct-client"
reply-timeout="20000"
/>
<int:channel id="vacct-reply" datatype="java.lang.String" />
java spring spring-integration tcp-ip
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38
add a comment |
We are using Spring integration 4.1.3.
Sometimes it takes more than 5 seconds to request a connection from a particular server.
What is happening between step1 and step2?
Why is it delayed?
Client Log
step1 :▶ DEBUG 11.28 18:14:33.237 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory[obtainNewConnection:98] - Opening new socket connection to 10.0.12.111:36401
step2 :▶ DEBUG 11.28 18:14:38.306 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetConnection[<init>:138] - New connection 10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
Client Config
<int:gateway id="gw-vacct-tcp-sender"
service-interface="com.mainpay.pay.service.TcpSendVacctGateway"
default-request-channel="vacct-input"
default-reply-channel="vacct-reply"
/>
<int-tcp:tcp-connection-factory id="vacct-client"
type="client"
host="#{springSetting['pay.pg.ngin.vip']}"
port="#{springSetting['pay.pg.ngin.vacct.port']}"
serializer="TCPJsonSerializer8"
deserializer="TCPJsonDeserializer8"
single-use="true"
so-timeout="20000"
/>
<int:channel id="vacct-input" />
<int-tcp:tcp-outbound-gateway id="vacct-outGateway"
request-channel="vacct-input"
reply-channel="vacct-reply"
connection-factory="vacct-client"
reply-timeout="20000"
/>
<int:channel id="vacct-reply" datatype="java.lang.String" />
java spring spring-integration tcp-ip
We are using Spring integration 4.1.3.
Sometimes it takes more than 5 seconds to request a connection from a particular server.
What is happening between step1 and step2?
Why is it delayed?
Client Log
step1 :▶ DEBUG 11.28 18:14:33.237 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetClientConnectionFactory[obtainNewConnection:98] - Opening new socket connection to 10.0.12.111:36401
step2 :▶ DEBUG 11.28 18:14:38.306 [ajp-bio-8109-exec-3] org.springframework.integration.ip.tcp.connection.TcpNetConnection[<init>:138] - New connection 10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
Client Config
<int:gateway id="gw-vacct-tcp-sender"
service-interface="com.mainpay.pay.service.TcpSendVacctGateway"
default-request-channel="vacct-input"
default-reply-channel="vacct-reply"
/>
<int-tcp:tcp-connection-factory id="vacct-client"
type="client"
host="#{springSetting['pay.pg.ngin.vip']}"
port="#{springSetting['pay.pg.ngin.vacct.port']}"
serializer="TCPJsonSerializer8"
deserializer="TCPJsonDeserializer8"
single-use="true"
so-timeout="20000"
/>
<int:channel id="vacct-input" />
<int-tcp:tcp-outbound-gateway id="vacct-outGateway"
request-channel="vacct-input"
reply-channel="vacct-reply"
connection-factory="vacct-client"
reply-timeout="20000"
/>
<int:channel id="vacct-reply" datatype="java.lang.String" />
java spring spring-integration tcp-ip
java spring spring-integration tcp-ip
edited Nov 28 '18 at 9:45
Mr Cho
asked Nov 28 '18 at 9:36
Mr ChoMr Cho
305
305
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38
add a comment |
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38
add a comment |
1 Answer
1
active
oldest
votes
Try setting lookup-host
to false; perhaps there is a problem in the network with reverse host lookups. It appears that the lookup failed since it is an ip address in the connection id.
10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
See the documentation.
By default, reverse DNS lookups are done on inbound packets to convert IP addresses to hostnames for use in message headers. In environments where DNS is not configured, this can cause connection delays. You can override this default behavior by setting the
lookup-host
attribute to false.
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53516296%2fspring-integration-tcp-ip-connection-delay%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try setting lookup-host
to false; perhaps there is a problem in the network with reverse host lookups. It appears that the lookup failed since it is an ip address in the connection id.
10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
See the documentation.
By default, reverse DNS lookups are done on inbound packets to convert IP addresses to hostnames for use in message headers. In environments where DNS is not configured, this can cause connection delays. You can override this default behavior by setting the
lookup-host
attribute to false.
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
add a comment |
Try setting lookup-host
to false; perhaps there is a problem in the network with reverse host lookups. It appears that the lookup failed since it is an ip address in the connection id.
10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
See the documentation.
By default, reverse DNS lookups are done on inbound packets to convert IP addresses to hostnames for use in message headers. In environments where DNS is not configured, this can cause connection delays. You can override this default behavior by setting the
lookup-host
attribute to false.
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
add a comment |
Try setting lookup-host
to false; perhaps there is a problem in the network with reverse host lookups. It appears that the lookup failed since it is an ip address in the connection id.
10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
See the documentation.
By default, reverse DNS lookups are done on inbound packets to convert IP addresses to hostnames for use in message headers. In environments where DNS is not configured, this can cause connection delays. You can override this default behavior by setting the
lookup-host
attribute to false.
Try setting lookup-host
to false; perhaps there is a problem in the network with reverse host lookups. It appears that the lookup failed since it is an ip address in the connection id.
10.0.12.111:36401:2701:561f3524-c421-45ba-9ea5-76a7ddf96430
See the documentation.
By default, reverse DNS lookups are done on inbound packets to convert IP addresses to hostnames for use in message headers. In environments where DNS is not configured, this can cause connection delays. You can override this default behavior by setting the
lookup-host
attribute to false.
answered Nov 28 '18 at 14:03
Gary RussellGary Russell
83.8k74975
83.8k74975
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
add a comment |
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
The connection delay issue no longer occurs. Thank you very much.
– Mr Cho
Nov 29 '18 at 1:27
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53516296%2fspring-integration-tcp-ip-connection-delay%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It's a test server and it's free.
– Mr Cho
Nov 28 '18 at 9:38