Multi-User Ubuntu Installation - Communication Link Failure

Post Reply
gantyala
Posts: 16
Joined: 22 Jun 2012, 20:33

Hi,

I have been struggling to fix the following error when converting the .pprj to MySQL database. Need your help in resolving this problem.

"The driver was found but it is not possible to create a connection with the driver URL
Perhaps the URL syntax is wrong or the Username/password is Invalid. Communication Link Failure"

there is another post that talks about the same issue. As per the note, I have increased the heap size memory to 800Mb. But still no luck.

The following versions are installed on the Ubuntu Linux server:
Protege 3.4.8 Build 629
Java 1.6.0_24-b24
JDBC Driver 5.1.21
MySQL 5.5 Server

The run_protege.sh gives the following message:
memory=503Mb, encoding=utf-8

No exceptions shown on the console.

I thought of it could be memory issue for the essential baseline pprj. So I tried with an example project newspaper.pprj. But still I get the same error.

Please let me know if you need any further information.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

I had a similar problem recently with SQLServer and it turned out I had a typo in the JDBC URL. These are really sensitive in terms of the syntax, so you have to get it right.

It sounds like there's something basic with the connection to the database (like my mistake above!) at work, here.

Some questions:
  • Have you created an empty database in MySQL in which you plan to store your Essential repository?
  • Have you created a user ID in MySQL that has write and create access to this new database? I would recommend that the database be empty.
  • Is the database server for MySQL co-located with the Protege server? That is, are they both running on the same server? If not, you need to replace "localhost" with the hostname of the server on which MySQL is running in the JDBC URL.
  • Is your MySQL database server running on the default IP port (3306)? If not, you'll need to update the URL to reflect this
  • Have you got the URL syntax correct. For MySQL, this should be:
    jdbc:mysql://localhost:3326/essentialdb
    to access a database called 'essentialdb' in a MySQL server running on the local host on the port 3326. If you're using the default port, you can omit that, so the example would be:
    jdbc:mysql://localhost/essentialdb
    Protege should present a valid default driver in the convert to Protege Database dialog but be careful to include all the ':' and '/' characters in the URL pattern.
Check the Protege Server log files for any errors as well as the console.

I think you are going to need to edit run_protege_server.sh to increase the maximum memory to something like 2048MB (depending on your environment, e.g. 32-bit Windows will only allow 1600MB) but as you say, this is not the immediate problem.

Let me know more about the JDBC URL and driver values that you are using as per the questions, above and we can take it from there.

Jonathan
Essential Project Team
gantyala
Posts: 16
Joined: 22 Jun 2012, 20:33

Jonathan,

I wrote a simple JDBC connector java program to narrow down the error. That test program gave similar error what I was saw with Protege. For some reason, MySQL didn't like the hostname name "localhost" in the URL. May be because of access polices in MySQL. After changing the "localhost" to actual hostname in URL, I am able to load the essential meta-model into MySQL database.

Now, I am able to connect the Protege Server from remote. But I have few questions:
1. How do I know that the Protege Server is making changes in the database?
2. In the server log there is WARNING message:
"Missing project at "/opt/.../annotation_essential_baseline_v..pprj". Did I miss anything?

Following steps were taken on Server side:
1. Edited the metaproject to point to the essential repository.
2. Edit METAPROJECT in the run_protege_server.sh to point to essential "metaproject".
3. On server, I opened the essential_baseline and selectd "Convert Protect to Format to Protege Database".
4. Started the "Protege Server"

On Client side, the following steps were taken:
1. Connected to Server
2. Selected the "Essential ..."
3. Shows the EA_CLASS

Thanks
Ramesh
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

That all looks just fine - glad you got to the bottom of the JDBC connection error.

You can use the MySQL tools to explore the database table and see how things are added to it. Otherwise, Protege Server writes every change back to the database as you make it. Occasionally, this means that you can temporarily see <<deleted-instance>> in the Protege client but as the changes are committed to the database these go. Even in stand-alone mode, the repository is updated in the database as you make them. There is no explicit "save" that you have to do.

On the warning message that you're getting, that is telling you that it cannot find the Protege project that manages the Changes Ontology. You only need that ontology if you are using Collaborative Protege to track ALL the changes to the repository.

There is an interesting post about the management / house-keeping of this ontology that is required.

Assuming that you are using the starter-for-10 metaproject that we provide, this contains a project definition for the Essential repository and one for the changes ontology. You can either ignore this warning or remove the Annotations Project definition from the metaproject and restart Protege server. Either way, you should see no impacts from this warning, so it may be best to leave the Annotations Project prototype in there in case you decide to look at the Collaborative Protege capabilities.

Jonathan
Essential Project Team
gantyala
Posts: 16
Joined: 22 Jun 2012, 20:33

Thanks for the quick response.

I will explore with MySQL tool.

But on the server console, I see message "Loading project Essential AM Repository from file /opt/.../essential_baseline_v3.0.4.pprj"

I am wondering why the Protege Server still using the file instead of the database.

Thanks
Ramesh
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Protege still needs the project file to manage where the classes and instances are stored and also all the forms and layout configuration. The PPRJ file is the meta data about the project and the contents of it, that are stored in the ontology (.PONT) and instances (.PINS) files in a Protege Files-based repository, are now in the database table in MySQL.

Note that there is one table in the database per Protege project.
The meta project uses the PPRJ file (although it does not update it) to connect to the database and get the contents of the repository

Hope this helps

Jonathan
Essential Project Team
gantyala
Posts: 16
Joined: 22 Jun 2012, 20:33

Now I understand how it works. Thanks a lot!
Post Reply