dmathieu / glynn

Unmaintained. See the README - Generate your jekyll blog files and sends them through FTP
MIT License
359 stars 56 forks source link

No connection. Digitalocean host #52

Closed vjandrei closed 8 years ago

vjandrei commented 8 years ago

Connected to server. Sending site /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:in initialize': Connection refused - connect(2) for "maukasta.fi" port 21 (Errno::ECONNREFUSED) from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:inopen' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:in block in open_socket' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/timeout.rb:74:intimeout' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:223:in open_socket' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:248:inblock in connect' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/monitor.rb:211:in mon_synchronize' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:247:inconnect' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:160:in initialize' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:133:innew' from /Users/andreaskoutsoukos/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/ftp.rb:133:in open' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/gems/glynn-1.2.2/lib/glynn/ftp.rb:23:inconnect' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/gems/glynn-1.2.2/lib/glynn/ftp.rb:16:in sync' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/gems/glynn-1.2.2/bin/glynn:88:in<top (required)>' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/bin/glynn:23:in load' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/bin/glynn:23:in

' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in eval' from /Users/andreaskoutsoukos/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
'

My setting are _glynn.yml ftp_host: 'maukasta.fi' ftp_dir: '/var/www/maukasta.fi/public_html/' ftp_passive: false

optional

ftp_port: 21 # default 21 ftp_username: 'root' # default read from stdin ftp_password: '....' # default read from stdin ftp_secure: true # default false

But why console says ftp secure false?

dmathieu commented 8 years ago

This error indicates glynn wasn't able to connect to that host. It would indicate an error with your hosting provider, or your server configuration, not this library.

vjandrei commented 8 years ago

But if i change the option on _glynn.yml they will not effect?

dmathieu commented 8 years ago

My bad. Nice catch actually. It would look like the _glynn.yml config is loaded after we set some ftp vars. https://github.com/dmathieu/glynn/blob/b84f4648fce0d869cb90caabacbe0cccd1694761/bin/glynn#L27

Moving that file loading before we set those vars would fix your issue. Want to open a PR?

vjandrei commented 8 years ago

So will the _config.yml setup loaded before? I am not good at open, this is not my core skills. :)

dmathieu commented 8 years ago

Yes. If you set your config in _config.yml, things should be working properly. I'll fix this in the next few days.

vjandrei commented 8 years ago

Great thanks.