Sono riuscito a configurare i miei worker e sono stati eseguiti senza problemi (in fase di sviluppo) ma ora non sono in produzione o sviluppo (suppongo che dopo aver cambiato da SQlite3 a PostgreSQL).Resque worker in errore con il server PostgreSQL
Quando eseguo un comando rastrello per eseguire i lavoratori con rake resque:work QUEUE=*
ho il seguente errore e lo stack trace:
getaddrinfo: nodename nor servname provided, or not known
ottengo i seguenti errori durante l'esecuzione heroku rake resque:work QUEUE=*
nella console per testare i lavoratori in attesa in coda .
Class SentimentJob
Arguments [4, 5, 6]
Exception ActiveRecord::StatementInvalid
Error PGError: server closed the connection unexpectedly This probably means
the server terminated abnormally before or while processing the request.
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid =
d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"taggings"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
e per i miei lavoratori Facebook:
Class FBConnectionsJob
Arguments 1
Exception OpenSSL::SSL::SSLError
Error SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
certificate verify failed
Class FBConnectionsJob
Arguments 1
Exception ActiveRecord::StatementInvalid
Error PGError: server closed the connection unexpectedly This probably means
the server terminated abnormally before or while processing the request.
: SELECT tablename FROM pg_tables WHERE schemaname = ANY
(current_schemas(false))
Perché ottengo diversi errori in ambienti diversi? I miei file di inizializzazione sono:
Devo aggiungere qui le specifiche ENV?
Resque.rb
uri = URI.parse(ENV["REDISTOGO_URL"])
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
Redis.rb
uri = URI.parse(ENV["REDISTOGO_URL"])
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
Resque.redis = REDIS
mio ambienti/production.rb file non ha alcun riferimento a Redis e la mia ambienti/sviluppo. Il file rb ha questo per l'installazione Redis:
ENV["REDISTOGO_URL"] = 'redis://username:[email protected]:6789'
Per me sembra che il problema piaccia con la connessione al database piuttosto che con Redis. Stai usando una sorta di installazione non standard? –
Siamo andati al libro, ehi. – Simpleton