Ravines are better than plateaus

Archive for the ‘troubleshooting’ Category

fix: ‘FATAL: Ident authentication failed for user “postgres”‘on ubuntu

In troubleshooting on March 29, 2011 at 13:04

lots of troubleshooting with postgresql these days on my local dev machine. for example, after loading a customer’s DB we could not connect to it from rails server. we kept getting
IDENT” authentication failures.

turns out we were trying to login with the default user postgres which is the db admin built in, and those connections are refused, UNLESS, you change a special file :

edit the file /etc/postgresql/8.4/main/pg_hba.conf

and in the first lint for the ‘postgres’ user, change the ‘METHOD’ column to ‘md5′
so the first line should look like this:

local all postgres md5

don’t forget to restart postgres after that:

sudo /etc/init.d/postgresql restart

fix: “ssh:local:1: not valid in this context: /usr/bin/ssh”

In troubleshooting on March 29, 2011 at 12:54

I got this error on my local machine trying to run the ssh command
ssh:local:1: not valid in this context: /usr/bin/ssh

for me this happened only when running ssh and only inside zshell. with bash ‘ssh’ worked fine.

turns out I had this function called ‘ssh()’ in my .zshrc script that ran instead of the regular ‘ssh’:


function ssh() {
local cmd=`whereis ssh`
if [ -e .ssh/config ]; then
$cmd -F .ssh/config "$@"
else
$cmd "$@"
fi
}

Once I removed this function (which worked for others on macs..) everything worked fine!

fix: ubuntu boots into tty1 after installing nvidia drivers

In troubleshooting on February 15, 2011 at 13:21

After installing nvidia drivers via the command line, and going through the whole process, everything seemed to work fine on my machine… until I rebooted.

then I kept getting into terminal mode called “tty1″. You can even jumpt to it now by pressing ctrl-alt-F1 (through F6, you get to tty2,tty3 etc..) .

to get back to the UI hit ctrl-alt-F7.

How to fix

since I have VirtualBox installed, I saw a weird error telling me something about perf counters being enabled for hardware accelerated video, and that I should disable them by performing “echo 2 > /proc/sys/kernel/perf_event_paranoid ” so I did.

  • sudo su  (you have to do it like this)
  • (input root password)
  • echo 2 > /proc/sys/kernel/perf_event_paranoid

NOTE: the message tells you to look for a different counter, but that did not exist on my computer. so I used the one you see above, and it worked form that moment on.

Follow

Get every new post delivered to your Inbox.

Join 25 other followers