- Unrecognized Windows Sockets error: 0: recv failed #332
- Comments
- DavidSoong128 commented Nov 15, 2017
- acogoluegnes commented Nov 15, 2017
- java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind (JBOSS)
- 11 Answers 11
- SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind when running parallel in Windows 7, FireFoxDriver #2319
- Comments
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- lukeis commented Mar 3, 2016
- Intermittent Unrecognized Windows Sockets error: 0: recv failed #36
- Comments
- fsgonz commented Dec 12, 2019
- Confluence Support
- Get started
- Knowledge base
- Products
- Jira Software
- Jira Service Management
- Jira Core
- Confluence
- Bitbucket
- Resources
- Documentation
- Community
- System Status
- Suggestions and bugs
- Marketplace
- Billing and licensing
- Viewport
- Confluence
- Index queue won’t flush automatically, ‘Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed’ errors thrown
- Related content
- Still need help?
- Problem
- Diagnosis
- Cause
- Workaround
Unrecognized Windows Sockets error: 0: recv failed #332
Comments
DavidSoong128 commented Nov 15, 2017
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
[na:1.8.0_73]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
[na:1.8.0_73]
at java.net.SocketInputStream.read(SocketInputStream.java:170)
[na:1.8.0_73]
at java.net.SocketInputStream.read(SocketInputStream.java:141)
[na:1.8.0_73]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
[na:1.8.0_73]
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
[na:1.8.0_73]
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
[na:1.8.0_73]
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
[amqp-client-3.6.2.jar:na]
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:139) [amqp-client-3.6.2.jar:na]
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:542)
[amqp-client-3.6.2.jar:na]
. 1 common frames omitted
Who can help deal with this problem?
The text was updated successfully, but these errors were encountered:
acogoluegnes commented Nov 15, 2017
Thank you for your time.
Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:
- GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
- We have a certain amount of information to work with
We get at least a dozen of questions through various venues every single day, often quite light on details.
At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions of potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.
Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what’s happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you’re
observing, or at least sharing as much relevant information as possible on the list:
- Server, client library and plugin (if applicable) versions used
- Server logs
- A code example or terminal transcript that can be used to reproduce
- Full exception stack traces (not a single line message)
- rabbitmqctl status (and, if possible, rabbitmqctl environment output)
- Other relevant things about the environment and workload, e.g. a traffic capture
Feel free to edit out hostnames and other potentially sensitive information.
When/if we have enough details and evidence we’d be happy to file a new issue.
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind (JBOSS)
I’m using JBoss 4.0.5 GA on Windows 7 with Java version 1.5 (I have to use older java version and a JBoss because I’m working with a legacy system). And when I’m starting the server I get the following error:
And I believe this causes many other exceptions:
I greatly appreciate if anyone could help. At least to figure out where I should look for the solution (e.g. Is this an error related to windows 7 and JBoss clustering incompatability? Is this because of a wrong port configuration? etc.)
11 Answers 11
This problem occurs on some Windows systems that have the IPv6 TCP Stack installed. If both IPv4 and IPv6 are installed on the computer, the Java Virtual Machine (JVM) may have problems closing or opening sockets at the operating system level.
Add the following JVM option: -Djava.net.preferIPv4Stack=true
I’ve seen this happen on Windows 7 and Windows 2008 systems which have both IPv4 and IPv6 stacks installed by default.
You have very likely another process already bound on a port that JBoss is using (8080?) and this prevent JBoss from starting correctly (see this page for a list of ports used by JBoss).
Either find the conflicting process and shut it down:
- use netstat -a -o -n and look for ports used by JBoss (e.g. 8080) and the corresponding pid
- then use tasklist /FI «PID eq
» to find the process
Or change JBoss defaults ports. There are several ways to do that but the best way is to use the Service Binding Manager (see detailed instructions in Configuring Multiple JBoss Instances On One Machine).
The default port in the example code is 4444. Using this port I got «Unrecognized Windows Sockets error: 0: JVM_Bind»
I changed the port to 44444 and tried again. I got a popup from the Windows Firewall service asking me if this application had permission to access the network. Selecting OK I no longer get the error message when I launch my server.
After some experimenting I found that with a port of 5000 or less I would get the JVM_Bind error. Any port of 5001 or above would bind without issue.
SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind when running parallel in Windows 7, FireFoxDriver #2319
Comments
lukeis commented Mar 3, 2016
Originally reported on Google Code with ID 2319
Reported by shijunjuan on 2011-08-23 09:24:22
The text was updated successfully, but these errors were encountered:
lukeis commented Mar 3, 2016
Reported by dawagner on 2011-08-23 16:33:54
lukeis commented Mar 3, 2016
Reported by shijunjuan on 2011-09-07 08:10:44
lukeis commented Mar 3, 2016
Reported by barancev on 2011-10-13 08:26:04
- Labels added: Component-WebDriver
lukeis commented Mar 3, 2016
Reported by aravind.kannan.83 on 2012-02-22 22:01:59
lukeis commented Mar 3, 2016
Reported by shijunjuan on 2012-02-23 01:47:26
lukeis commented Mar 3, 2016
Reported by iamcpizzle on 2012-03-21 23:51:16
lukeis commented Mar 3, 2016
Reported by shijunjuan on 2012-03-31 08:42:55
lukeis commented Mar 3, 2016
Reported by mrlnambi83 on 2012-11-28 19:04:35
lukeis commented Mar 3, 2016
Reported by barancev on 2013-04-16 21:40:38
- Status changed: Fixed
lukeis commented Mar 3, 2016
Reported by luke.semerau on 2015-09-17 18:13:31
- Labels added: Restrict-AddIssueComment-Commit
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Intermittent Unrecognized Windows Sockets error: 0: recv failed #36
Comments
fsgonz commented Dec 12, 2019
openjdk version «1.8.0_232»
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
In Microsoft Windows Server 2016 Version 1607(OS build 14393.3326)
we are getting the following intermittent error:
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
[na:1.8.0_73]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
[na:1.8.0_73]
at java.net.SocketInputStream.read(SocketInputStream.java:170)
[na:1.8.0_73]
at java.net.SocketInputStream.read(SocketInputStream.java:141)
[na:1.8.0_73]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
[na:1.8.0_73]
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
[na:1.8.0_73]
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
[na:1.8.0_73]
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
[amqp-client-3.6.2.jar:na]
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:139) [amqp-client-3.6.2.jar:na]
It may be the case that
should throw a SocketTimeoutException instead of that generic error (this should be handled correctly by the rabbitmq client library). The error is only verified in Widnows.
This may be due to in socketRead0 implementation C code, the WSAGetLastError() has been invoked twice.
void NET_ThrowCurrent(JNIEnv *env, char *msg) <
NET_ThrowNew(env, WSAGetLastError(), msg);
>
Whereon the WSAGetLastError() is invoked 2nd time for generating the Exception message, but WSAGetLastError() can only be invoked once for getting the last error code.
The 2nd time return value is always 0, hence the error message becomes «Unrecognized Windows Sockets error: 0: recv failed»
The text was updated successfully, but these errors were encountered:
Confluence Support
Get started
Knowledge base
Products
Jira Software
Project and issue tracking
Jira Service Management
Service management and customer support
Jira Core
Manage any business project
Confluence
Bitbucket
Git code management
Resources
Documentation
Usage and admin help
Community
Answers, support, and inspiration
System Status
Cloud services health
Suggestions and bugs
Feature suggestions and bug reports
Marketplace
Billing and licensing
Frequently asked questions
Viewport
Confluence
Index queue won’t flush automatically, ‘Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed’ errors thrown
Related content
Still need help?
The Atlassian Community is here for you.
Platform Notice: Server and Data Center Only — This article only applies to Atlassian products on the server and data center platforms .
Problem
Unable to clear indexing queue automatically, items sit in the queue even after:
You may also see this error:
Diagnosis
Environment
- Windows
- Server has both IPv4 and IPv6 enabled
Cause
The Java Virtual Machine (JVM) can have problems opening or closing sockets at the operating system level when both IPv4 and IPv6 are enabled on a Windows server.
Workaround
JVM will need to run over IPv4, if possible. To do this add this set the following JVM option:
Shutdown Confluence
Open /bin/setenv.bat
For Confluence 5.6 and later
Add the following below CATALINA_OPTS section
Save the file
Add the following below the JAVA_OPTS section
Save the file
Start Confluence
You may also need to adjust the prefix policy to prefer IPv4 over IPv6
If you are unfamiliar with the process you can refer to Microsoft’s Fix-its.
These Fix-its are provided by Microsoft and are not supported by Atlassian.