opencog / docker

Docker containers for OpenCog - Robot Operating System (ROS)
Other
75 stars 73 forks source link

configure-database.sh failure #38

Closed pennachin closed 9 years ago

pennachin commented 9 years ago

I'm following the steps in the opencog folder readme. After I call

docker-compose run --service-ports dev

this is what I get from the configure-database.sh script:

opencog@fa93844c7bf9:~$ ~/configure-database.sh
psql: could not translate host name "db" to address: Name or service not known
psql: could not translate host name "db" to address: Name or service not known
cat: /opencog/opencog/persist/sql/atom.sql: No such file or directory
psql: could not translate host name "db" to address: Name or service not known
psql: could not translate host name "db" to address: Name or service not known
psql: could not translate host name "db" to address: Name or service not known
cat: /opencog/opencog/persist/sql/atom.sql: No such file or directory
psql: could not translate host name "db" to address: Name or service not known

The atom.sql file is now in the atomspace project, but I don't know what causes the db address issue.

Then, after exiting the container, subsequence calls to docker-compose run fail:

cassio@opencog:~/opencog/docker/opencog$ docker-compose run --service-ports dev
Starting opencog_postgres_1...
Cannot start container 621523308b4c0f26547e18c17f9c57469463f126148dba879f806add7d01f0d0: Cannot link to a non running container: /opencog_postgres_1 AS /opencog_dev_run_2/db
amebel commented 9 years ago

https://github.com/opencog/docker/pull/39 fixes the issue with the atom.sql.

For the rest, what version of docker-compose and docker do you have?

pennachin commented 9 years ago

Thanks for the help. I'm familiar with Docker but haven't used docker-compose before. See below:

cassio@opencog:~/opencog/docker/opencog$ docker --version
Docker version 1.7.0, build 0baf609
cassio@opencog:~/opencog/docker/opencog$ docker-compose --version
docker-compose version: 1.3.0
CPython version: 2.7.6
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
amebel commented 9 years ago

since you have the latest version, that is not issue. If you had used docker-compose version 1.2.0 try https://docs.docker.com/compose/install/#upgrading , if not remove all of your containers docker rm -v $(docker ps -aq), ofcourse you can cherry-pick them to.

pennachin commented 9 years ago

Ah, this was caused by my running docker-compose on a shared filesystem (I use a VM which mounts my ~/opencog dir from the host, and all repos are cloned into that). For some reason this led to permission issues with the postgres data dir. So running from my home folder, coupled with #39, seems to fix it. Thanks!