db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald McLean <dmclea...@gmail.com>
Subject Re: Unexplained problem
Date Wed, 23 Nov 2016 14:15:46 GMT
I'm starting the Derby server by spawning a process from a test (see
below), so I can't imagine how two copies could be getting started in this

I monitored the test while it was running and found only three java
processes running:

1. IDE
2. The test
3. The Derby server:
2530 84445 84438   0  9:08AM ??         0:27.71 /usr/bin/java -jar
/Users/dmclean/Library/java/db-derby- server

When my test spawns the "server shutdown", the "server start" process exits
shortly afterward, except that it prints a message on its STDOUT:

Wed Nov 23 09:09:25 EST 2016 : Invalid reply from network server:
Insufficient data

Something is definitely not working correctly and it would be really
helpful if I could figure out what the problem is.

val p = new ProcessBuilder("/usr/bin/java", "-jar",
"server", command)
val commandArray = p.command().toArray()
val commandList = commandArray.toList
logger.trace("[runDBCommand] command is: {}", commandList)

val now = new Date()
val outputFile = new File("derby" + dateFormat.format(now) + ".out")
p.redirectError(new File("derby" + dateFormat.format(now) + ".err"))

val result = p.start()

On Tue, Nov 22, 2016 at 10:22 AM, Bryan Pendleton <
bpendleton.derby@gmail.com> wrote:

> On 11/22/2016 7:14 AM, Donald McLean wrote:
>> it can't bind to the port one minute and then get connections the next?
> Perhaps you accidentally started two copies of the Network Server, in the
> same directory and (trying to) listen on the same port.
> Both servers are writing messages to the same derby.log file, but only one
> of them is successfully accepting connections; the other one may have
> tried to start, received the "can't bind" error, then quit?
> Perhaps use the 'ps' command to have a close look at which 'java'
> processes are running on your machine.
> Or be more thorough: reboot your machine, then start the Network Server,
> then check the ps command to make sure all is well, then shut it down,
> and see if it's acting better now?
> thanks,
> bryan

Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

View raw message