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

Can't create users - ERROR! Received 500 Internal Server Error #3152

Open
Kuphi opened this issue Feb 3, 2024 · 1 comment
Open

Can't create users - ERROR! Received 500 Internal Server Error #3152

Kuphi opened this issue Feb 3, 2024 · 1 comment

Comments

@Kuphi
Copy link

Kuphi commented Feb 3, 2024

Describe the bug
Can't create user using:

docker exec matrix-synapse register_new_matrix_user -u "username" -p "password" -c /data/homeserver.yaml --admin http://localhost:8008

or

ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=username password=password admin=no' --tags=register-user

respectively.

Output of the latter is:

[...]
TASK [custom/matrix-synapse : Register user] *****************************************************************************************************************************
fatal: [matrix.domain.com]: FAILED! => changed=false 
  cmd:
  - /matrix/synapse/bin/register-user
  - user
  - password
  - '0'
  delta: '0:00:03.281327'
  end: '2024-02-03 12:00:24.398932'
  msg: non-zero return code
  rc: 1
  start: '2024-02-03 12:00:21.117605'
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    Sending registration request...
    ERROR! Received 500 Internal Server Error
  stdout_lines: <omitted>

PLAY RECAP ***************************************************************************************************************************************************************
matrix.domain.com            : ok=7    changed=0    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0   

To Reproduce
My vars.yml file looks like this:

matrix_domain: domain.com
matrix_homeserver_implementation: synapse
matrix_homeserver_generic_secret_key: '******'
matrix_playbook_reverse_proxy_type: playbook-managed-traefik
devture_traefik_config_certificatesResolvers_acme_email: '[email protected]'
devture_postgres_connection_password: '******'
matrix_synapse_admin_enabled: true
devture_playbook_help_container_retries_delay: 9
devture_playbook_help_container_retries_count: 9
#I have a slow 1CPU server, thus:
devture_systemd_service_manager_up_verification_delay_seconds: 180

Expected behavior
Can create users without manual adjustments.

Matrix Server:

  • OS: Debian 12
  • Architecture: amd64
@spantaleev
Copy link
Owner

When you get "ERROR! Received 500 Internal Server Error", you can check the logs for Synapse and see what the actual problem is.

It may be that Synapse is not fully up yet, because it's failing to reach the database. You said your server is slow, so maybe Postgres is slow to start. This would only affect the 1st time you run the command though. The 2nd time around, both Synapse and Postgres should have already have a lot of time to start, so it should work.

If you're seeing this problem after retrying, then it's probably some other error. Check the matrix-synapse logs - see How to see the current status of your services.

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

No branches or pull requests

2 participants