immanuelfodor / rocketchat-push-gateway

A push gateway for RocketChat to send notifications through Gotify
Do What The F*ck You Want To Public License
42 stars 7 forks source link

tag #4

Closed shurakenas closed 2 years ago

shurakenas commented 2 years ago

Where to get the tag?

immanuelfodor commented 2 years ago

Which tag? The Apprise tag? It's the RC push token, you can find how to extract it from MongoDB in the readme.

shurakenas commented 2 years ago

in the file (example) apprise-config.example.yml specified

- gotify://hostname/my-rANd0m-app-tOkEN:
  - tag: push-gw-admin, myuser-vERy-l0nG-rAnd0M-PuSHtOKen

push-gw-admin - what is it? myuser-vERy-l0nG-rAnd0M-PuSHtOKen - I understood this, a token from RC

immanuelfodor commented 2 years ago

That is an arbitrary string, it could be fluffy-bunny or anything. I chose that one to make testing easier to be able to target myself among other users:

shurakenas commented 2 years ago

tell me, what could be the problem? Rocketcat and Notify are on the same host

{"level":50,"time":"2022-05-18T10:09:05.566Z","pid":13211,"hostname":"rocket","name":"Push","msg":"Error sending push to gateway (1 try) -> {\"response\":{\"statusCode\":404,\"content\":\"{\\\"error\\\":\\\"Not Found\\\",\\\"errorCode\\\":404,\\\"errorDescription\\\":\\\"page not found\\\"}\",\"headers\":{\"connection\":\"close\",\"content-length\":\"73\",\"content-type\":\"application/json\",\"date\":\"Wed, 18 May 2022 10:09:05 GMT\",\"server\":\"nginx/1.14.2\",\"strict-transport-security\":\"max-age=31536000\",\"x-xss-protection\":\"1; mode=block\"},\"ok\":false,\"data\":{\"error\":\"Not Found\",\"errorCode\":404,\"errorDescription\":\"page not found\"}}}"}

immanuelfodor commented 2 years ago

This looks like an RC log output. First, you should check the gateway logs, was any request received at all? Second, if both RC and the gateway runs in Docker, you can't use localhost as the gateway's address when entering it into RC, localhost in the RC container will be resolved to itself. In this case, you can either run both containers with host networking (quick&dirty) to make localhost work with the corresponding port, or you can use the host machine's IP address to point to the gateway. Docker might also have an internal reserved domain name to resolve to the host but there is a long thread that it is not always working: https://github.com/docker/for-linux/issues/264 If you run both of them with docker-compose within the same virtual network (same virtual bridge), then you can use the gateway's service name as the hostname.

shurakenas commented 2 years ago

I don't use docker. Where are the gateway logs?

shurakenas commented 2 years ago

I realized this, I was inattentive. thanks for the feedback

immanuelfodor commented 2 years ago

Okay, I'm closing this for now as it is mostly about support :)