pluja / nerostr

nostr paid relay, but with monero

Home Page:https://xmr.usenostr.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/bin/sh: /app/nerostr-auth.sh: not found

hundehausen opened this issue · comments

Hey Pluja,

I have some issues with my nerostr instance.
As you can see here my relay is nor readable.
Here is the log of the strfry-nerostr-relay

It says that /app/nerostr-auth.sh: is not found, but when I look into the containers file system I see the file.

Do you have any idea?

2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| arguments: /app/strfry relay
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| Current dir: /app
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| stderr verbosity: 0
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| -----------------------------------
2023-09-30 18:57:10.941 (   0.105s) [main thread     ]INFO| CONFIG: Loading config from file: /etc/strfry.conf
2023-09-30 18:57:10.960 (   0.123s) [main thread     ]INFO| CONFIG: successfully installed
2023-09-30 18:57:11.011 (   0.175s) [Websocket       ]INFO| Started websocket server on 0.0.0.0:7777
2023-09-30 18:57:11.444 (   0.607s) [Websocket       ]INFO| [1] Connect from 65.108.194.160 compression=Y sliding=N
2023-09-30 18:57:11.444 (   0.607s) [Websocket       ]INFO| [2] Connect from 87.210.44.58 compression=Y sliding=Y
2023-09-30 18:57:20.555 (   9.719s) [Websocket       ]INFO| [3] Connect from 210.151.194.53 compression=Y sliding=Y
2023-09-30 18:57:21.955 (  11.118s) [Websocket       ]INFO| [4] Connect from 172.71.142.49 compression=N sliding=N
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.170 (  11.334s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 (  11.335s) [Ingester 1      ]INFO| Rejected invalid event: created_at too early
2023-09-30 18:57:22.172 (  11.336s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found
2023-09-30 18:57:22.174 (  11.338s) [Writer          ] ERR| Couldn't setup plugin: pipe to plugin was closed (plugin crashed?)
2023-09-30 18:57:22.174 (  11.338s) [Writer          ]INFO| [4] write policy blocked event 0135af0a07e0cace7f61d53e5c10b93d6aa78ac0e58365aeb7c850051be543f2: error: internal error
2023-09-30 18:57:22.174 (  11.338s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
/bin/sh: /app/nerostr-auth.sh: not found

Okay I pulled the latest images and now the error is different, or is it correct like this?

2023-09-30 19:48:47.161 ( 300.282s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh
2023-09-30 19:48:47.405 ( 300.526s) [Writer          ] ERR| Couldn't setup plugin: unknown action:
2023-09-30 19:48:47.405 ( 300.526s) [Writer          ]INFO| [36] write policy blocked event eeee8337fcd8d630ec0117ad2d4a6b07fd744ab5630xxxxxxxxxxx: error: internal error

Hey, the plugin should output a message like "you have to pay the fee" to the terminal... are you sure you're on the latest version? I made a change since strfry changed their base image to alpine, and alpine does not have the bash command by default so it broke the plugin. With the latest version it should be fixed since it is now using sh instead of bash.

Here's what is looking like from my relay running the latest version:

nerostr-strfry-relay  | 2023-10-01 05:25:46.038 (167814.121s) [Writer          ]INFO| Inserted event. id=b6ca6c4e6c2a9c0a77f507108f8110cde77ae1c3797cea2adec4162051d01a71 levId=16249
nerostr-strfry-relay  | 2023-10-01 05:25:46.399 (167814.482s) [Writer          ]INFO| [18788] write policy blocked event 536e9d5bdfe72ab28609ba7199e373e2087acc541616319715b3777a18ba9109: blocked: you must pay admission fee. visit relay url on browser.
nerostr-strfry-relay  | 2023-10-01 05:25:46.691 (167814.774s) [Writer          ]INFO| [18788] write policy blocked event 536e9d5bdfe72ab28609ba7199e373e2087acc541616319715b3777a18ba9109: blocked: you must pay admission fee. visit relay url on browser.

Yes, I am 100 % sure, I am using the latest images. It's using sh, and now I get this error messages:

2023-10-01 06:00:32.420 ( 264.001s) [Writer          ] ERR| Couldn't setup plugin: unknown action:
2023-10-01 06:00:32.420 ( 264.002s) [Writer          ]INFO| [37] write policy blocked event 6cae4af50c671bfa51427230202949e722849cd59c4de643596fbdbb9f0a8682: error: internal error
2023-10-01 06:00:32.420 ( 264.002s) [Writer          ]INFO| Setting up write policy plugin: /app/nerostr-auth.sh

hey, did you find what was causing this? or you still have the same issue?

Hey pluja, I still have this issue. How can we debug this?

Do you think you could "redo" the setup to see if it still persists? On my side, I will try to redo a separate setup to see if I can replicate.

Yes, I can redo the setup. Is there anything I have to back up besides the public keys?

Hey, I meant in a separate environment, maybe you could do it even locally just to test out

I have just tested locally, it is finding the script and executing it without issues. Please confirm is you are having that problem with a local setup.

I am using noscl for the testing client: https://github.com/fiatjaf/noscl

You can use noscl relay add ws://127.0.0.1:7777 to connect to the local relay (you will need to locally expose the strfry port). then noscl publish "hello" to test out.

Thank you, @pluja, I have redone the setup and now Nerostr is running fine.