cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle to EDB migration using XDB

SOLVED
Level 3 Adventurer

Oracle to EDB migration using XDB

Hi Guys,

I have installed EDB Replication Server(version 6.20 using the interactive installer method on RHEL 7.5 machine.But facing issues while configuring the publication server(Oracle).Since its a linux machine with no GUI access,I am trying to configure it through runRepConsle.sh file.I have tried with java -jar as well.It shows below error.

 

[root@ip-172-31-2-48 ~]# su - enterprisedb
Last login: Tue Feb 12 04:41:08 EST 2019 on pts/0
-bash-4.2$ cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin
-bash-4.2$ java -jar edb-repconsole.jar -version
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at com.edb.replication.frontend.ui.Main.<init>(Main.java:199)
at com.edb.replication.frontend.ui.Main.main(Main.java:4703)
-bash-4.2$

 

I have tried exporting display,installed xming but still not able to figure out clear solution.Kindly suggest.

 

Thanks and Regards,

Manisha

Kindly suggest.

2 ACCEPTED SOLUTIONS

Accepted Solutions
EDB Team Member

Re: Oracle to EDB migration using XDB

Hi @manisha 

 
Control database has all the information related to publications, subscriptions etc which is created while installing XDB. 
Thus, installation of XDB should be completed without any errors, as this would avoid further issues.
Also, you need to take care that the control database is not tampered,else then starting and using XDB may become problematic.
 
Considering your scenario :
Your XDB installation is done on server 172-31-2-48, thus the services will also be on this server.
pubsvr.prop and subsvr.prop have details for connecting your publication and subscription servers.  Whereas the entries in your prop files is with IP 172.31.10.187 which means it is searching the services on 172.31.10.187 server, thus failing.
Add the IP of the server 172-31-2-48 in your prop files, and that would solve your problem. 
 
Hope this helps.
EDB Team Member

Re: Oracle to EDB migration using XDB

Hi @manisha,

 

As communicated by earlier, the Oracle JDBC driver needs to be placed at : XDB_HOME/lib/jdbc.

 

However, from the output shared by you, its placed at /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib.

 

Could you please place this jar under directory /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc and try again.

 

NOTE: You may also copy the ojdbc7.jar file to the jre/lib/ext subdirectory of the location where you installed your Java runtime environment.

 

Please get back to us in case of any issues/queries.

 

Regards,

Sudhir

 

18 REPLIES 18
Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Manisha,

 

The error you are facing 'No X11 DISPLAY variable was set, but this program performed an operation which requires it.' is not specific to the XDB installation error, whereas this is the common error when you are trying to execute installer on server which does not support UI mode.

 

Check with below steps if it could resolve :

1. Try to execute the command with sudo

2. Check what the value of the DISPLAY environment variable is:

echo $DISPLAY

3. If the value returned is blank or not the correct hostname, correct the DISPLAY value by exporting the DISPLAY environment variable. The syntax for this command is:

export DISPLAY=<hostname_to_display_X11_graphics_to>:0.0

 

Also, you can get the number of solutions regarding this error outside to try hands on this error

  

Silver Adventurer

Re: Oracle to EDB migration using XDB

Hi Manisha..

 

                  your doing through putty right..

1.you need to install Xming software(Free)

2.After installed click the putty icon.

3.go to the +SSH---->X11--->enable X11 forwarding(tick that option)

4.then going to session type address like same as before followed.

5.see if you facing agin these error.

                     export DISPLAY=oraprod-local-sin.com:0.0;     ----type and enter your os promt..

 

FYI

                 And which document you followd..can you please share the Document of XDB Replication's.

 

Thanks&Regards

Diny.

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

 Hi,

I have tried the available solutions of exporting the DISPLAY variable.It still gves me the same issue.

 

[root@ip-172-31-2-48 ~]# su - enterprisedb
Last login: Tue Feb 12 07:22:02 EST 2019 on pts/1
-bash-4.2$ echo $DISPLAY

-bash-4.2$ export DISPLAY=10.20.14.34:0.0
-bash-4.2$ cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin
-bash-4.2$ java -jar edb-repconsole.jar -version
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using '10.20.14.34:0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at com.edb.commons.i18n.I18NUtils.getAvailableChineseFonts(Unknown Source)
at com.edb.commons.i18n.I18NUtils.getPrefferedChineseFont(Unknown Source)
at com.edb.replication.frontend.ui.Main.loadFontSetting(Main.java:139)
at com.edb.replication.frontend.ui.Main.main(Main.java:4688)

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi,

 

I have tried even this.I am still not able to solve the issue.

 

[root@ip-172-31-2-48 ~]# su - enterprisedb
Last login: Tue Feb 12 07:22:02 EST 2019 on pts/1
-bash-4.2$ echo $DISPLAY

-bash-4.2$ export DISPLAY=10.20.14.34:0.0
-bash-4.2$ cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin
-bash-4.2$ java -jar edb-repconsole.jar -version
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using '10.20.14.34:0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at com.edb.commons.i18n.I18NUtils.getAvailableChineseFonts(Unknown Source)
at com.edb.commons.i18n.I18NUtils.getPrefferedChineseFont(Unknown Source)
at com.edb.replication.frontend.ui.Main.loadFontSetting(Main.java:139)
at com.edb.replication.frontend.ui.Main.main(Main.java:4688)

 

Below are the links referred:

https://get.enterprisedb.com/docs/EDB_Postgres_Replication_Server_Users_Guide_v6.2.pdf

https://blog.dbi-services.com/replicating-from-oracle-to-postgresql-with-edb-replication-server-1-a-...

https://www.enterprisedb.com/docs/en/6.1/repguide/EDB_Postgres_Replication_Server_Users_Guide.1.12.h...

 

I have tried installation using rpm as well as interactive installer.Both shows me the same error.Kindly suggest.

 

Thanks and Regards,

Manisha

 

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Team,

 

I started to use th edb-repcli.jar file on my linux box.Now its not asking for any DISPLAY variable.But its still not able to connect to oracle source.Kindly suggest.I have allowed the ports required as well.

 

[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# java -jar /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/edb-repcli.jar -paramfile addpubsvr
Adding publication database...
Error: Unable to connect to publication service.
Reason:Connection refused to host: 172.31.10.187; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
Error: Publication service is not available.
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# more addpubsvr
-addpubdb -repsvrfile pubsvr.prop -dbtype oracle -dbhost 172.31.10.187 -dbport 1521 -dbuser pubuser -dbpassword uQ5vWL7WGWte6DtjiBjD4w== -oraconnectiontype sid -databa
se ORCL
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# more pubsvr.prop
user=pubuser
password=uQ5vWL7WGWte6DtjiBjD4w==
port=9051
host=172.31.10.187
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]#

 

Kindly suggest.

 

Thanks and Regards,

Manisha

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Manisha,

 

Good to hear that you came out of previous error. Regarding the error you are facing now, xDB server is unable to connect to publication database/publication server. Can you help us to identify your xDB setup

 

1. Have you configured the xDB server, Publication server and Subscription server on a single host

2. publication database on one host and subscription database on another host, is it?

3. From the logs shared, we can see that you are using the same host (172.31.10.187) as publication database and publication server, is it?

 

Please confirm us on above points.

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

HI Ranjan,

Below are responses for the queries:

1. Have you configured the xDB server, Publication server and Subscription server on a single host

---Yes

2. publication database on one host and subscription database on another host, is it?

---Yes

Oracle and EDB Postgres servers are different.XDB is configured on the EDB Postgres server.

3. From the logs shared, we can see that you are using the same host (172.31.10.187) as publication database and publication server, is it?

---I am not sure of this.Are the publication database and server to be different or same??

 

It will be good to have any links or docs for xdb replication configuration using edb-rep-cli.jar.Please provide if any as I am not able to find any relevant docs for the same.Kindly help.

Highlighted
Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Manisha, 

 

You can go through the link EDB Postgres™ Replication Server 6.2 for more details.

 

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Ranjan,

 

I was following the same link as suggested.

https://www.enterprisedb.com/docs/en/6.0/repguide/EDB_Postgres_Replication_Server_Users_Guide.1.59.h...

Still unable to add or configure the publication or subscription database.Need some clear understanding on the concepts and configuration steps using the cli.Please suggest.

 

[root@ip-172-31-2-48 bin]# ./runRepConsole.sh
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at com.edb.replication.frontend.ui.Main.<init>(Main.java:199)
at com.edb.replication.frontend.ui.Main.main(Main.java:4703)
[root@ip-172-31-2-48 bin]# cd ..
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# java -jar /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/edb-repcli.jar -printpublist -repsvrfile pubsvr.prop
Printing publications ...
Error: Unable to connect to publication service.
Reason:Connection refused to host: 172.31.10.187; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
Error: Publication service is not available.
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]#