Thanks to the helpful nature of people on this list, I've come a bit 
further in my quest to deploy my website.

I'm following along with the Deployment page of the documentation 
<http://mezzanine.jupo.org/docs/deployment.html>, and I'm now up to step 4 
on "Tutorial - Case 1: deploying to a brand new server". I have set the 
database password in local_settings.py, the DB_PASS field. And "fab all" 
seems to be able to create the database.
 

> $ CREATE USER PyVarm WITH ENCRYPTED PASSWORD '***************'; ->
> [23.101.79.24] out: sudo password:
> [23.101.79.24] out: CREATE DATABASE
> [23.101.79.24] out: 
> $ CREATE DATABASE PyVarm WITH OWNER PyVarm ENCODING = 'UTF8' LC_CTYPE = 
> 'en_US.UTF-8' LC_COLLATE = 'en_US.UTF-8' TEMPLATE template0; ->
> [23.101.79.24] put: <file obj> -> 
> /home/pyvarm/mezzanine/PyVarm/PyVarm/local_settings.py


But then a little later, this section (with the error) comes up - it seems 
to be trying to create a database again, this time with "manage.py 
createdb":

$ /home/pyvarm/.virtualenvs/PyVarm/bin/python 
/home/pyvarm/mezzanine/PyVarm/manage.py createdb --noinput --nodata ->

[23.101.79.24] out: 
/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/psycopg2/__init__.py:144:
 
UserWarning: The psycopg2 wheel package will be renamed from release 2.8; 
in order to keep installing from binary please use "pip install 
psycopg2-binary" instead. For deta[23.101.79.24] out: 
td.org/psycopg/docs/install.html#binary-install-from-pypi>.
[23.101.79.24] out:   """)
[23.101.79.24] out: Traceback (most recent call last):
[23.101.79.24] out:   File "/home/pyvarm/mezzanine/PyVarm/manage.py", line 
14, in <module>
[23.101.79.24] out:     execute_from_command_line(sys.argv)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: nt/__init__.py", line 364, in execute_from_command_line
[23.101.79.24] out:     utility.execute()
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: nt/__init__.py", line 356, in execute
[23.101.79.24] out:     
self.fetch_command(subcommand).run_from_argv(self.argv)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: nt/base.py", line 283, in run_from_argv
[23.101.79.24] out:     self.execute(*args, **cmd_options)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: nt/base.py", line 330, in execute
[23.101.79.24] out:     output = self.handle(*args, **options)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ement/commands/createdb.py", line 39, in handle
[23.101.79.24] out:     if "conf_setting" in 
connection.introspection.table_names():
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/introspection.py", line 53, in table_names
[23.101.79.24] out:     with self.connection.cursor() as cursor:
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/base.py", line 254, in cursor
[23.101.79.24] out:     return self._cursor()
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/base.py", line 229, in _cursor
[23.101.79.24] out:     self.ensure_connection()
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/base.py", line 213, in ensure_connection
[23.101.79.24] out:     self.connect()
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out:  line 94, in __exit__
[23.101.79.24] out:     six.reraise(dj_exc_type, dj_exc_value, traceback)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/base.py", line 213, in ensure_connection
[23.101.79.24] out:     self.connect()
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ase/base.py", line 189, in connect
[23.101.79.24] out:     self.connection = 
self.get_new_connection(conn_params)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ostgresql/base.py", line 176, in get_new_connection
[23.101.79.24] out:     connection = Database.connect(**conn_params)
[23.101.79.24] out:   File 
"/home/pyvarm/.virtualenvs/PyVarm/local/lib/python2.7/site-packages/[23.101.79.24]
 
out: ", line 130, in connect
[23.101.79.24] out:     conn = _connect(dsn, 
connection_factory=connection_factory, **kwasync)
[23.101.79.24] out: django.db.utils.OperationalError: FATAL:  password 
authentication failed fo[23.101.79.24] out:
[23.101.79.24] out: FATAL:  password authentication failed for user "PyVarm"
[23.101.79.24] out:
[23.101.79.24] out:
Fatal error: run() encountered an error (return code 1) while executing 
'/home/pyvarm/.virtualenvs/PyVarm/bin/python 
/home/pyvarm/mezzanine/PyVarm/manage.py createdb --noinput --nodata'

Aborting.
Disconnecting from 23.101.79.24... done.


Given that there's only one place (local_settings.py) to enter the 
password, I don't understand how a mismatch can arise. Could it perhaps be 
that the password is correct, but something other than an incorrect 
password is giving the "password authentication failure" error?

I've been running "fab all" many times now, and inbetween each time I 
completely uninstall all postgresql packages (apt remove --purge) to avoid 
conflicts ("the database already exists", etc, because it was created last 
time I ran "fab all". Perhaps in the future, I can help make "fab all" 
idempotent). Perhaps I should now try following the documentation 
<http://mezzanine.jupo.org/docs/deployment.html> for Case 2: Deploying to 
an existing server instead? But I'm hesitant to just try it, for fear that 
I might mess things up further.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to