[ckan-discuss] Help! Sqlalchemy "could not connect to server: connection refused"

David Read david.read at hackneyworkshop.com
Sat Oct 5 09:23:26 BST 2013


Sara-Jayne,

If it's all running on the same machine (which I believe you are) then
the usual thing would be to use 'localhost' instead of '162.243.14.80'
in the sqlalchemy.url (and indeed the solr_url but that is not related
to your current error message). So try that and see how you do.

You can test postgres from the command-line without CKAN. You should
be able to start psql like this:

$ psql -h localhost -U ckan_default -W ckan_default

then enter your postgres password at the prompt and you should get the
psql command-line, rather than errors.

If that still doesn't work then next would be to delve into postgres's
pg_hba.conf.

David

On 4 October 2013 23:56, Sara-Jayne Terp <sara.farmer at btinternet.com> wrote:
> Hi all,
>
> I'm installing CKAN on digitalocean.com, and running into a spot of bother.
>
> When I get to "sudo ckan db init", I get the error message:
>
> Sqlalchemy "could not connect to server: connection refused. Is the server
> running on host 162.243.14.80 and accepting connections on port 5432?"
>
> When I change sqlalchemy.url to
> postgresql://ckan_default:mypassword@localhost/ckan_default, I get
> "Initialising DB: Success" but nothing but the server default page on
> http://162.243.14.80/
>
> Does anyone have any hints about what might be going wrong here?  I've
> beaten my head against this issue for hours now, and I'm really hoping that
> someone else has had similar issues (and fixes!) before.
>
>
> Sj.
>
> PS my CKAN setup so far:
>
> I have Ubuntu 12.04 64-bit set up, and am working through the package
> install instructions
> http://docs.ckan.org/en/latest/install-from-package.html. I've created
> database ckan_default and user ckan_default as per the instructions.
>
> My digitalocean.com setup is:
>
> IP Address: 162.243.14.80
> Gateway: 162.243.14.1
> Netmask: 255.255.255.0
>
> The (possibly) relevant lines of /etc/ckan/default/production.ini are:
>
> host = 0.0.0.0
> port = 5000
> sqlalchemy.url =
> postgresql://ckan_default:mypassword@162.243.14.80/ckan_default
> ckan.site_url = http://162.243.14.80
> solr_url = http://162.243.14.80:8983/solr
>
>
>
>
>
> _______________________________________________
> ckan-discuss mailing list
> ckan-discuss at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-discuss
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
>



More information about the ckan-discuss mailing list