Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Email list not defined (I don't know) #124

Open
MrConstantine opened this issue Feb 26, 2019 · 13 comments
Open

[BUG] Email list not defined (I don't know) #124

MrConstantine opened this issue Feb 26, 2019 · 13 comments
Assignees
Labels

Comments

@MrConstantine
Copy link

Describe the bug
app_1 | 04:44:45 worker.1 | 2019-02-26T04:44:45.696Z 254 TID-go103nr0e WARN: SmartvpnException: Email list not defined
app_1 | 04:45:09 worker.1 | 2019-02-26T04:45:09.668Z 254 TID-go0zzkkdm AddUserToNewsletterWorker JID-cf942da943e95463afc40f5b INFO: start
app_1 | 04:45:09 worker.1 | 2019-02-26T04:45:09.675Z 254 TID-go0zzkkdm AddUserToNewsletterWorker JID-cf942da943e95463afc40f5b INFO: fail: 0.007 sec
app_1 | 04:45:09 worker.1 | 2019-02-26T04:45:09.676Z 254 TID-go0zzkkdm WARN: {"context":"Job raised exception","job":{"class":"AddUserToNewsletterWorker","args":["[email protected]","all"],"retry":true,"queue":"high","jid":"cf942da943e95463afc40f5b","created_at":1551156041.3521435,"enqueued_at":1551156309.6664355,"error_message":"Email list not defined","error_class":"SmartvpnException","failed_at":1551156050.4533172,"retry_count":3,"retried_at":1551156173.6761515},"jobstr":"{"class":"AddUserToNewsletterWorker","args":["[email protected]","all"],"retry":true,"queue":"high","jid":"cf942da943e95463afc40f5b","created_at":1551156041.3521435,"enqueued_at":1551156309.6664355,"error_message":"Email list not defined","error_class":"SmartvpnException","failed_at":1551156050.4533172,"retry_count":3,"retried_at":1551156173.6761515}"}
app_1 | 04:45:09 worker.1 | 2019-02-26T04:45:09.676Z 254 TID-go0zzkkdm WARN: SmartvpnException: Email list not defined
redis_1 | 1:M 26 Feb 2019 04:45:43.458 * DB saved on disk
redis_1 | 1:M 26 Feb 2019 04:45:43.461 * DB saved on disk
redis_1 | 1:M 26 Feb 2019 04:45:43.463 * DB saved on disk
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

To Reproduce
Steps to reproduce the behavior:

  1. Install docker, docker-compose
  2. Enter command "docker-compose -f docker-compose.development.yml up"
  3. Error

Server (please complete the following information):

  • OS: Debian 9 Stretch

Additional context
Hi. Thank you for correcting the previous error.
Why could a timeout error occur? I have a good internet connection. Which resource can I send ping to check availability? What is the login and password for access to the administrator account?

Thank you.

@Mehonoshin
Copy link
Owner

Hello, @MrConstantine!
Thanks for report, I'll investigate and provide you solution ASAP.

@Mehonoshin
Copy link
Owner

Looks like the issue it related to docker docker/compose#3633
Can you try to reproduce it at some other machine?

@trddddd
Copy link
Collaborator

trddddd commented Feb 26, 2019

app_1 | 04:44:45 worker.1 | 2019-02-26T04:44:45.696Z 254 TID-go103nr0e WARN: SmartvpnException: Email list not defined

Try fill .env from .test.env maybe it's somehow connected

@Mehonoshin
Copy link
Owner

@MrConstantine you can get administrator access as described here https://github.com/Mehonoshin/smartvpn-billing#admin-access

@Mehonoshin
Copy link
Owner

@MrConstantine please can you also retry it with --verbose flag, so we can get more information about what leads to the error.

@MrConstantine
Copy link
Author

Yes. I will do

@MrConstantine
Copy link
Author

MrConstantine commented Feb 27, 2019

cat .env

RAILS_ENV=production

SECRET_TOKEN='Token'
DEFAULT_HOST='smartvpn.mydomain.ru'
EMAIL_FROM='[email protected]'

#ROBOKASSA_LOGIN='login'
#ROBOKASSA_SECRET1='password'
#ROBOKASSA_SECRET2='password2'

#WEBMONEY_SECRET='secret value'
#WEBMONEY_WALLET_WMZ='Z1234567890'

#MAILCHIMP_API_KEY='mailchimp-key'
#MAILCHIMP_ALL_CLIENTS_LIST_ID='test'

BRAND_NAME='SmartVPN'

Command docker-compose --verbose -f docker-compose.development.yml up

Errors:

postgres_1 | 2019-02-27 04:30:44.797 UTC [141] FATAL: database "smartvpn_production" does not exist
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.789Z 254 TID-gtbrbg8fa DecreaseBalanceMailWorker JID-df6778b9994dd1837a3fbb75 INFO: start
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa DecreaseBalanceMailWorker JID-df6778b9994dd1837a3fbb75 INFO: fail: 0.013 sec
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa WARN: {"context":"Job raised exception","job":{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"df6778b9994dd1837a3fbb75","created_at":1551241411.0153143,"enqueued_at":1551241844.7870286,"error_message":"FATAL: database "smartvpn_production" does not exist\n","error_class":"ActiveRecord::NoDatabaseError","failed_at":1551241416.0947037,"retry_count":3,"retried_at":1551241631.1661518},"jobstr":"{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"df6778b9994dd1837a3fbb75","created_at":1551241411.0153143,"enqueued_at":1551241844.7870286,"error_message":"FATAL: database \"smartvpn_production\" does not exist\n","error_class":"ActiveRecord::NoDatabaseError","failed_at":1551241416.0947037,"retry_count":3,"retried_at":1551241631.1661518}"}
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa WARN: ActiveRecord::NoDatabaseError: FATAL: database "smartvpn_production" does not exist

ERROR: compose.cli.errors.log_timeout_error: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

postgres_1 | 2019-02-27 04:30:44.797 UTC [141] FATAL: database "smartvpn_production" does not exist
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.789Z 254 TID-gtbrbg8fa DecreaseBalanceMailWorker JID-df6778b9994dd1837a3fbb75 INFO: start
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa DecreaseBalanceMailWorker JID-df6778b9994dd1837a3fbb75 INFO: fail: 0.013 sec
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa WARN: {"context":"Job raised exception","job":{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"df6778b9994dd1837a3fbb75","created_at":1551241411.0153143,"enqueued_at":1551241844.7870286,"error_message":"FATAL: database "smartvpn_production" does not exist\n","error_class":"ActiveRecord::NoDatabaseError","failed_at":1551241416.0947037,"retry_count":3,"retried_at":1551241631.1661518},"jobstr":"{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"df6778b9994dd1837a3fbb75","created_at":1551241411.0153143,"enqueued_at":1551241844.7870286,"error_message":"FATAL: database \"smartvpn_production\" does not exist\n","error_class":"ActiveRecord::NoDatabaseError","failed_at":1551241416.0947037,"retry_count":3,"retried_at":1551241631.1661518}"}
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa WARN: ActiveRecord::NoDatabaseError: FATAL: database "smartvpn_production" does not exist
app_1 | 04:30:44 worker.1 |
app_1 | 04:30:44 worker.1 | 2019-02-27T04:30:44.801Z 254 TID-gtbrbg8fa WARN: /usr/local/bundle/gems/activerecord-4.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:661:in `rescue in connect'

app_1 | 04:29:39 worker.1 | 2019-02-27T04:29:39.746Z 254 TID-gtbrjpsa6 AddUserToNewsletterWorker JID-8c112805c25448b89069f8dd INFO: start
app_1 | 04:29:39 worker.1 | 2019-02-27T04:29:39.747Z 254 TID-gtbrjpsa6 AddUserToNewsletterWorker JID-8c112805c25448b89069f8dd INFO: fail: 0.001 sec
app_1 | 04:29:39 worker.1 | 2019-02-27T04:29:39.748Z 254 TID-gtbrjpsa6 WARN: {"context":"Job raised exception","job":{"class":"AddUserToNewsletterWorker","args":["[email protected]","all"],"retry":true,"queue":"high","jid":"8c112805c25448b89069f8dd","created_at":1551241411.5982401,"enqueued_at":1551241779.7411005,"error_message":"Email list not defined","error_class":"SmartvpnException","failed_at":1551241416.9140797,"retry_count":3,"retried_at":1551241638.6396039},"jobstr":"{"class":"AddUserToNewsletterWorker","args":["[email protected]","all"],"retry":true,"queue":"high","jid":"8c112805c25448b89069f8dd","created_at":1551241411.5982401,"enqueued_at":1551241779.7411005,"error_message":"Email list not defined","error_class":"SmartvpnException","failed_at":1551241416.9140797,"retry_count":3,"retried_at":1551241638.6396039}"}
app_1 | 04:29:39 worker.1 | 2019-02-27T04:29:39.748Z 254 TID-gtbrjpsa6 WARN: SmartvpnException: Email list not defined
app_1 | 04:29:39 worker.1 | 2019-02-27T04:29:39.748Z 254 TID-gtbrjpsa6 WARN: /app/app/services/newsletter_manager.rb:17:in `list_id'

@trddddd
Copy link
Collaborator

trddddd commented Feb 27, 2019

@MrConstantine you try to run in production mode, but docker-compose.development.yml this development environment.
If you want run from docker-compose.development.yml then do the following

  • open docker-compose.development.yml in your favorite texteditor) and edit - RAILS_ENV=development to - RAILS_ENV=production
  • prune your docker volume docker volume prune
  • rebuild docker image docker-compose -f docker-compose.development.yml build --no-cache
  • again try to start docker-compose -f docker-compose.development.yml up

for production mode we have small bash script https://github.com/Mehonoshin/smartvpn/tree/master/setup

@MrConstantine
Copy link
Author

I did. But why is there such a warning? Need something else to specify in .env?

app_1 | 02:43:21 worker.1 | 2019-02-28T02:43:21.842Z 15 TID-grg653y6v DecreaseBalanceMailWorker JID-7fb7eac974d81f1438fdf323 INFO: fail: 0.013 sec
app_1 | 02:43:21 worker.1 | 2019-02-28T02:43:21.842Z 15 TID-grg653y6v WARN: {"context":"Job raised exception","job":{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"7fb7eac974d81f1438fdf323","created_at":1551321785.1779037,"enqueued_at":1551321801.828187,"error_message":"Cannot assign requested address - connect(2) for nil port 25","error_class":"Errno::EADDRNOTAVAIL","failed_at":1551321786.3218782,"retry_count":0},"jobstr":"{"class":"DecreaseBalanceMailWorker","args":["10.0",1],"retry":true,"queue":"high","jid":"7fb7eac974d81f1438fdf323","created_at":1551321785.1779037,"enqueued_at":1551321801.828187,"error_message":"Cannot assign requested address - connect(2) for nil port 25","error_class":"Errno::EADDRNOTAVAIL","failed_at":1551321786.3218782,"retry_count":0}"}
app_1 | 02:43:21 worker.1 | 2019-02-28T02:43:21.842Z 15 TID-grg653y6v WARN: Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for nil port 25
app_1 | 02:43:21 worker.1 | 2019-02-28T02:43:21.842Z 15 TID-grg653y6v WARN: /usr/local/lib/ruby/2.5.0/net/smtp.rb:539:in initialize' app_1 | 02:44:37 worker.1 | 2019-02-28T02:44:37.147Z 15 TID-owavaimnz WARN: {"context":"Job raised exception","job":{"class":"AddUserToNewsletterWorker","args":["[email protected]","all"],"retry":true,"queue":"high","jid":"cb947228755cb671ba1164d8","created_at":1551321779.9143016,"enqueued_at":1551321877.1403973,"error_message":"Email list not defined","error_class":"SmartvpnException","failed_at":1551321785.1030326,"retry_count":1,"retried_at":1551321818.5973263},"jobstr":"{\"class\":\"AddUserToNewsletterWorker\",\"args\":[\"[email protected]\",\"all\"],\"retry\":true,\"queue\":\"high\",\"jid\":\"cb947228755cb671ba1164d8\",\"created_at\":1551321779.9143016,\"enqueued_at\":1551321877.1403973,\"error_message\":\"Email list not defined\",\"error_class\":\"SmartvpnException\",\"failed_at\":1551321785.1030326,\"retry_count\":1,\"retried_at\":1551321818.5973263}"} app_1 | 02:44:37 worker.1 | 2019-02-28T02:44:37.147Z 15 TID-owavaimnz WARN: SmartvpnException: Email list not defined app_1 | 02:44:37 worker.1 | 2019-02-28T02:44:37.148Z 15 TID-owavaimnz WARN: /app/app/services/newsletter_manager.rb:17:in list_id'

ERROR: compose.cli.errors.log_timeout_error: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

@MrConstantine
Copy link
Author

Found that there are some additional variables in the .env.sample

SECRET_TOKEN=

EMAIL_ADDRESS=
EMAIL_PORT=
EMAIL_DOMAIN=
EMAIL_USER=
EMAIL_PASS=
EMAIL_FROM=
EMAIL_TLS=

ROLLBAR_ACCESS_TOKEN=

NEWRELIC_LICENSE_KEY=

ROBOKASSA_LOGIN=
ROBOKASSA_SECRET1=
ROBOKASSA_SECRET2=

WEBMONEY_SECRET=
WEBMONEY_WALLET_WMZ=
WEBMONEY_WALLET_WMR=

MAILCHIMP_API_KEY=
MAILCHIMP_ALL_CLIENTS_LIST_ID=

BRAND_NAME=

@MrConstantine
Copy link
Author

You will help? Up

@Mehonoshin
Copy link
Owner

@MrConstantine Cannot assign requested address - connect(2) for nil port means that you didn't not pass env variables to define mail server

EMAIL_ADDRESS=
EMAIL_PORT=
EMAIL_DOMAIN=
EMAIL_USER=
EMAIL_PASS=
EMAIL_FROM=
EMAIL_TLS=

Please do it.

@Mehonoshin
Copy link
Owner

@MrConstantine can you clarify what exactly goes wrong?

  • Does billing start?
  • Can you access it through web interface?
  • Or you are concerned by Email list not defined message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants