Problem when installing Booktype/booki database
  • Hello everyone -

    I am in the process of installing booki (on Ubuntu 11.10) and I ran into a problem when attempting to synchronize the database. I am following the instructions from the Managing a Floss Manuals website manual.

    Software versions
    Django 1.3
    Postgresql 9.1
    Python 2.7

    I ran "django-admin.py syncdb" as the fm user. The resulting traceback message is shown below. It looks like postgresql is expecting a password but I didn't create a password when I created the database. I would appreciate any advice with how to proceed with figuring out this issue - I am new to both Django and Postgresql. Thanks in advance for the help.

    $ django-admin.py syncdb
    Syncing...
    Traceback (most recent call last):
    File "/usr/local/bin/django-admin.py", line 5, in
    management.execute_from_command_line()
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
    utility.execute()
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
    File "/usr/local/lib/python2.7/dist-packages/South-0.7.5-py2.7.egg/south/management/commands/syncdb.py", line 90, in handle_noargs
    syncdb.Command().execute(**options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs
    cursor = connection.cursor()
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 250, in cursor
    cursor = self.make_debug_cursor(self._cursor())
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 140, in _cursor
    self.connection = Database.connect(**conn_params)
    psycopg2.OperationalError: fe_sendauth: no password supplied

    Mark
  • 9 Comments sorted by
  • You can try to set the password for the Postgres user and configure the access permissions on Postgres. Check the instructions here:
      https://github.com/sourcefabric/Booktype/blob/master/doc/deployment/postgresql.txt

    Instructions on Managing a Floss Manuals website manual are missing some of the steps or have some extra not really needed steps. When you figure this up maybe you could update the instructions so other people don't make the same errors.

  • Thanks, Aleksandar. I tried to set the password using your suggestion but without success. I did get Booki to work by setting the database user and password in the settings.py file. This is less than ideal from a security point of view but it did enable me to finish configuring the application and also prove that it would work on my computer. I am just learning postgresql so I will try to configure the access permissions again later as I learn more.

    Also, I did make several changes to the Managing a Floss Manuals Website manual based on my experience with using it to install and configure booki. These are in the Installing Booktype chapter.
    Mark
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    any recommendations on how to make it more secure are welcome of course.
    contribs also welcome :)

    hows it running now Mark?

    adam

    On Tue, May 22, 2012 at 4:40 AM, Mark Brennan <<br />booktype-support@lists.sourcefabric.org> wrote:

    > Thanks, Aleksandar. I tried to set the password using your suggestion but
    > without success. I did get Booki to work by setting the database user and
    > password in the settings.py file. This is less than ideal from a security
    > point of view but it did enable me to finish configuring the application
    > and also prove that it would work on my computer. I am just learning
    > postgresql so I will try to configure the access permissions again later as
    > I learn more.
    >
    > Also, I did make several changes to the Managing a Floss Manuals Website
    > manual based on my experience with using it to install and configure booki.
    > These are in the Installing Booktype chapter.
    > Mark
    >
    >
  • It works. I don't think that I've hit all the features but I successfully created a new book.
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    coool


    you need to register it with an objavi instance to publish. if the install
    is online i can set that up if u send me a www accessible url


    adam

    On Tue, May 22, 2012 at 2:49 PM, Mark Brennan <<br />booktype-support@lists.sourcefabric.org> wrote:

    > It works. I don't think that I've hit all the features but I successfully
    > created a new book.
    >
    >
  • Sorry, it's not online.Is it possible for me to set up the objavi instance on my computer?
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    yes, you can set up objavi too.

    https://github.com/sourcefabric/Objavi

    best under ubuntu in my opinion since wkhtmltopdf compiles better in that
    environment


    adam

    On Tue, May 22, 2012 at 3:09 PM, Mark Brennan <<br />booktype-support@lists.sourcefabric.org> wrote:

    > Sorry, it's not online.Is it possible for me to set up the objavi instance
    > on my computer?
    >
    >
  • Good, that's what I use.
  • Ah, it is great that this procedure has been properly documented now. I somehow solved this problem a couple of months ago, but absolutely couldn't remember any more what I actually did. Good that you wrote it down before it is forgotten again... :)