I wrote a socket client in java that 24/7 connected to a socket server and receive data from it.
the client is running for about 3 days in testing, everything looks fine, and than suddenly I saw this message in the eclipse console (No stack trace):
ServerCommunicatorAdmin reqIncoming
The server has decided to close this
client connection.
I restart the application and now its working again.
I asked the server sysadmin, he says that everything looks fine the his logs.
my system uses mysql jdbc and log4j.
Any idea what can be the source?
Thanks
If you Google ServerCommunicatorAdmin you'll see that it's part of JMX
com.sun.jmx.remote.internal:
ServerCommunicatorAdmin.java
and if you search for "reqIncoming The server has decided to close this client connection" you get lots of hits. There should be something in there to help you.
Related
I have seen several topics on this problem, but all of them are either for Android Studio or Glassfish.
Problem:
I'm sending a POST Request from Postman to a web app hosted in WebSphere. I set a breakpoint in the web service code in IntelliJ, but when I fire up the debugger, I get this error:
Error running 'WebSphere Traditional 8.5.5.0': Unable to open debugger port
(127.x.x.x:xxxxx): java.net.SocketException "socket closed"
WebSphere Debug Configuration in IntelliJ:
Things I've tried:
read this SO post and discovered the WebSphere debug configuration
restart the app server
restart the web service
restart IntelliJ
restart my PC
read several Android Studio posts on the same subject
read the JavaDoc on Java.net.SocketException
blasphemed
Questions:
If the issue is simply that I need to change the debug port, how can I determine what to change it to?
If necessary, where in the WebSphere Application Server admin console would I navigate to if I wanted to check the sockets? I'm very new to WebSphere AS and the documentation is a bit scattered.
The problem was human error.
Because of my poor understanding of WebSphere, I was starting the server manually, and then starting the web service in IntelliJ.
IntelliJ was trying to launch the server for me, but when it saw that the server was already running, it threw an error stating that the socket was closed.
The solution was simply to let IntelliJ to launch the server as part of the Run process.
I developed a java code to connect to a device and issue few POST commands. This runs well in eclipse. But when I build and run on command-line it always times out.
I am running eclipse in the same machine as command line .I am using java 8.
Network problems are best tackled by first keeping Java out of it. So as a first step, you can open up the console and try to do a telnet connection to the socket address you used in your program by entering
telnet targetserver.example.com 12345
If that times out as well, the source of your problem is not within Java.
You haven't provided much (e.g. source as requested) but my guess into the blue is that you're sitting behind a proxy that is configured in Eclipse. Eclipse passes that information to the started application so the connection works. Starting the application on the console lacks this information, so the network connection is attempted directly without going via the proxy.
I have a problem with an application in Java.
This application uses Apache QPid broker (6.0.1) to send messages.
I run it on 2 computers : the computer I use to work, and the 1 we use to test application before we give it to the client.
On my computer, there is no problem, the application send or receive messages.
The problem is we the other computer. I installed qpid the same way i did on mine : I extracted the .tar.gz, set $QPID_WORK to the working directory, and set ports i use with web management interface.
I tried it yesterday morning, and no problems, all works fine.
But after that, I stopped qpid (my boss asked me to show her how to start every components of the application) and since i can't send messages anymore.
I tried 2 applications :
The first one is the application I work on. The first thing it does is connect to qpid with JMX/RMI (with the apache API). But i have a timeout exception at this moment.
The second application is an app I did to test QPID and see how i can send a message. I also have a timeout exception when i try to send the message.
With the second application, QPID detect the connexion (and display it in web interface) but it doesn't create the queue or put message if it already exists.
I think this is a configuration problem (maybe access rights on a file?) but i'm not sure, and if i'm right, i can't find where is the problem.
I wanted to try to send the message from my computer on the qpid on test computer, but there are not on the same network, and i can't test that :(
Does anyone have an idea of what is wrong?
ps : i apologize for english mistakes, i'm french
ps 2 : i can't show you code exept the one i created to try qpid, but there is nothing really interesting (I took a big part of it from apache documentation with just a few modifications that work on my computer)
The connection with RMI makes a timeout like the message producer.
I found a solution :
the overflow on the exchange was set to 0 (unlimited) but if I change (like 10MO) it works without timeout.
But I still don't know if it's a qpid bug, or a problem with the computer, I'll try to find out with the system administrator and i'll post here if we find an answer if someone else have the same problem.
At the moment i have an android client app which connects to my java server through socket - serversocket. It sends and receive strings. The java server is connected to a mysql database (actually mariadb) using the jdbc driver.
I succeed to create a jbossas application and upload the code of the java server to openshift, but i didn't find any detailed tutorial on how do i connect to this new uploaded server from my socket client (This one (RMI or socket connection to Java Program on OpenShift) gives some tips but i'm still stucked).
More on this, how do i know that my server runs just fine on openshift and how do i control de calls to the database after i connect it (found this: $ rhc app create MyApp jbossas-7
$ rhc cartridge add mysql-5.5 -a MyApp), using org.mariadb.jdbc.Driver and java.sql is still working ?
Any small guide or tip is highly appreciated. I'm new to these things so please don't be too heavy on comments.
You can only make connections to your OpenShift server on http/https or ws/wss ports. If you want to connect to your java application and pull data from it from an android device, I would suggest using a RESTful api or a servlet, etc.
I had similar problem: My app server originally was running as a ServerSocket listener, and any clients/devices connect to it directly via Socket binding.
To deploy it into OpenShift, my previous initial solution was to change its host:port configuration by following the suggestion as described in this link [Socket connection to Java Program on OpenShift]. It worked nice as far as my app server was successfully up and running. But it did not work well with the port forwarding approach in order to accept remote requests.
So for the final solution, I modified the app server by wrapping my original code with a RESTful webservice around it, and deploy it as a web service.
I know that there are many questions on this topic, and I have been searching for an answer for the past 4 months. Everyone says check host address, port, and firewall. Well I have done these items, but am still not having any success.
We are running our web application locally using Apache Tomcat 7.0.27 through Netbeans 7.2.1 and are no longer able to connect to the SMTP server to send emails. When running the application on a virtual machine located on the server, there is no issue connecting. We have no problem connecting and sending mail using telnet locally with the same parameters.
We have tried looking at the SMTP logs on the server, and were able to access some logs, but can't find any related to the refused connection. Which SMTP logs would provide more information on this issue? I tend to think that since the connection is refused it may not even trigger any logging, is this a correct assumption? We migrated to IIS7 several months ago and were having trouble accessing IIS 6.0 Manager, so I am not sure that they are even set up correctly.
Does anyone have any ideas of how to further troubleshoot the connection?
Thank you in advance, and please let me know if I can provide any further information.
Almost certainly this is a problem with a firewall or anti-virus program on your local machine. If you can connect from that machine using telnet but can't connect from that same machine using a Java application, there's something on that machine preventing Java applications from connecting.
I recently faced the same problem while running the Mail sending code and what I found is that the code which I had written recently is using the Java version Jre7. But the older codes run in Jre 6 environment, which works perfectly even now also.
So what I had done is I just change the Jre version of my recent code to Jre 6. After that the code works perfectly without any exception.
So try to change your runtime environment to lower Jre and run the code.