Hello Alexey,

If jre 1.5.0 does access /dev/random despite otherwise configured, this seems 
to me a jdk problem.

In http://java.sun.com/j2se/1.5.0/relnotes.html they state that you should use 
the configuration 
file. You may experiment with a non-existent file set in this property, as they 
tell there is
a java-only fallback used if the file cannot be read.

The softlink is not a good idea because other applications that want 
/dev/random do now not really
get what they want ...

Regards
Alexander Schröder

-----Original Message-----
From: Alexey Gaidukov [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 17. Januar 2006 02:48
To: Schroeder, Alexander
Cc: maxdb@lists.mysql.com
Subject: Re: jdbc driver freezes in connect under linux

Yesterday I tested jre-1.4.2. In java.security was line

securerandom.source=file:/dev/random

Now in jre-1.4.2 I can't reproduce the problem. But in jre-1.5.0 line is 
already

securerandom.source=file:/dev/urandom

and problem there is.


But after the following commands the problem is not reproduceable in 
jre-1.5.0.
rm /dev/random
ln -s /dev/urandom /dev/random

But I guess it is not good idea.


Thanks in advance,
Alexey Gaidukov.

Schroeder, Alexander пишет:
> Hello Alexey,
>
> there seems to be an issue with the secure random device /dev/random
> on Linux if there isn't enough entropy available. It will then block.
>
> You need to set in $JAVA_HOME/jre/lib/security/java.security the
>
> securerandom.source=file:/dev/random
>
> to 
>
> securerandom.source=file:/dev/urandom
>
> (/dev/urandom is the non-blocking companion of /dev/random).
>
> Then it should work.
>
> Regards
> Alexander Schröder
> SAP DB, SAP Labs Berlin
>
>
> -----Original Message-----
> From: Alexey Gaidukov [mailto:[EMAIL PROTECTED] 
> Sent: Montag, 16. Januar 2006 11:12
> To: maxdb@lists.mysql.com
> Subject: jdbc driver freezes in connect under linux
>
> JDBC 7_6_00_16_4753. MaxDB 7.6.00.16 linux 32 and 64 bit. On client side 
> linux kernels 2.6.14-1.1653_FC4smp and 2.6.14.4 from kernel.org were 
> tested. Tested java runtime: jre-1.5.0-6, jre-1.5.0-4 and j2sdk1.4.2_10.
>
>
> When I run the following simple application then this application is 
> freezed in "getConnection" and will waiting keyboard events. If there is 
> no keyboard events then waiting can be very long. I'm waiting about half 
> of hour. If to connect with NetBeans debugger then jre is waiting in 
> com.sap.dbtech.util.security line 50 ( "while (true)" line). I have this 
> problem with all programs on linux with JDBC driver - sync manager 
> message server, sync manager GUI and other. In GUI programs mouse events 
> can help. In console program only keyboard events can help. If I connect 
> to linux with scp or telnet then nothing can help and waiting time is 
> random.
>
>
> package javaapplication3;
> import java.sql.*;
> public class Main {
>     static final java.util.Properties connectionInfo = new 
> java.util.Properties();
>     public Main() {}
>     public static void main(String[] args) {
>         try {
>             String driver = "com.sap.dbtech.jdbc.DriverSapDB";
>             String url = "jdbc:sapdb://maxdb/DCDB";
>             Class.forName(driver);
>             connectionInfo.put("driver", driver);
>             connectionInfo.put("url", url);
>             connectionInfo.put("user", "GIS");
>             connectionInfo.put("password", "1");
>             Connection connection = DriverManager.getConnection(url, 
> connectionInfo);
>             System.out.println("connection:"+connection);
>         }
>         catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
>
>
>   


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to