You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by ex...@nokia.com on 2008/09/18 18:55:50 UTC
Derby replication
I am trying to test derby replication feature using two windows xp
boxes. When I tried to connect from the master derby to the slave derby
using this
connect
'jdbc:derby://localhost:1527/repldb;startMaster=true;slaveHost=slace_box
_name';
I got the connection error "XRE04.U.1". Did anybody ever use this derby
replication feature?
I need to add '-h 0.0.0.0' to start derby to allow other machine to
access to my derby db at port 1527. How to allow other machine to access
to the port 4851 - default replication port?
Thanks!
JB (Jiabing) Wang
(c) 978-435-1050
(c) 508-202-2906
(e) ext-jb.wang@nokia.com
Re: Derby replication
Posted by Kristian Waagan <Kr...@Sun.COM>.
ext-jb.wang@nokia.com write:
>
> I am trying to test derby replication feature using two windows xp
> boxes. When I tried to connect from the master derby to the slave
> derby using this
>
> connect
> 'jdbc:derby://localhost:1527/repldb;startMaster=true;slaveHost=slace_box_name';
>
>
> I got the connection error "XRE04.U.1". Did anybody ever use this
> derby replication feature?
>
> I need to add '-h 0.0.0.0' to start derby to allow other machine to
> access to my derby db at port 1527. How to allow other machine to
> access to the port 4851 - default replication port?
>
Hello,
I think Narayanan suggested this issue in his answer, but can you tell
us whether you specify the slaveHost attribute when you start the slave?
If not, the slave will listen to the localhost interface and will not be
able to accept the connection from the master.
You also have to get the server security policy file right (if you're
running under a security manager, which you should).
Another good suggestion is to look in the derby.log file for more
detailed error messages when something goes wrong.
hope this helps,
--
Kristian
>
> Thanks!
>
> JB (Jiabing) Wang
> (c) 978-435-1050
> (c) 508-202-2906
> (e) ext-jb.wang@nokia.com
>
Re: Derby replication
Posted by Narayanan <V....@Sun.COM>.
Hi,
Yes, I have used the derby replication feature before, I have however
have not tried between two
windows boxes though. One thing I know is that to make derby replication
work, I need to do
the same thing between the master and a slave that I would do between a
Derby client and a
Derby server. The basic network interface is sockets. So the network
setup is the same.
So basically you could try setting the slavehost property to what you
set -h to.
You can find information on how to set the slave host property here,
http://db.apache.org/derby/docs/dev/ref/rrefattribslavehost.html
Here are some resources for you (copy pasted from here
http://www.nabble.com/apache-derby-REPLICATION-td16914359.html)
- The wiki page: http://wiki.apache.org/db-*derby*/*ReplicationWriteup*
<http://wiki.apache.org/db-derby/ReplicationWriteup>
- The *Derby* Server and Administration guide: (for example)
http://db.apache.org/*derby*/*docs*/dev/adminguide/cadminreplication.html
<http://db.apache.org/derby/docs/dev/adminguide/cadminreplication.html>
- The release notes & download page for the new release:
http://db.apache.org/*derby*/releases/release-10.4.1.3.cgi
<http://db.apache.org/derby/releases/release-10.4.1.3.cgi>
- Current unresolved issues relating to *Replication* (includes bugs and
improvement requests): http://tinyurl.com/4jkxkh
Narayanan
ext-jb.wang@nokia.com wrote:
>
> I am trying to test derby replication feature using two windows xp
> boxes. When I tried to connect from the master derby to the slave
> derby using this
>
> connect
> 'jdbc:derby://localhost:1527/repldb;startMaster=true;slaveHost=slace_box_name';
>
>
> I got the connection error "XRE04.U.1". Did anybody ever use this
> derby replication feature?
>
> I need to add '-h 0.0.0.0' to start derby to allow other machine to
> access to my derby db at port 1527. How to allow other machine to
> access to the port 4851 - default replication port?
>
>
> Thanks!
>
> JB (Jiabing) Wang
> (c) 978-435-1050
> (c) 508-202-2906
> (e) ext-jb.wang@nokia.com
>
Re: Derby replication
Posted by Jørgen Løland <Jo...@Sun.COM>.
Hi JB,
You didn't tell whether or not you run Derby with the security manager
enabled. If you do, you have to grant the server sufficient socket
permissions as described in the Derby Server and Admin Guide here:
http://db.apache.org/derby/docs/10.4/adminguide/cadminreplicsecurity.html
If neither of these tips are of any use, it would be much easier to
suggest solutions if you give more details. Especially, derby.log should
contain more information on what went wrong.
Regards,
Jørgen Løland
ext-jb.wang@nokia.com wrote:
>
> I am trying to test derby replication feature using two windows xp
> boxes. When I tried to connect from the master derby to the slave
> derby using this
>
> connect
> 'jdbc:derby://localhost:1527/repldb;startMaster=true;slaveHost=slace_box_name';
>
>
> I got the connection error "XRE04.U.1". Did anybody ever use this
> derby replication feature?
>
> I need to add '-h 0.0.0.0' to start derby to allow other machine to
> access to my derby db at port 1527. How to allow other machine to
> access to the port 4851 - default replication port?
>
>
> Thanks!
>
> JB (Jiabing) Wang
> (c) 978-435-1050
> (c) 508-202-2906
> (e) ext-jb.wang@nokia.com
>