Page 1 of 1

FreeBSD + L2j = ERROR!

Posted: Tue Aug 04, 2009 11:21 am
by dimak08
When I use SoE or some skills, console sayd:

Code: Select all

SEVERE nextBytes() failedjava.security.ProviderException: nextBytes() failed        at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:270)        at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)        at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)        at java.security.SecureRandom.nextBytes(SecureRandom.java:433)        at java.security.SecureRandom.next(SecureRandom.java:455)        at java.util.Random.nextDouble(Random.java:394)        at net.sf.l2j.gameserver.lib.Rnd.get(Rnd.java:37)        at net.sf.l2j.gameserver.model.L2Character.teleToLocation(L2Character.java:471)        at net.sf.l2j.gameserver.model.L2Character.teleToLocation(L2Character.java:510)        at net.sf.l2j.gameserver.model.L2Character.teleToLocation(L2Character.java:515)        at net.sf.l2j.gameserver.handler.itemhandlers.ScrollOfEscape$EscapeFinalizer.run(ScrollOfEscape.java:210)        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)        at java.util.concurrent.FutureTask.run(FutureTask.java:138)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)        at java.lang.Thread.run(Thread.java:619)Caused by: java.io.InterruptedIOException        at java.io.FileInputStream.readBytes(Native Method)        at java.io.FileInputStream.read(FileInputStream.java:199)        at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)        at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:247)        at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)        ... 18 moreĀ 
OS: FreeBSD 7.1
Java:

Code: Select all

java version "1.6.0_07"Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

Re: FreeBSD + L2j = ERROR!

Posted: Tue Aug 04, 2009 11:22 am
by _DS_

Re: FreeBSD + L2j = ERROR!

Posted: Tue Aug 04, 2009 11:28 am
by dimak08
... When I disabled it, the bug was gone. ...
Where to find this option?

Re: FreeBSD + L2j = ERROR!

Posted: Tue Aug 04, 2009 11:41 am
by janiii
Character.properties, set RespawnRandomInTown to false.

Code: Select all

# This will allow random re-spawning in towns if enabled based on a maximum random offset from the base re-spawn coordinates.# DEFAULT NEEDS TO BE VERIFIED, MUST BE CHANGED HERE AND IN CONFIG.JAVA IF NOT CORRECT# Default: True, 50RespawnRandomInTown = TrueRespawnRandomMaxOffset = 50
or apply this patch:
http://diff.pastebin.com/f37b35a98


or what google found:
The problem seemed to be that the security provider used /dev/random as an
entropy generator, and it somehow wasn't working. By editing the
$JAVA_HOME/jre/lib/security/java.security file and changing the property:

securerandom.source=file:/dev/random

to:

securerandom.source=file:/dev/urandom

the problem disappeared for me. So there seems to be some issue with the
OS access to /dev/random. Hope this helps with your issue.