我推出墨魚(https://cuttlefish.io/)SMTP過程是這樣的:墨魚SMTP進程崩潰,在郵件的發送試驗
bundle exec rake cuttlefish:smtp RAILS_ENV=production
但是,當我嘗試發送測試郵件通墨魚的網站,這個過程,這最後一條消息崩潰:
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)
我錯過了什麼?烏賊連接到MySQL數據庫,這似乎是好的。另外,我在同一臺機器上安裝了Postfix,它也經過了測試。如何使這個SMTP過程工作?
以下是完整的崩潰堆棧:
I'm listening for emails via SMTP on 0.0.0.0 port 2525
I'm in the production environment
rake aborted!
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:320:in `rescue in establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:311:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
Errno::ECONNREFUSED: Connection refused - connect(2) for 127.0.0.1:6379
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:129:in `rescue in connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:121:in `connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:162:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each_with_index'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:211:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:316:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
IO::EINPROGRESSWaitWritable: Operation now in progress - connect(2) would block
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:122:in `connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:162:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each_with_index'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:211:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:316:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => cuttlefish:smtp
你是什麼意思的「刪除redis依賴項」?墨魚(http://cuttlefish.io)不是我的代碼,你是否認爲這可以通過從Gemfile中刪除redis來工作? – Fred
yes redis不是墨魚的依賴,你必須在你的代碼中使用它 –