Booktype 2.0-dev install problems
  • Vote Up1Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Hi,

    I'm trying to test booktype 2 and I have a little problem
    after create user and database :

    sudo -u postgres createuser -SDRP booktype-user
    sudo -u postgres createdb -E utf8 -O booktype-user booktype-db

    restarted postgresql

    I'm installing Booktype
    all is good, but when I'm trying to access to the website I have this error :

    The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.


    Please contact the server administrator at
    __INSERT_ADMIN_EMAIL__ to inform them of the time this error occurred,
    and the actions you performed just before this error.


    More information about this error may be available
    in the server error log.


    and this into the var/log/apache :

    [Sat Mar 21 19:58:43.003215 2015] [:error] [pid 7573] [client :54629]   File "/var/lib/booktype/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 839, in execute_sql
    [Sat Mar 21 19:58:43.003230 2015] [:error] [pid 7573] [client :54629]     cursor = self.connection.cursor()
    [Sat Mar 21 19:58:43.003246 2015] [:error] [pid 7573] [client :54629]   File "/var/lib/booktype/lib/python2.7/site-packages/django/db/backends/__init__.py", line 326, in cursor
    [Sat Mar 21 19:58:43.003256 2015] [:error] [pid 7573] [client xx.xx.xx.xx:54629]     cursor = util.CursorWrapper(self._cursor(), self)
    [Sat Mar 21 19:58:43.003262 2015] [:error] [pid 7573]]   File "/var/lib/booktype/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 182, in _cursor
    [Sat Mar 21 19:58:43.003281 2015] [:error] [pid 7573]      self.connection = Database.connect(**conn_params)
    [Sat Mar 21 19:58:43.003287 2015] [:error] [pid 7573]    File "/var/lib/booktype/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
    [Sat Mar 21 19:58:43.003296 2015] [:error] [pid 7573]]     conn = _connect(dsn, connection_factory=connection_factory, async=async)
    [Sat Mar 21 19:58:43.003309 2015] [:error] [pid 7573]  OperationalError: fe_sendauth: no password supplied

    Any ideas ?

  • 4 Comments sorted by
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    normally Booktype create tables during install ?
    no tables are created
    any ideas ?
  • Hi Albert!

    You did all the steps where you do "./manage.py syncdb --noinput", "./manage.py migrate" and etc? No errors at all?

    Yes, these two commands would normally create all required tables and do needed migrations.

    There is probably something wrong in the Booktype/Django configuration. If you are using Apache as webserver maybe your wsgi.py script is using one profile (with specific configuration for connecting to Postgres) and "manage.py" script is using another one. This could be a reason why install would show no errors and web server would. DJANGO_SETTINGS_MODULE in both files should be the same.

    You should check your DATABASES settings in your settings file (if you are connecting over TCP you should provide username and password) or Postgresql configuration (maybe this user can not connect for some reasons).

    Aco
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    nope, tables are note created...
  • Hi Albert!

    Well, if you don't have tables in the database after doing:
     ./manage.py syncdb --noinput
     ./manage.py migrate

    then something is wrong with the configuration. You should also get some error messages if these steps do not pass. If you are using PostgreSQL configuration should be something like this (if you are connecting over TCP + PostgreSQL should be configured to allow connections from user/host ... Plus it assumes the default port number):








    DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',


                             'NAME': 'testdb',


                             'USER': 'testuser',


                             'PASSWORD': 'testpwd',


                             'HOST': 'localhost',


                             'PORT': ''


                            }


                }


    Aco