scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 60 forks source link

Can't create directory: File exists #73

Closed peterolle closed 10 years ago

peterolle commented 10 years ago

The deploy starts fine and suddenly I get the following error.

Its not stopping always in the same file. It's random, because if I run it again, it goes and continue fine, but then, after some more files it happens again. So it may deploy 50 files, maybe 150, maybe 200 and then the error.

What can the problem be and how can I fix it ?

Thanks.

/Users/user/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/net/ftp.rb:300:in `getresp': 550 Can't create directory: File exists (Net::FTPPermError)
    from /Users/user/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/net/ftp.rb:325:in `block in sendcmd'
    from /Users/user/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    from /Users/user/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/net/ftp.rb:323:in `sendcmd'
    from /Users/user/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/net/ftp.rb:803:in `mkdir'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:81:in `rescue in mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:77:in `mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:80:in `rescue in mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:77:in `mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:80:in `rescue in mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:77:in `mkdir_p'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:33:in `rescue in block in write'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:30:in `block in write'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/utils.rb:9:in `temp'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/adapter/ftp.rb:29:in `write'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/deployer.rb:49:in `deploy_change!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/deployer.rb:13:in `block in deploy_changeset!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/changeset.rb:27:in `block in each'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/diff.rb:58:in `block in each'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/diff.rb:57:in `each'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/diff.rb:57:in `each'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/changeset.rb:20:in `each'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/deployer.rb:9:in `deploy_changeset!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/command/deploy.rb:55:in `deploy_changeset!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/command/deploy.rb:30:in `execute!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/lib/dandelion/cli.rb:66:in `execute!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/gems/dandelion-0.4.0/bin/dandelion:8:in `<top (required)>'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/bin/dandelion:23:in `load'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/bin/dandelion:23:in `<main>'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in `eval'
    from /Users/user/.rvm/gems/ruby-1.9.3-p545/bin/ruby_executable_hooks:15:in `<main>'
scttnlsn commented 10 years ago

It fails after attempting to upload different files each time? Is there any sort of pattern (i.e. are the files all in the same directory, etc.)?

Do you know what the remote FTP server software is (i.e. ftpd, vsftpd, proftpd, etc.)?

peterolle commented 10 years ago

Not sure what the remote FTP software is.

It happens randomly, for large deploys its a pain, because you have to start all over again and cross fingers that it will finish.

It happens suddenly, there was no pattern at all. I deployed 4 WordPress installs complete and got the error 4 times. (2 in one of the projects and the other 2 separate projects)

At the end everything was deployed, but it would be nice to know if theres a way to continue the deploy where it stopped.

Thanks.

scttnlsn commented 10 years ago

What hosting provider are you using? This sort of random failure is hard to debug unless you're actually stepping through the code- if you're familiar with Ruby that's what I would recommend.

Have you inspected the state of the server immediately after it crashes? See what file it was try deploy and then see if the remote directory structure gives any clues.

Sorry, hard to know what's going on here.

peterolle commented 10 years ago

No problem, I will take a look at the server logs to see if I can find anything.

I just wanted to let you know in case its something that can be fixed in your end and not in the server side.

Thanks.

scttnlsn commented 10 years ago

Trying to upload those projects that failed to another type of FTP server would help isolate where the problem lies.

peterolle commented 10 years ago

Will do, thank you.

scttnlsn commented 10 years ago

@peterolle Is this still an issue for you?

peterolle commented 10 years ago

Nop, the problem is gone, so everything is fine now. If it comes back I will let you know.

Thank you.

tyssen commented 10 years ago

I'm having the same problem. Have tried running Dandelion twice and both times got the same error, but the second time I ran it, it got much further along than it did the first time.

Unfortunately, server I'm deploying to is shared hosting and I don't have access to server logs so I don't have much info to help you debug, but thought it was worth mentioning that it's happening as there's already an issue regarding the same thing.

scttnlsn commented 10 years ago

@peterolle Can you provide any insight here as to why @tyssen might be experiencing the same issue. What did you do to resolve the problem? Thanks!

peterolle commented 10 years ago

I did nothing I am aware of, I got the problems on the first deploys, after that day, everything works fine, so I am not able to help here or reproduce the problem again. If you have it installed correctly, there should be no problems. Here are the problems I got and how I resolved them, maybe it helps.

tyssen commented 10 years ago

I installed Dandelion a while ago and don't recall having installation problems. Already running Ruby 1.9.3.

scttnlsn commented 10 years ago

@peterolle I think you might be confusing this with another issue: https://github.com/scttnlsn/dandelion/issues/72