dalcde / matrix-appservice-mattermost

MIT License
34 stars 3 forks source link

no clue how to reolve #87

Open jimscarver opened 4 years ago

jimscarver commented 4 years ago

root@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/code# su cloudron cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/code$ cd ../data/matrix-appservice-mattermost/ cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/data/matrix-appservice-mattermost$ ./start& [2] 275 cloudron@f52c6f46-acc6-4bc2-b6f4-6da33eeda2e2:/app/data/matrix-appservice-mattermost$ Output registration to: registration.yaml cat bridge.log Bridge loaded: 1433.685ms (node:283) UnhandledPromiseRejectionWarning: M_UNKNOWN_TOKEN: Unrecognised access token at parseErrorResponse (/app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:826:13) at /app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:781:17 at Request._callback (/app/data/matrix-appservice-mattermost/node_modules/matrix-js-sdk/lib/http-api.js:715:9) at Request.self.callback (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:185:22) at Request.emit (events.js:310:20) at Request. (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:1154:10) at Request.emit (events.js:310:20) at IncomingMessage. (/app/data/matrix-appservice-mattermost/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:416:28) at IncomingMessage.emit (events.js:322:22) (node:283) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:283) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. I need help....

config.zip

dalcde commented 4 years ago

Did you add the registration file to the homeserver config?

jimscarver commented 4 years ago

Oops,thought I had done that. What section does app_service_config_files go in? Adding it at the top level fails. app_service_config_files: '/app/data/matrix-appservice-mattermost/registration.yaml'

/app/data/matrix-appservice-mattermost/build/Config.js:35
        throw new Error((_b = (_a = exports.validator.errors) === null || _a === void 0 ? void 0 : _a.map(e => `${e.dataPath}: ${e.message} (${JSON.stringify(e.params)})`)) === null || _b === void 0 ? void 0 : _b.join('\n'));
        ^

Error: : should NOT have additional properties ({"additionalProperty":"app_service_config_files"})
    at Object.validate (/app/data/matrix-appservice-mattermost/build/Config.js:35:15)
    at Object.<anonymous> (/app/data/matrix-appservice-mattermost/build/index.js:47:14)
dalcde commented 4 years ago

It's top level but it should be a list, so

app_service_config_files:

jimscarver commented 4 years ago

I tries the path with and without 'quotes'

app_service_config_files:
  - /app/data/matrix-appservice-mattermost/registration.yaml


/app/data/matrix-appservice-mattermost/build/Config.js:35
        throw new Error((_b = (_a = exports.validator.errors) === null || _a === void 0 ? void 0 : _a.map(e => `${e.dataPath}: ${e.message} (${JSON.stringify(e.params)})`)) === null || _b === void 0 ? void 0 : _b.join('\n'));
        ^

Error: : should NOT have additional properties ({"additionalProperty":"app_service_config_files"})
    at Object.validate (/app/data/matrix-appservice-mattermost/build/Config.js:35:15)
    at Object.<anonymous> (/app/data/matrix-appservice-mattermost/build/index.js:47:14)
dalcde commented 4 years ago

Oh this should be put in synapse's homeserver.yaml, not the bridge's config file.

jimscarver commented 4 years ago

Thank you! It now starts and runs quietly but the bridged do not work and https://matrix.diglife.coop/bridge/status says "No Such Resource" :(

dalcde commented 4 years ago

Can you access the bridge from the machine the bridge is running on?

jimscarver commented 4 years ago

I cannot access the bridge locally inside the container running matrix and the bridge either.

$ netstat -ltnp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.11:34973        0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:8008            0.0.0.0:*               LISTEN      100/python3         
$ ps aux|grep node
cloudron   197  1.4  1.5 758512 62972 pts/1    Sl   10:38   0:01 node build/index.js -c config.yaml -f registration.yaml
cloudron   210  0.0  0.0  11464  1092 pts/1    S+   10:40   0:00 grep --color=auto node
$ curl http://0.0.0.0:8008/bridge/status

<html>
  <head><title>404 - No Such Resource</title></head>
  <body>
    <h1>No Such Resource</h1>
    <p>No such child resource.</p>
  </body>
</html>
dalcde commented 4 years ago

You should be curling localhost:9995 for the bridge status. In your config, localhost:8008 is the address of the matrix homeserver.

On Wed, Oct 21, 2020 at 03:48:11AM -0700, Jim Whitescarver wrote:

I cannot access the bridge locally inside the container running matrix and the bridge either.

$ netstat -ltnp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.11:34973        0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8008            0.0.0.0:*               LISTEN      100/python3
$ ps aux|grep node
cloudron   197  1.4  1.5 758512 62972 pts/1    Sl   10:38   0:01 node build/index.js -c config.yaml -f registration.yaml
cloudron   210  0.0  0.0  11464  1092 pts/1    S+   10:40   0:00 grep --color=auto node
$ curl http://0.0.0.0:8008/bridge/status

<html>
 <head><title>404 - No Such Resource</title></head>
 <body>
   <h1>No Such Resource</h1>
   <p>No such child resource.</p>
 </body>
</html>

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/dalcde/matrix-appservice-mattermost/issues/87#issuecomment-713481637

jimscarver commented 3 years ago

there is nothing listening on port 9995 and no output. Any clue how to debug this?