Comments (7)
Hi Kaifuxu,
thanks for hinting me at this. I could not reproduce the "Protocol not
available" error, but on OS X I was able to get an "invalid argument" error in
some cases.
This happens if the socket is closed before Socket#setSoTimeout gets called,
for example when the server decides to block the request.
In SVN trunk, I have added a new JUnit testcase (SoTimeoutTest) to trigger the
problem.
Please let me know if that testcase fails for you.
Best,
Christian
Original comment by ckkohl79
on 20 Jul 2010 at 7:51
- Changed state: Started
from junixsocket.
Original comment by ckkohl79
on 20 Jul 2010 at 8:14
- Added labels: Milestone-Release1.3
from junixsocket.
I got Milestone-Release1.3 from svn and it works~
thanks for your great work~
Original comment by [email protected]
on 22 Jul 2010 at 2:02
from junixsocket.
Thanks for the feedback, kaifuxu.
Does this mean that, using the SVN trunk, you cannot reproduce the "protocol
not available" error? Or will this error only occur if the socket was closed
prematurely?
Best,
Christian
Original comment by ckkohl79
on 22 Jul 2010 at 10:19
from junixsocket.
[deleted comment]
from junixsocket.
Hi, Christian
I did as below on Ubuntu Desktop 10.04 and SuSE Enterprise Server 10.2 ~
# wget http://junixsocket.googlecode.com/files/junixsocket-1.2-bin.tar.bz2
# tar -xf junixsocket-1.2-bin.tar.bz2
# mkdir -p /opt/newclub/lib-native
# chmod +x junixsocket-1.2/lib-native/libjunixsocket-linux-1.5-i386.so
# cp junixsocket-1.2/lib-native/libjunixsocket-linux-1.5-i386.so
/opt/newclub/lib-native
and run my program, then the error happened.
so I checked out the source from svn :
# rm -fr /opt/newclub
# svn co http://junixsocket.googlecode.com/svn/trunk/junixsocket .
# ant -Djdk.home=/usr/lib/jvm/java-6-sun -Dgcc=/usr/bin/gcc gcc-linux.32
# mkdir /root/lib-native
# cp lib-native/libjunixsocket-linux-1.5-i386.so /root/lib-native/
and added the following line into my java source:
System.setProperty("org.newsclub.net.unix.library.path","/root/lib-native");
then no error occured
My Java Souce Code:
import java.io.File;
import org.newsclub.net.unix.AFUNIXSocket;
import org.newsclub.net.unix.AFUNIXSocketAddress;
public class Test {
public static void main(String[] args) throws Exception {
System.setProperty("org.newsclub.net.unix.library.path","/root/lib-native");
File socketFile = new File("/tmp/fcgi.socket");
AFUNIXSocket sock = AFUNIXSocket.newInstance();
sock.connect(new AFUNIXSocketAddress(socketFile));
sock.setSoTimeout(12000);
sock.close();
}
}
Best,
kaifuxu
Original comment by [email protected]
on 26 Jul 2010 at 2:34
from junixsocket.
Thanks, kaifuxu.
Considerung this bug fixed in 1.3. Closing.
Original comment by ckkohl79
on 10 Aug 2010 at 5:48
- Changed state: Verified
from junixsocket.
Related Issues (20)
- connection errors can leak sockets (file handles) HOT 6
- Sockets not actually closing HOT 3
- IOException when using BufferedReader.readLine() HOT 3
- typo error in build.xml HOT 2
- Inpustream don't implement the available() function HOT 3
- Wrong mapping of java.net.SocketOptions values into NativeUnixSocket.c HOT 5
- Build should not assume isLinux can build -m64 HOT 1
- Request: option to not unlink the socket on close HOT 3
- Allow specifying the native lib location via LD_LIBRARY_PATH HOT 1
- expectBoolean for SO_SNDBUF value HOT 1
- Support SO_PEERCRED socket option HOT 2
- Native library fails to load on rhel4 32-bit when crosscompiled from rhel5 64-bit HOT 1
- Potential memory corruption in native read/write functions HOT 2
- Warning message during build: 'includeantruntime' was not set...
- SocketTimeout not handled properly HOT 1
- Add project libraries to maven repository HOT 2
- accept() does not throw SocketException on close() HOT 1
- Java security fix breaks junixsocket RMI HOT 2
- Multithreading HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from junixsocket.