Hi Mario,

I haven't seen any bugs with database connections in Django. It really just
looks like the database either isn't running, isn't listening to that port,
can't be accessed due to a firewall issue, or isn't listening on 127.0.0.1.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Nov 29, 2012 at 5:34 AM, Mario Zivic <mario.zi...@gmail.com> wrote:

> Hello everybody,
>
> I just tried to perform fresh install of ReviewBoard on fresh VM
> installation of CentOS and I got stuck on getting database connection to
> work.
>
> Here is the error message:
>
>> OperationalError at /
>>
>> could not connect to server: Connection refused
>>      Is the server running on host "127.0.0.1" and accepting
>>      TCP/IP connections on port 5432?
>>
>> Request Method:GETRequest URL: http://172.17.92.81/Django Version: 
>> 1.3.4Exception
>> Type:OperationalError Exception Value:
>>
>> could not connect to server: Connection refused
>>      Is the server running on host "127.0.0.1" and accepting
>>      TCP/IP connections on port 5432?
>>
>> Exception Location:/usr/lib/python2.6/site-packages/psycopg2/__init__.py
>> in connect, line 179 Python Executable:/usr/bin/python Python Version:
>> 2.6.6Python Path:
>>
>> ['/var/www/reviewboard/conf',
>>  '/usr/lib/python2.6/site-packages/distribute-0.6.32-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/python_memcached-1.48-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/recaptcha_client-1.0.6-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/python_dateutil-1.5-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/Pygments-1.5-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/ReviewBoard-1.6.14-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/django_evolution-0.6.7-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/pip-1.2.1-py2.6.egg',
>>  '/usr/lib/python2.6/site-packages/RBTools-0.4.2-py2.6.egg',
>>  '/usr/lib/python26.zip',
>>  '/usr/lib/python2.6',
>>  '/usr/lib/python2.6/plat-linux2',
>>  '/usr/lib/python2.6/lib-tk',
>>  '/usr/lib/python2.6/lib-old',
>>  '/usr/lib/python2.6/lib-dynload',
>>  '/usr/lib/python2.6/site-packages',
>>  '/usr/lib/python2.6/site-packages/PIL',
>>  '/usr/lib/python2.6/site-packages/gst-0.10',
>>  '/usr/lib/python2.6/site-packages/gtk-2.0',
>>  '/usr/lib/python2.6/site-packages/webkit-1.0']
>>
>> Server time: Thu, 29 Nov 2012 05:24:05 -0800
>
>
> # cat settings_local.py
>
>> # Site-specific configuration settings for Review Board
>> # Definitions of these settings can be found at
>> # http://docs.djangoproject.com/en/dev/ref/settings/
>> # Database configuration
>> DATABASES = {
>>     'default': {
>>         'ENGINE': 'django.db.backends.postgresql_psycopg2',
>>         'NAME': 'reviewboard',
>>         'USER': 'reviewboard',
>>         'PASSWORD': '<mypassword>',
>>         'HOST': '127.0.0.1',
>>         'PORT': '5432',
>>     }
>> }
>> # Unique secret key. Don't share this with anybody.
>> SECRET_KEY = '<It says I should not share this with anybody :)>'
>> # Cache backend settings.
>> # CACHE_BACKEND = 'memcached://localhost:11211/'
>> # Extra site information.
>> SITE_ID = 1
>> SITE_ROOT = '/'
>> FORCE_SCRIPT_NAME = ''
>> DEBUG = True
>
>                I have tried everything that popped to my mind. I verified
> that I can access this database from all possible users, using psql and
> from psycopg2. Whatever I try manually, it works, but from apache, it
> just doesn't. There are no errors in apache error_log.
>
> Basic OS info:
>
>> # cat /etc/redhat-release
>>
>> CentOS release 6.3 (Final)
>>
>> # uname -a
>>
>> Linux <myhost>.<mydomain> 2.6.32-279.14.1.el6.i686 #1 SMP Tue Nov 6
>>> 21:05:14 UTC 2012 i686 i686 i386 GNU/Linux
>>
>> # /usr/sbin/sestatus
>>
>> SELinux status:                 disabled
>>
>> #
>>
>>
> I can provide as many logs as needed, just direct me the right way.
>
> Thank everyone in advance,
>
> Mario
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Reply via email to