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

Error: unable to connect to node rabbit: nodedown #13

Closed
njuaplusplus opened this issue Oct 20, 2015 · 16 comments
Closed

Error: unable to connect to node rabbit: nodedown #13

njuaplusplus opened this issue Oct 20, 2015 · 16 comments
Assignees
Milestone

Comments

@njuaplusplus
Copy link

Hi, I met with some problem. The zulip fail to work.
And it's the logs.

zulip_1 | Deleting user "guest" ...
zulip_1 | Error: unable to connect to node rabbit@334a5e30e550: nodedown
zulip_1 |
zulip_1 | DIAGNOSTICS
zulip_1 | ===========
zulip_1 |
zulip_1 | nodes in question: [rabbit@334a5e30e550]
zulip_1 |
zulip_1 | hosts, their running nodes and ports:
zulip_1 | - 334a5e30e550: [{rabbitmqctl21,39997}]
zulip_1 |
zulip_1 | current node details:
zulip_1 | - node name: rabbitmqctl21@334a5e30e550
zulip_1 | - home dir: /var/lib/rabbitmq
zulip_1 | - cookie hash: VvBKmLVr1o2yQ4eeTognIQ==
zulip_1 |
zulip_1 | Creating user "zulip" ...
zulip_1 | Error: unable to connect to node rabbit@334a5e30e550: nodedown
@galexrt
Copy link
Collaborator

galexrt commented Oct 20, 2015

Are you using docker-compose up to start it?
Is the container stopping after these "errors", because I have no problems.
It seems these "errors" are just because in this case the user guest is non existing.
I'll supress these errors from rabbitmqctl in my next commit, but as I said it should "boot" without any problems, when using the default docker-compose.yml

@galexrt
Copy link
Collaborator

galexrt commented Oct 20, 2015

rabbitmqctl setup errors are now supressed.
Added in commit b2775d5.

Can you try again and see if Zulip is reachable on your host (should be https://127.0.0.1)?
BTW have you generated the certificates using the generate_certs.sh script and moved them to the correct location?

@galexrt galexrt closed this as completed Oct 20, 2015
@galexrt galexrt reopened this Oct 20, 2015
@galexrt galexrt self-assigned this Oct 20, 2015
@galexrt
Copy link
Collaborator

galexrt commented Oct 20, 2015

The certificates are now generated automatically, if they don't exist in the data volume.
See #14 for details.

@njuaplusplus
Copy link
Author

@galexrt Thank you for your reply. Yes, I use the docker-compose up -d to start it.
And zulip container stopped after the error, while others (database, reddis....) still ran.

I will try again and reply later.

@decker502
Copy link

+1

I got the same problem

zulip_1     | Setting tags for user "zulip" to [administrator] ...
zulip_1     | Error: unable to connect to node rabbit@68e92d893c9e: nodedown
zulip_1     | 
zulip_1     | DIAGNOSTICS
zulip_1     | ===========
zulip_1     | 
zulip_1     | nodes in question: [rabbit@68e92d893c9e]
zulip_1     | 
zulip_1     | hosts, their running nodes and ports:
zulip_1     | - 68e92d893c9e: [{rabbitmqctl118,44514}]
zulip_1     | 
zulip_1     | current node details:
zulip_1     | - node name: rabbitmqctl118@68e92d893c9e
zulip_1     | - home dir: /var/lib/rabbitmq
zulip_1     | - cookie hash: iUMOUTJBvbouqoUCdJwRPQ==
zulip_1     | 
zulip_1     | Generating and setting secrets ...
zulip_1     | Generated Camo config file /etc/default/camo
zulip_1     | Generated /etc/zulip/zulip-secrets.conf with auto-generated secrets!
zulip_1     | Setting secret "email_password".
zulip_1     | Setting secret "rabbitmq_password".
zulip_1     | No secret found for key "s3_key".
zulip_1     | No secret found for key "s3_secret_key".
zulip_1     | No secret found for key "android_gcm_api_key".
zulip_1     | No secret found for key "google_oauth2_client_secret".
zulip_1     | No secret found for key "dropbox_app_key".
zulip_1     | No secret found for key "mailchimp_api_key".
zulip_1     | No secret found for key "mandrill_api_key".
zulip_1     | No secret found for key "twitter_consumer_key".
zulip_1     | No secret found for key "twitter_consumer_secret".
zulip_1     | No secret found for key "twitter_access_token_key".
zulip_1     | No secret found for key "twitter_access_token_secret".
zulip_1     | Secrets generated and set.
zulip_1     | Setting Zulip settings ...
zulip_1     | No zulip.key given in /data.
zulip_1     | Zulip setup failed.
zulip_1     | mkdir: cannot create directory '/home/zulip/uploads': File exists

@njuaplusplus
Copy link
Author

@galexrt
Now, it says

database_1  | 2015-10-21 03:33:58 UTC [95-1] zulip@zulip ERROR:  could not open dictionary file "/usr/share/postgresql/9.4/tsearch_data/en_us.dict": No such file or directory
database_1  | 2015-10-21 03:33:58 UTC [95-2] zulip@zulip STATEMENT:
database_1  |   CREATE TEXT SEARCH DICTIONARY english_us_hunspell
database_1  |     (template = ispell, DictFile = en_us, AffFile = en_us, StopWords = zulip_english);
database_1  |   CREATE TEXT SEARCH CONFIGURATION zulip.english_us_search (COPY=pg_catalog.english);
database_1  |   ALTER TEXT SEARCH CONFIGURATION zulip.english_us_search
database_1  |     ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part
database_1  |     WITH english_us_hunspell, english_stem;
database_1  |
database_1  |   CREATE FUNCTION escape_html(text) RETURNS text IMMUTABLE LANGUAGE 'sql' AS $$
database_1  |     SELECT replace(replace(replace(replace(replace($1, '&', '&amp;'), '<', '&lt;'),
database_1  |                                    '>', '&gt;'), '"', '&quot;'), '''', '&#39;');
database_1  |   $$ ;
database_1  |
database_1  |   ALTER TABLE zerver_message ADD COLUMN search_tsvector tsvector;
database_1  |   CREATE INDEX zerver_message_search_tsvector ON zerver_message USING gin(search_tsvector);
database_1  |   ALTER INDEX zerver_message_search_tsvector SET (fastupdate = OFF);
database_1  |
database_1  |   CREATE TABLE fts_update_log (id SERIAL PRIMARY KEY, message_id INTEGER NOT NULL);
database_1  |   CREATE FUNCTION do_notify_fts_update_log() RETURNS trigger LANGUAGE plpgsql AS
database_1  |     $$ BEGIN NOTIFY fts_update_log; RETURN NEW; END $$;
database_1  |   CREATE TRIGGER fts_update_log_notify AFTER INSERT ON fts_update_log
database_1  |     FOR EACH STATEMENT EXECUTE PROCEDURE do_notify_fts_update_log();
database_1  |   CREATE FUNCTION append_to_fts_update_log() RETURNS trigger LANGUAGE plpgsql AS
database_1  |     $$ BEGIN INSERT INTO fts_update_log (message_id) VALUES (NEW.id); RETURN NEW; END $$;
database_1  |   CREATE TRIGGER zerver_message_update_search_tsvector_async
database_1  |     BEFORE INSERT OR UPDATE OF subject, rendered_content ON zerver_message
database_1  |     FOR EACH ROW EXECUTE PROCEDURE append_to_fts_update_log();
database_1  |
zulip_1     |   Applying zerver.0001_initial...Traceback (most recent call last):
zulip_1     |   File "/home/zulip/deployments/current/manage.py", line 21, in <module>
zulip_1     |     execute_from_command_line(sys.argv)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
zulip_1     |     utility.execute()
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 330, in execute
zulip_1     |     self.fetch_command(subcommand).run_from_argv(self.argv)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 393, in run_from_argv
zulip_1     |     self.execute(*args, **cmd_options)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 444, in execute
zulip_1     |     output = self.handle(*args, **options)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 221, in handle
zulip_1     |     executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 110, in migrate
zulip_1     |     self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 148, in apply_migration
zulip_1     |     state = migration.apply(state, schema_editor)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/migration.py", line 115, in apply
zulip_1     |     operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/operations/special.py", line 102, in database_forwards
zulip_1     |     self._run_sql(schema_editor, self.sql)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/operations/special.py", line 127, in _run_sql
zulip_1     |     schema_editor.execute(statement, params=None)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/base/schema.py", line 111, in execute
zulip_1     |     cursor.execute(sql, params)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
zulip_1     |     return self.cursor.execute(sql, params)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 97, in __exit__
zulip_1     |     six.reraise(dj_exc_type, dj_exc_value, traceback)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 62, in execute
zulip_1     |     return self.cursor.execute(sql)
zulip_1     |   File "/home/zulip/deployments/2015-10-20-17-30-08/zerver/lib/db.py", line 23, in execute
zulip_1     |     return wrapper_execute(self, super(TimeTrackingCursor, self).execute, query, vars)
zulip_1     |   File "/home/zulip/deployments/2015-10-20-17-30-08/zerver/lib/db.py", line 11, in wrapper_execute
zulip_1     |     return action(sql, params)
zulip_1     | django.db.utils.InternalError: could not open dictionary file "/usr/share/postgresql/9.4/tsearch_data/en_us.dict": No such file or directory
zulip_1     |
zulip_1     | Zulip migration failed.
zulip_zulip_1 exited with code 1

@decker502
Copy link

My logs is the same

Added zulip's log.

zulip_1 | Zulip settings setup done.
zulip_1 | Setting up database settings and server ...
zulip_1 | ERROR:  permission denied to create role
zulip_1 | Waiting for database server to allow connectionsALTER ROLE
zulip_1 | ERROR:  must be owner of database zulip
zulip_1 | ERROR:  database "zulip" already exists
zulip_1 | CREATE SCHEMA
zulip_1 | ERROR:  permission denied to create extension "tsearch_extras"
zulip_1 | HINT:  Must be superuser to create this extension.
zulip_1 | Database setup done.
zulip_1 | Checking zulip config ...
zulip_1 | Initiating  Database ...
zulip_1 | Migrating database ...
zulip_1 | Operations to perform:
zulip_1 |   Synchronize unmigrated apps: staticfiles, pipeline
zulip_1 |   Apply all migrations: confirmation, sessions, guardian, zerver, sites, auth, contenttypes
zulip_1 | Synchronizing apps without migrations:
zulip_1 |   Creating tables...
zulip_1 |     Running deferred SQL...
zulip_1 |   Installing custom SQL...
zulip_1 | Running migrations:
zulip_1 |   Rendering model states... DONE
zulip_1 |   Applying contenttypes.0001_initial... OK
zulip_1 |   Applying contenttypes.0002_remove_content_type_name... OK
zulip_1 |   Applying auth.0001_initial... OK
zulip_1 |   Applying auth.0002_alter_permission_name_max_length... OK
zulip_1 |   Applying auth.0003_alter_user_email_max_length... OK
zulip_1 |   Applying auth.0004_alter_user_username_opts... OK
zulip_1 |   Applying auth.0005_alter_user_last_login_null... OK
zulip_1 |   Applying auth.0006_require_contenttypes_0002... OK
zulip_1 |   Applying confirmation.0001_initial... OK
zulip_1 | Traceback (most recent call last):
zulip_1 |   File "/home/zulip/deployments/current/manage.py", line 21, in <module>
zulip_1 |     execute_from_command_line(sys.argv)
zulip_1 |   File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
zulip_1 |     utility.execute()

@galexrt
Copy link
Collaborator

galexrt commented Oct 21, 2015

It seems like a database problem. I'm working on a fix for it.

@galexrt
Copy link
Collaborator

galexrt commented Oct 21, 2015

I fixed the error, as I thought it was a problem with the galexrt/zulip-postgresql-tsearchextras container. It is now fixed in the latest version.

Please remove and/or repull both images!
Can you try again using quay.io/galexrt/zulip:latest instead of quay.io/galexrt/zulip:1.3.6 and repull quay.io/galexrt/zulip-postgresql-tsearchextras:latest.

For me it's working now, please tell me if it's working for you now too.
I merged the fixes into the version tag and branch now.

BTW: If you start the container and it doesn't return with a exit code, then everything should be okay.

@njuaplusplus
Copy link
Author

@galexrt
Great! It seems to work now!
Thank you!

@njuaplusplus
Copy link
Author

@galexrt
But I meet another problem.
The 'forget password' email can't be sent.
I use the mailgun to send email, and it shows that zulip does not calling mailgun to send email.

Also, I can't login zulip by the ZULIP_USER_EMAIL and ZULIP_USER_PASSWORD,
do I miss something?

@galexrt
Copy link
Collaborator

galexrt commented Oct 21, 2015

@njuaplusplus I create a new ticket for your problem with the login.

I'll close this ticket now, as it seems to work again. :)

@galexrt galexrt closed this as completed Oct 21, 2015
@galexrt galexrt added this to the 1.3.7 milestone Oct 21, 2015
@galexrt
Copy link
Collaborator

galexrt commented Oct 21, 2015

@njuaplusplus See #17 and #16.

@toan2948
Copy link

toan2948 commented Apr 25, 2018

I have the log like this:

DIAGNOSTICS
zulip_1      | ===========
zulip_1      | 
zulip_1      | attempted to contact: [rabbitmq@4ffe37383a75]
zulip_1      | 
zulip_1      | rabbitmq@4ffe37383a75:
zulip_1      |   * connected to epmd (port 4369) on 4ffe37383a75
zulip_1      |   * epmd reports: node 'rabbitmq' not running at all
zulip_1      |                   no other nodes on 4ffe37383a75
zulip_1      |   * suggestion: start the node
zulip_1      | 
zulip_1      | current node details:
zulip_1      | - node name: 'rabbitmq-cli-337@4ffe37383a75'
zulip_1      | - home dir: /var/lib/rabbitmq
zulip_1      | - cookie hash: mMXCT8CVI2CVwROdZbmFEw==
zulip_1      | 
zulip_1      | + true
zulip_1      | + sudo rabbitmqctl -n rabbitmq add_user zulip zulip
zulip_1      | Error: unable to connect to node rabbitmq@4ffe37383a75: nodedown
zulip_1      | 
zulip_1      | DIAGNOSTICS
zulip_1      | ===========
zulip_1      | 
zulip_1      | attempted to contact: [rabbitmq@4ffe37383a75]
zulip_1      | 
zulip_1      | rabbitmq@4ffe37383a75:
zulip_1      |   * connected to epmd (port 4369) on 4ffe37383a75
zulip_1      |   * epmd reports: node 'rabbitmq' not running at all
zulip_1      |                   no other nodes on 4ffe37383a75
zulip_1      |   * suggestion: start the node
zulip_1      | 
zulip_1      | current node details:
zulip_1      | - node name: 'rabbitmq-cli-450@4ffe37383a75'
zulip_1      | - home dir: /var/lib/rabbitmq
zulip_1      | - cookie hash: mMXCT8CVI2CVwROdZbmFEw==
zulip_1      | 
**zulip_1      | RabbitMQ bootstrap succeeded.
zulip_1      | Executing Zulip first start init ...
zulip_1      | First Start Init not needed. Continuing**.

Is Rabbitmq running well? Is there any problem in the contact between Rabbitmq and Zulip ? or is everything fine?

@galexrt
Copy link
Collaborator

galexrt commented Apr 25, 2018

@toan2948 As written above in this issue, the errors are okay because the Rabbitmq is already correctly setup. The "errors" mean that rabbitmq could not be reconfigured which is as written okay in that case.

Please use your created issue for questions and/or issues you experience. This issue is from Oct 21, 2015..

@toan2948
Copy link

Excuse me :). I thought the issues should be in the same topics.

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

No branches or pull requests

4 participants