Peer authentication failed for user "taiga"

3,585 views
Skip to first unread message

Sreeraju V

unread,
Oct 15, 2015, 1:52:38 PM10/15/15
to taigaio

Hi,

     I was trying to install taiga  using http://taigaio.github.io/taiga-doc/dist/setup-development.html , but now getting error while running
   
  python manage.py migrate --noinput

File "/home/puppetclient/.virtualenvs/taiga/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL: Peer authentication failed for user "taiga"


My local.py contain below variables


from .development import *

DATABASES = {
'default': {
'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
'NAME': 'taiga',
'USER': 'taiga',
'PASSWORD': 'changeme',
'HOST': '',
'PORT': '',
}
}


I tried to run below command again but no success



(taiga)puppetclient@puppetslave:~/taiga-back/settings$ sudo -u postgres createuser taiga
createuser: creation of new role failed: ERROR: role "taiga" already exists

(taiga)puppetclient@puppetslave:~/taiga-back/settings$ sudo -u postgres createdb taiga -O taiga

ERROR: role "taiga" already exists

(taiga)puppetclient@puppetslave:~/taiga-back/settings$ sudo -u postgres psql -c "CREATE ROLE taiga LOGIN PASSWORD 'changeme';"
ERROR: role "taiga" already exists

David Barragán

unread,
Oct 15, 2015, 2:09:26 PM10/15/15
to Sreeraju V, taigaio
try to remove the db role and create it again



sudo -u postgres dropuser taiga

sudo -u postgres psql -c "CREATE ROLE taiga LOGIN PASSWORD 'changeme';"
sudo -u postgres createdb taiga -O taiga
echo 'local all taiga peer' | sudo -u postgres tee -a /etc/postgresql/9.3/main/pg_hba.conf > /dev/null
sudo service postgresql reload



--
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/ad4cdff1-f450-4d36-929c-115004183bcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

---

 
David Barragán Merino  
Engineer

www.kaleidos.net/FFF8E7

Sreeraju V

unread,
Oct 16, 2015, 12:18:04 AM10/16/15
to David Barragán, taigaio
Getting Error 

dropuser: removal of role "taiga" failed: ERROR:  role "taiga" cannot be dropped because some objects depend on it
DETAIL:  owner of database taiga

Sreeraju V

unread,
Oct 16, 2015, 1:42:31 AM10/16/15
to David Barragán, taigaio
Done below Process ,but  still error exist while running python manage.py migrate --noinput  
 Error :  conn = _connect(dsn, connection_factory=connection_factory, async=async)
             django.db.utils.OperationalError: FATAL:  Peer authentication failed for user "taiga"
 


(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u postgres dropdb taiga
(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u postgres dropuser taiga
(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u postgres psql -c "CREATE ROLE taiga LOGIN PASSWORD 'changeme';"
CREATE ROLE
(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u postgres createdb taiga -O taiga
(taiga)puppetclient@puppetslave:~/taiga-back$ echo 'local all taiga peer' | sudo -u postgres tee -a /etc/postgresql/9.3/main/pg_hba.conf > /dev/null
(taiga)puppetclient@puppetslave:~/taiga-back$ sudo service postgresql reload
 * Reloading PostgreSQL 9.3 database server                              [ OK ]

Alejandro Alonso

unread,
Oct 16, 2015, 1:50:19 AM10/16/15
to Sreeraju V, David Barragán, taigaio
It seems something related to your postgres authentication/configuration, you should ensure that you can connect to your database with something like "psql -U taiga" (and then write your password).

Regards,



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

Sreeraju V

unread,
Oct 16, 2015, 1:58:15 AM10/16/15
to Alejandro Alonso, David Barragán, taigaio
I am getting following error Alejandro ,Thanks for response.

(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u postgres psql
psql (9.3.9)
Type "help" for help.

postgres=# \q
(taiga)puppetclient@puppetslave:~/taiga-back$ sudo -u taiga psql
sudo: unknown user: taiga
sudo: unable to initialize policy plugin

Sreeraju V

unread,
Oct 16, 2015, 2:00:03 AM10/16/15
to Alejandro Alonso, David Barragán, taigaio
Update :

(taiga)puppetclient@puppetslave:~/taiga-back$ psql -U taiga
psql: FATAL:  Peer authentication failed for user "taiga"
(taiga)puppetclient@puppetslave:~/taiga-back$ psql -U postgres
psql: FATAL:  Peer authentication failed for user "postgres"

Alejandro Alonso

unread,
Oct 16, 2015, 2:15:17 AM10/16/15
to Sreeraju V, David Barragán, taigaio
So that's the problem you should solve first, it seems you can't login properly to postgres, review your postgresql configuration, it's not something depending on the Taiga software....

Regards!,

Sreeraju V

unread,
Oct 16, 2015, 3:08:52 AM10/16/15
to Alejandro Alonso, David Barragán, taigaio
Ok thanks 

Sreeraju V

unread,
Oct 16, 2015, 4:24:54 AM10/16/15
to Alejandro Alonso, David Barragán, taigaio
Alejandro thanks for your support ,issue solved . In file pg_hba.conf 
file content was :

local   all             postgres                                md5
local all taiga       md5


i changed it to 

local   all             postgres                                md5
local   all             taiga                                     md5

don't know what actually caused it.   
 

Alejandro Alonso

unread,
Oct 16, 2015, 4:28:43 AM10/16/15
to Sreeraju V, David Barragán, taigaio
Great! ;)

--
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sreeraju V

unread,
Oct 16, 2015, 4:36:24 AM10/16/15
to Alejandro Alonso, David Barragán, taigaio
Finally Installed   ;) But unable to browse it .Taigaio installed in my Ubuntu system .when i tried to access in from windows system nothing showing  http://192.168.152.131:8000/ 

Django version 1.7.8, using settings 'settings'
Starting development server at http://127.0.0.1:8000/

Alejandro Alonso

unread,
Oct 16, 2015, 4:52:42 AM10/16/15
to Sreeraju V, David Barragán, taigaio
Hello, 

I think that if you are having problems with the installation the best approach could be using taiga-scripts. It will give you a fully automated Taiga installation -> http://taigaio.github.io/taiga-doc/dist/setup-alternatives.html

Regards,

Sreeraju V

unread,
Oct 19, 2015, 12:27:50 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
While running automation script,
$ cd taiga-scripts
$ bash setup-devel.sh  i am gettin error . Can u please help

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/bin/django-admin'



Alejandro Alonso

unread,
Oct 19, 2015, 1:51:40 AM10/19/15
to Sreeraju V, David Barragán, taigaio
Hello,

What user are you using for the installation?, and what operative system?, taiga-scripts are designed to work in a freshly installed and updated Ubuntu 14.04

Sreeraju V

unread,
Oct 19, 2015, 2:39:26 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
Issue resolved ,user privilege was causing the issue .Os is fresh Ubuntu 14.04 
But now i am getting another error. 

sreeraju@ubuntu:~/taiga-vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...


Alejandro Alonso

unread,
Oct 19, 2015, 2:42:00 AM10/19/15
to Sreeraju V, David Barragán, taigaio
Now it seems there is something wrong with virtualbox. Did you try to open that virtual machine "manually" from the virtualbox interface?

Regards,

Sreeraju V

unread,
Oct 19, 2015, 2:59:22 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
No,i just follow the procedure in document.My ubuntu os is in Vmware

Alejandro Alonso

unread,
Oct 19, 2015, 3:06:18 AM10/19/15
to Sreeraju V, David Barragán, taigaio
But "vagrant up" is trying to boot a virtualbox machine, you are trying to use vmware instead of virtualbox?, if so I think you should check this page -> https://www.vagrantup.com/vmware

Regards,

Sreeraju V

unread,
Oct 19, 2015, 3:22:52 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
 😂 starter in taigaio, don't know how it work.I have installed Ubuntu 14.04  in Vmware workstation pro in my Window local system.

" 1.5. Setup development-like environment     and  then 

 2. Setup using taiga-vagrant "

 Do we need to install  Setup using taiga-vagrant because  it not mentioned in  doc for development like environment.

Alejandro Alonso

unread,
Oct 19, 2015, 3:25:35 AM10/19/15
to Sreeraju V, David Barragán, taigaio
If you have manually created a vmware instance of ubuntu you don't need to use taiga-vagrant under it (it should be virtualizing inside a virtualized machine). 

Just open your your ubuntu instance and in a shell write:


$ cd taiga-scripts
$ bash setup-devel.sh

Regards,

Sreeraju V

unread,
Oct 19, 2015, 4:03:07 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
Thanks for your update,Now i am only following above mention procedure ,not vaigrant.
I am getting following error while running  $ bash setup-devel.sh

  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/sreeraju/taiga-back/settings/__init__.py", line 2
SyntaxError: Non-ASCII character '\xc3' in file /home/sreeraju/taiga-back/settin                                                                                        gs/__init__.py on line 2, but no encoding declared; see http://www.python.org/pe                                                                                        ps/pep-0263.html for details
circus: unrecognized service
~ ~/taiga-scripts
~/taiga-scripts



Checked python version

(taiga)sreeraju@ubuntu:~/taiga-back/settings$ ls /usr/lib/python
python2.7/ python3/   python3.4/



Alejandro Alonso

unread,
Oct 19, 2015, 4:10:05 AM10/19/15
to Sreeraju V, David Barragán, taigaio
It could be related to the locales from your virtual machine, you could check this issue in github -> https://github.com/taigaio/taiga-back/issues/298

Another related issue could be -> https://github.com/taigaio/taiga-back/issues/343

Sreeraju V

unread,
Oct 19, 2015, 7:34:29 AM10/19/15
to Alejandro Alonso, David Barragán, taigaio
Finally installation completed successfully,Can you explain next step .Can i access   http://localhost:8000 ?

950 static files copied to '/home/taigo/taiga-back/static'.
Trying import local.py settings...
Installed 1 object(s) from 1 fixture(s)
Trying import local.py settings...
Installed 2 object(s) from 1 fixture(s)
Trying import local.py settings...
Installed 0 object(s) from 0 fixture(s)
Trying import local.py settings...
~ ~/taiga-scripts
~/taiga-scripts
taigo@ubuntu:~/taiga-scripts$  

Sreeraju V

unread,
Oct 20, 2015, 3:10:48 AM10/20/15
to Alejandro Alonso, David Barragán, taigaio
I was able to install taiga in Ubuntu 14.04 local system using steps in (1) Step using taiga development like Env and (2) Step using Taiga-Vagrant and access it using url  http://IP:8000/login


Clarification needed is what step to follow  at Ubuntu 14.04 installed  in Vmware . I followed step only in (1) Step using taiga development like Env .Do i need to install Taiga-Vagrant? in Ubuntu installed in Vmware.How to access  url  http://IP:8000/login after step in taiga development

Alejandro Alonso

unread,
Oct 20, 2015, 3:20:28 AM10/20/15
to Sreeraju V, David Barragán, taigaio
Hello Sreeraju,

If you completed the installation process:

1.5. Setup development-like environment
This setup is much like the previous one but with a few differences:
It does not install services like nginx, as they are only necessary for production
It sets all hostnames to localhost to easily run everything on localhost
Make sure you have a fresh and updated Ubuntu 14.04 machine or virtual image:

$ git clone https://github.com/taigaio/taiga-scripts.git
$ cd taiga-scripts
$ bash setup-devel.sh
 
Just go to your virtual machine, open a browser and access to http://localhost:8000 if you want to access by ip you should check your vmware settings to see what's the IP of that machine and probably you should configure the network in a way that allows your host machine to communicate with your virtual machine.

Regards!,

Sreeraju V

unread,
Oct 20, 2015, 3:48:37 AM10/20/15
to Alejandro Alonso, David Barragán, taigaio
Hi,
 
    Installation complete on ubuntu 14.04 on Vmware ,please find below logs. But i cant access url  http://localhost:8000

   

950 static files copied to '/home/taigo/taiga-back/static'.
Trying import local.py settings...
Installed 1 object(s) from 1 fixture(s)
Trying import local.py settings...
Installed 2 object(s) from 1 fixture(s)
Trying import local.py settings...
Installed 0 object(s) from 0 fixture(s)
Trying import local.py settings...
~ ~/taiga-scripts
~/taiga-scripts
taigo@ubuntu:~/taiga-scripts$

Alejandro Alonso

unread,
Oct 22, 2015, 9:08:39 AM10/22/15
to Sreeraju V, David Barragán, taigaio
But that url (http://localhost:8000) can be used only from the virtual machine (not the host one), are you using it in a browser inside the virtual machine?

Regards,
Reply all
Reply to author
Forward
0 new messages