LOCAL SCM ERROR: Could not create directory '/nonexistent/.ssh'

616 views
Skip to first unread message

Daniel Mattes

unread,
Nov 26, 2008, 11:13:40 AM11/26/08
to Webistrano
Hello,

I use webistrano 1.4 with ruby 1.8.6 and mongrel as server.

Webistrano is running and i created a new project.
But if i want to "deploy:check" to my server, i get the following
error.

*** SSH options: setting ssh_keys to: id_rsa
*** LOCAL SCM ERROR: Could not create directory '/nonexistent/.ssh'.
*** Host key verification failed.
*** svn: Connection closed unexpectedly

The error message will be created in deployer.rb:177 with the
following cmd:
svn info svn+ssh://PATH_TO_MY_REPOSITORY_TRUNK --username deploy --
password XXXXXXXX --no-auth-cache -rHEAD

If i start the upper cmd on the console as user deploy, it works
correctly.

For debugging, I have insert "puts system('ID')" in line 178 and get
the output "www" user.
This user runs the mongrel process and has no home directory
with .ssh.

In the webistrano config I set the param "runner" with the value
"deploy", but the user www is used?

Can you help me, where is the problem?
What is the common config for a mongrel/webistrano config? What user
is normaly used?

Thank you in advanced,
Daniel

Phill MV

unread,
Nov 26, 2008, 11:22:15 AM11/26/08
to webis...@googlegroups.com
Whatever user you're running your mongrel in probably has to have a home directory to which it can write to, and check out your ssh config to and from. For trouble shooting that would be my first issue to look into.

As for the rest, 1.4 checks your current svn revision before each deploy; so you might want to look into what values you've inserted for 'repository' in your project configuration.

By default, webistrano will try to connect to your servers using whatever username your mongrel process is running as - but setting user in the project config will override this behaviour.

HTH,
Phill

2008/11/26 Daniel Mattes <mattes...@googlemail.com>

Jonathan Weiss

unread,
Nov 26, 2008, 1:33:31 PM11/26/08
to webis...@googlegroups.com
> For debugging, I have insert "puts system('ID')" in line 178 and get
> the output "www" user.
> This user runs the mongrel process and has no home directory
> with .ssh.

Webistrano needs to check the revision before login into the remote
servers. This means that the local mongrel process tries to do the svn
info and thus needs a homedir where it can create a .ssh dir.

Jonathan


--
Jonathan Weiss
http://blog.innerewut.de
http://twitter.com/jweiss

Daniel Mattes

unread,
Nov 27, 2008, 9:26:37 AM11/27/08
to Webistrano
Thank you very much for your fast replies.

The problem was, that the home dir of the www user was "nonexistent"
in /etc/passwd ;-)

We have changed the user in mongrel_cluster.yml to the deploy user an
it works well now.

nice regards,
Daniel
Reply all
Reply to author
Forward
0 new messages