Java app cannot connect to target server, but Browser can











up vote
1
down vote

favorite












I have this weird connection error where my Java app is working from some PCs, but not from others. What does not work is sucessfully establishing a HTTP connection to a certain server. Java is getting a TimeoutException.



The weird part is, on the systems where it does not work, when I open the connection in a local browser (firefox and IE), it works. I get a response not only from the authentication proxy, but with correct credentials from my server. It's HTTP 400 (Bad Request) because the browser does not send the expected JSON.



The local system is windows server 2016. The windows firewall is shut down. As far as I know, the local installation is years old. No configuration management here.



The Java app is running as a service as "NT-Authority/SYSTEM". When I run it as a local user (like the browser) it behaves the same. I could not see a difference.



When I check the TCP connection in TcpView, the status is shown as "ESTABLISHED". Does this mean the handshake succeeded?



I'm really really out of ideas.
For every part of the whole system, I can argue that there cannot be an error there, because it works from most systems. Except some.




  • It cannot be the Java app, because the same code works in almost all cases.

  • It cannot be a server configuration issue, because, again, almost no clients are affected.

  • It cannot be something with authentification, because the very same credentials work as soon as I run the Java app with the exact same configuration from another local system in the same local network. The authentification configuration is the only configuration of my Java app.

  • For the same reason, it cannot be a local network configuration issue, like a proxy or something.


I also suspected other applications or viruses running on the same system, but what could they possibly do, to show this behaviour?



Any help is appreciated.










share|improve this question
























  • Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
    – Osmund Francis
    Dec 5 at 4:02















up vote
1
down vote

favorite












I have this weird connection error where my Java app is working from some PCs, but not from others. What does not work is sucessfully establishing a HTTP connection to a certain server. Java is getting a TimeoutException.



The weird part is, on the systems where it does not work, when I open the connection in a local browser (firefox and IE), it works. I get a response not only from the authentication proxy, but with correct credentials from my server. It's HTTP 400 (Bad Request) because the browser does not send the expected JSON.



The local system is windows server 2016. The windows firewall is shut down. As far as I know, the local installation is years old. No configuration management here.



The Java app is running as a service as "NT-Authority/SYSTEM". When I run it as a local user (like the browser) it behaves the same. I could not see a difference.



When I check the TCP connection in TcpView, the status is shown as "ESTABLISHED". Does this mean the handshake succeeded?



I'm really really out of ideas.
For every part of the whole system, I can argue that there cannot be an error there, because it works from most systems. Except some.




  • It cannot be the Java app, because the same code works in almost all cases.

  • It cannot be a server configuration issue, because, again, almost no clients are affected.

  • It cannot be something with authentification, because the very same credentials work as soon as I run the Java app with the exact same configuration from another local system in the same local network. The authentification configuration is the only configuration of my Java app.

  • For the same reason, it cannot be a local network configuration issue, like a proxy or something.


I also suspected other applications or viruses running on the same system, but what could they possibly do, to show this behaviour?



Any help is appreciated.










share|improve this question
























  • Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
    – Osmund Francis
    Dec 5 at 4:02













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have this weird connection error where my Java app is working from some PCs, but not from others. What does not work is sucessfully establishing a HTTP connection to a certain server. Java is getting a TimeoutException.



The weird part is, on the systems where it does not work, when I open the connection in a local browser (firefox and IE), it works. I get a response not only from the authentication proxy, but with correct credentials from my server. It's HTTP 400 (Bad Request) because the browser does not send the expected JSON.



The local system is windows server 2016. The windows firewall is shut down. As far as I know, the local installation is years old. No configuration management here.



The Java app is running as a service as "NT-Authority/SYSTEM". When I run it as a local user (like the browser) it behaves the same. I could not see a difference.



When I check the TCP connection in TcpView, the status is shown as "ESTABLISHED". Does this mean the handshake succeeded?



I'm really really out of ideas.
For every part of the whole system, I can argue that there cannot be an error there, because it works from most systems. Except some.




  • It cannot be the Java app, because the same code works in almost all cases.

  • It cannot be a server configuration issue, because, again, almost no clients are affected.

  • It cannot be something with authentification, because the very same credentials work as soon as I run the Java app with the exact same configuration from another local system in the same local network. The authentification configuration is the only configuration of my Java app.

  • For the same reason, it cannot be a local network configuration issue, like a proxy or something.


I also suspected other applications or viruses running on the same system, but what could they possibly do, to show this behaviour?



Any help is appreciated.










share|improve this question















I have this weird connection error where my Java app is working from some PCs, but not from others. What does not work is sucessfully establishing a HTTP connection to a certain server. Java is getting a TimeoutException.



The weird part is, on the systems where it does not work, when I open the connection in a local browser (firefox and IE), it works. I get a response not only from the authentication proxy, but with correct credentials from my server. It's HTTP 400 (Bad Request) because the browser does not send the expected JSON.



The local system is windows server 2016. The windows firewall is shut down. As far as I know, the local installation is years old. No configuration management here.



The Java app is running as a service as "NT-Authority/SYSTEM". When I run it as a local user (like the browser) it behaves the same. I could not see a difference.



When I check the TCP connection in TcpView, the status is shown as "ESTABLISHED". Does this mean the handshake succeeded?



I'm really really out of ideas.
For every part of the whole system, I can argue that there cannot be an error there, because it works from most systems. Except some.




  • It cannot be the Java app, because the same code works in almost all cases.

  • It cannot be a server configuration issue, because, again, almost no clients are affected.

  • It cannot be something with authentification, because the very same credentials work as soon as I run the Java app with the exact same configuration from another local system in the same local network. The authentification configuration is the only configuration of my Java app.

  • For the same reason, it cannot be a local network configuration issue, like a proxy or something.


I also suspected other applications or viruses running on the same system, but what could they possibly do, to show this behaviour?



Any help is appreciated.







networking java connection






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 at 12:46

























asked Nov 28 at 10:58









sinned

254417




254417












  • Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
    – Osmund Francis
    Dec 5 at 4:02


















  • Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
    – Osmund Francis
    Dec 5 at 4:02
















Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
– Osmund Francis
Dec 5 at 4:02




Have you checked the default gateway for each computer? I found that if my machine isn't setup for a specific gateway and/or DNS I cannot connect to the server. Have you tried using the IP and not a domain name? Hope these questions help.
– Osmund Francis
Dec 5 at 4:02















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379047%2fjava-app-cannot-connect-to-target-server-but-browser-can%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • 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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379047%2fjava-app-cannot-connect-to-target-server-but-browser-can%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Plaza Victoria

Puebla de Zaragoza

Musa