Closed codekaust closed 5 years ago
@codekaust I will have a look at this in the next few hours
This is now fixed. There were problems in your dockerfile and the postgres init script. Mainly you did not create the correct users and so on so that the database dump was not put in the container. You should always look at the logs of your containers if running in detached mode, i.e.,
docker container logs adb
Shows you what went wrong.
Also always run pg_restore
with the -v
or --verbose
flag to make sure things work.
After creating the container your should test if you can connect to the database. I did this with idea.sh data sources (see below)
You can see the data in the docker container image
Also don't map the ports in the docker files! only expose what must be exposed, i.e., 5432 in case of postgres
In summary, your scripts for restoring the db did not work, this is fixed now.
Thank You @matthiaskoenig! I will take care of your suggestions.
Above is not the solution for this issue. REASON: ModelPolisher is querying biggdb.
Could you explain what the issue is? The relations are in the database, you just have to query them. If the issue is that ModelPolisher is not using the annotatedb relations then you should open a respective issue. But the relations are there and can be queried which fixes your issue description.
Yes, the problem is not in ADB or in setting up of ADB by docker. The issue is somewhere in the connection of ModelPolisher with ADB container. I am trying to understand and resolve this issue, will update if I find anything.
PostgreSQLConnector psqlConnect = new PostgreSQLConnector(adb_host, new Integer(adb_port), adb_user, adb_passwd != null ? adb_passwd : "", adb_dbName);
logger.info(psqlConnect.isConnected()+"");
adb = new AnnotateDB(psqlConnect);
2nd line gives result true. Get by adding log here.
It seems to me this is a problem of ADB.
No, it was a problem with SQLConnector only as I have mentioned in the above comments.
Current code in
feat/annotatedb
is not able to find relations inadb
. You can recreate error by building lightJar and running these commands: