Matrix Server Startet nicht... Docker defekt ?


ToTesFeuer

Recommended Posts

On 3/25/2021 at 10:23 PM, ToTesFeuer said:

Das sagt erst einmal gar nichts aus. Diese Log-Meldungen habe bzw. hatte ich auch immer, der Matrix lief trotzdem.

 

Was zeigt denn der Zugriff auf die WebGUI unter http://[UNRAID-IP]:8008/_matrix/static/ ?

Poste mal Deine komplette homeserver.yaml

 

Leider bin ich derzeit nicht mehr sooo im Matrix-Thema, da ich mich noch mit meinem Unraid-Umzug beschäftige. Daher kann es meinerseits mit einer Antwort immer einige Zeit dauern.

Edited by JoergHH
Typo
Link to comment
  • 10 months later...

Ich bin wohl auch unfähig Matrix zum laufen zu bringen - oder noch zu neu um das alles zu verstehen.

 

Ich habe den Docker installiert und in den Einstellungen nur den Server-Namen verändert.

 

Habe gemäß Anleitung die homeserver.yaml editiert und in die bei mir leere Datei folgendes eingetragen:


 

- port: 8008
    tls: false
    type: http
    x_forwarded: true
    bind_addresses: ['::1', '0.0.0.0']

enable_registration: False <-- True if you want users to register
registration_shared_secret: "CODE"

 

Den CODE hat mir der angegeben Befehl. den ich in die Konsole eingeben habe, ausgespuckt.

 

In der Anleitung steht jetzt noch das man einen Admin Account erstellen kann/soll - also habe ich den Befehl in Konsole eingegeben und bekam das:

 

$ register_new_matrix_user -c /data/homeserver.yaml http://0.0.0.0:8008
Traceback (most recent call last):
  File "/usr/local/bin/register_new_matrix_user", line 19, in <module>
    main()
  File "/usr/local/lib/python3.9/dist-packages/synapse/_scripts/register_new_matrix_user.py", line 216, in main
    config = yaml.safe_load(args.config)
  File "/usr/local/lib/python3.9/dist-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/usr/local/lib/python3.9/dist-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.9/dist-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 111, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.9/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/local/lib/python3.9/dist-packages/yaml/parser.py", line 428, in parse_block_mapping_key
    if self.check_token(KeyToken):
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/local/lib/python3.9/dist-packages/yaml/scanner.py", line 577, in fetch_value
    raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
  in "/data/homeserver.yaml", line 2, column 8
$ 

 

Kann nur nicht sagen ob das jetzt was bewirkt hat oder nicht.

 

Wie bekomme ich Synapse-Admin mit Matrix verknüpft, so das ich eine GUI bekomme über die ich was "Einstellen" könnte?

Link to comment
  • 3 weeks later...
  • 3 weeks later...
  • 4 weeks later...

After trying to get this terror of a service up and running again (after having spent hours some months ago and losing my docker backup), I managed to do it again.

 

I've done all the hard work of downloading the OFFICIAL docker container of this and then generating the updated config files. You need the following, minimum to proceed.

 

matrix_files.zip

 

Follow the instructions in the readme.txt

 

Make sure to make the /appdata/matrix folder yourself via samba and copy the files over, or at least ensure that the permissions are correct. The container doesn't really have proper permissions set so it often cannot access files. Especially if you made them eg. via terminal as root.

 

Now remember to add the registration_shared_secret variable to your homeserver.yaml like so, it's around line 1300:

 

registration_shared_secret: "s0mekind0fmassive:::9generatedSTRINGhere!!"

 

Now you can install the matrix container from the Apps tab in Unraid.

After which you can register an admin user so you can actually make changes. Then you can remove the shared registration token.

 

$ register_new_matrix_user -c /data/homeserver.yaml http://0.0.0.0:8008
New user localpart [matrix]: <youradminusername>
Password: 
Confirm password: 
Make admin [no]: yes
Sending registration request...
Success!
$ 

 

Now you can register accounts and such using the OTHER app element-web.

 

God that was a pain... now it's 6:45am and I am going to sleep.

  • Like 1
Link to comment
14 hours ago, plantsandbinary said:

After trying to get this terror of a service up and running again (after having spent hours some months ago and losing my docker backup), I managed to do it again.

 

I've done all the hard work of downloading the OFFICIAL docker container of this and then generating the updated config files. You need the following, minimum to proceed.

 

matrix_files.zip 32.38 kB · 2 downloads

 

Follow the instructions in the readme.txt

 

Make sure to make the /appdata/matrix folder yourself via samba and copy the files over, or at least ensure that the permissions are correct. The container doesn't really have proper permissions set so it often cannot access files. Especially if you made them eg. via terminal as root.

 

Now remember to add the registration_shared_secret variable to your homeserver.yaml like so, it's around line 1300:

 

 

 

Now you can install the matrix container from the Apps tab in Unraid.

After which you can register an admin user so you can actually make changes. Then you can remove the shared registration token.

 

 

 

Now you can register accounts and such using the OTHER app element-web.

 

God that was a pain... now it's 6:45am and I am going to sleep.

 

Hi @plantsandbinary , thank you for sharing your installation steps.
I'm getting error messages when I try to create the new admin user:


 

$ register_new_matrix_user -c /data/homeserver.yaml http://0.0.0.0:8008
New user localpart [matrix]: mjeshurun
Password:
Confirm password:
Make admin [no]: yes
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 239, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/lib/python3.9/http/client.py", line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1331, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1280, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1040, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x152d41037730>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='0.0.0.0', port=8008): Max retries exceeded with url: /_synapse/admin/v1/register (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x152d41037730>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/register_new_matrix_user", line 19, in   

 

Do you, by chance, know what I should do to fix this?

Edited by mjeshurun
Link to comment

Your Matrix server name is wrong. Check the docker container. I changed it in the homeserver.yaml but forgot to change it in the docker container (it changed back on reboot). Basically you're missing something from the config. Did you use the one I provided in the .zip? Make sure you change the name of your matrix server in the file and also in the container. Then reboot the container. If that doesn't work. Kill the container and start again with the configs I provided.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.