Connect OpenEdge database remotely

Posted by nikhil@ranosys.com on 21-Feb-2018 07:45

I have subscribed for 60 days tril of Progress OpenEdge RDBMS (cloud)) to explore it for my upcomming project.

I have created my database there and started using proserve command.

Now I want to connect to this database in my JAVA application using JDBC connection from a remote machine. But I am unable to connect. My JDBC connection string is below:

jdbc:datadirect:openedge://ec2-54-147-132-36.compute-1.amazonaws.com:6786;databaseName=testdata

and I am getting this error:

java.sql.SQLNonTransientConnectionException: [DataDirect][OpenEdge JDBC Driver]Error establishing socket to host and port: ec2-54-147-132-36.compute-1.amazonaws.com:6786. Reason: Connection timed out: connect
	at com.ddtek.jdbc.openedgebase.ddb9.b(Unknown Source)
	at com.ddtek.jdbc.openedgebase.ddb9.a(Unknown Source)
	at com.ddtek.jdbc.openedgebase.ddb8.b(Unknown Source)
	at com.ddtek.jdbc.openedgebase.ddb8.a(Unknown Source)
	at com.ddtek.jdbc.openedge.OpenEdgeImplConnection.j(Unknown Source)
	at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)
	at com.ddtek.jdbc.openedgebase.BaseConnection.k(Unknown Source)
	at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)
	at com.ddtek.jdbc.openedgebase.BaseConnection.a(Unknown Source)
	at com.ddtek.jdbc.openedgebase.BaseDriver.connect(Unknown Source)
	at java.sql.DriverManager.getConnection(DriverManager.java:664)
	at java.sql.DriverManager.getConnection(DriverManager.java:247)
	at JDBCConnection.main(JDBCConnection.java:15)

All Replies

Posted by James Palmer on 21-Feb-2018 08:08

Great you're giving this a trial. In the testdata.lg file, can you grep for the last occurrence (333) and post the next 100-150 lines or so. That will give us the database startup parameters and may well help us pinpoint problems.

Posted by Valeriy Bashkatov on 21-Feb-2018 08:11

It is looks like database port 6786 is not open in the firewall of arcade instance.

Posted by Roy Ellis on 21-Feb-2018 08:26

When connecting remotely to an OpenEdge database you will need to open more then just database broker port.  The initial request goes to the broker port (looks like 6786 in this case) but the broker then redirects you to a database server running on a different port.  The database broker will start the server for remote connections when needed by default.

You can control the database server ports my using -minport portnumber and -maxport portnumber when starting the database.

If you don't set the minport and maxport, the servers will start at the lowest available port and move up to the next available port when the next server is needed. The portnumbers will be unpredictable.

So, when running in AWS, I would recommend using the -minport and -maxport and opening the ports for your database broker and the port range defined by -minport and -maxport.

Roy

Posted by e.schutten on 21-Feb-2018 08:44

Roy, in case of multiple databases on the same server; should every database has his own unique -minport and -maxport?

Posted by Roy Ellis on 21-Feb-2018 08:55

I would say yes, but I guess it isn't required.

From an administration point of view, I would want to know what port ranges are for what database. So if I am having a problem with people connecting to just one of the databases I could narrow the search.

There is also a possibly small performance hit. If you are starting several databases on the same large minport and maxport range, each servers started would start at the minport and work up until it finds a free port to attach to.

Lastly there is a security concern. If I am running in a cloud I would want all ports open in the firewall to have a process connected to that port.  So have a large list of open ports which don't have a process connected is problematic. Having smaller ranges and having the servers automatically start when the database starts would make it safer.  

Does that help?

Roy

Posted by e.schutten on 21-Feb-2018 09:10

Yes, thanks Roy.

Posted by nikhil@ranosys.com on 22-Feb-2018 00:05

On evaluation cloud I was not able to copy the logs so providing screenshots of last 2 pages

Posted by nikhil@ranosys.com on 22-Feb-2018 00:25

I tried using minport and maxport but setting same error.

I also tried ping on this evaluation server but getting timeout. So I think on this evaluation server they have restricted any incoming connection. Please confirm if any anyone is aware about this.

Thanks

Posted by Valeriy Bashkatov on 22-Feb-2018 01:26

[quote user="nikhil@ranosys.com"]

I also tried ping on this evaluation server but getting timeout. So I think on this evaluation server they have restricted any incoming connection. Please confirm if any anyone is aware about this.

[/quote]

Are you use Progress Arcade (SHOWROOM) as/for evaluation server?
http://arcade.progress.com/

Posted by jcb@wss.com on 22-Feb-2018 07:58

Ping isn't always a good indicator to check if you can communicate with the server  - Firewall rules can block ICMP echo (ping response). A quick test to check if you can connect to a broker or a server is to use:

    telnet <ip> <port>  

    ex: telnet 192.168.1.83 5678

if you can't connect, telnet will give you an error message:

   Connecting to 192.168.1.83..... Could not open connection to the host, on port 5678

If you can - a 'blank' window with a cursor will be displayed.

Knowledge Base:

How to test TCP communication with Java

knowledgebase.progress.com/.../P131422

How to use telnet to troubleshoot network connection problems

knowledgebase.progress.com/.../16946

How to use PROMON to find the port used by the database Broker at startup

knowledgebase.progress.com/.../P6689

Posted by Roy Ellis on 22-Feb-2018 08:54

Great question, are you using Arcade Showroom?  If so, you can't open ports to the machine. These machines only have Remote Desktop Access and no other ports are open.  So everything must be run on the machine.

Let me know,

Roy

Posted by nikhil@ranosys.com on 22-Feb-2018 11:30

yes, I think that is the reason that I am not able to connect.

Now I have installed evaluation in my local environment and created database and started. This time I am getting different error and it is related to authentication because I don't know what are default user account to connect newly created database.

I have created my database using Data Administrator and that time it didn't asked for any user account for database connection in future. I have also tried providing my windows login id (which is configured in my windows 10 machine where I am doing all this) because on some articles and forums that was suggested but this also didn't worked.

Please suggest which username and password should I use connect using JDBC. Blow is the error I am getting right now:

java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Access denied(Authorisation failed)

at com.ddtek.jdbc.openedge.client.ddd.aw(Unknown Source)

at com.ddtek.jdbc.openedge.client.ddd.j(Unknown Source)

at com.ddtek.jdbc.openedge.OpenEdgeImplConnection.j(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.k(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.a(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at JDBCConnection.main(JDBCConnection.java:15)

Posted by Andriy Mishin on 22-Feb-2018 20:27

Hi,

This article should help you


четверг, 22 февраля 2018 г., 20:31 +0300 от bounce-nikhilranosyscom@community.progress.com <bounce-nikhilranosyscom@community.progress.com>:
Update from Progress Community
nikhil@ranosys.com

yes, I think that is the reason that I am not able to connect.

Now I have installed evaluation in my local environment and created database and started. This time I am getting different error and it is related to authentication because I don't know what are default user account to connect newly created database.

I have created my database using Data Administrator and that time it didn't asked for any user account for database connection in future. I have also tried providing my windows login id (which is configured in my windows 10 machine where I am doing all this) because on some articles and forums that was suggested but this also didn't worked.

Please suggest which username and password should I use connect using JDBC. Blow is the error I am getting right now:

java.sql.SQLException: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Access denied(Authorisation failed)

at com.ddtek.jdbc.openedge.client.ddd.aw(Unknown Source)

at com.ddtek.jdbc.openedge.client.ddd.j(Unknown Source)

at com.ddtek.jdbc.openedge.OpenEdgeImplConnection.j(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.k(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.b(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseConnection.a(Unknown Source)

at com.ddtek.jdbc.openedgebase.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at JDBCConnection.main(JDBCConnection.java:15)

View online

 

You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

Flag this post as spam/abuse.

This thread is closed