ucrawler / nntplexer

Everyone is a cowboy here.
50 stars 14 forks source link

Setting up without/with using nodes (config help) #4

Closed MythodeaLoL closed 2 months ago

MythodeaLoL commented 2 months ago

I'm a little confused about the usage documentation.

Would it be possible to set up a server without using nodes? If so, how could it be done? Could you give an example of the SQL and nntplexer.ini configuration for this case?

And in the case of using nodes, what would the main configuration be, what would the node configuration be, and what would the SQL configuration be?

I plan to use it only for personal use for load balancing and searching for missing articles in other backends, so I wouldn't want to use nodes.

However, in the tests I did, it doesn't seem to download the articles. I don't know if the user database has the correct data, or could it be due to the lack of node configuration? @ucrawler

ucrawler commented 2 months ago

To run without external + internal you would need to swap the proxy_protocol around in nginx and nntplexer.ini.

Also make sure your node is set to 2 or 10 in the backends table and in nntplexer.ini.

MythodeaLoL commented 2 months ago

I still don't understand very well, sorry.

I'm trying to configure everything on localhost

2024/08/31 19:52:57 nntplexer v0.0.3 is starting...
2024/08/31 19:52:57 listening on 127.0.0.1:9999
2024/08/31 19:52:57 [monitoring] starting server on: 127.0.0.1:8888
2024/08/31 19:53:03 [cluster] init done, nodes joined: 0
[server]
addr = "127.0.0.1"
port = 9999
proxy_protocol = on
node = 2

[db]
# refer https://github.com/go-sql-driver/mysql#dsn-data-source-name for details
dsn = "root@tcp(127.0.0.1:3306)/nntp?charset=utf8mb4&parseTime=True&loc=Local"

# number of days article metadata will be stored in local cache
# used for cleanup, to keep `articles` table of a reasonable size
cache_ttl = 30

[monitoring]
addr = "127.0.0.1"
port = 8888
endpoint = /metrics

[cluster]
nodes =
bind_addr = "0.0.0.0"
bind_port = 7946
advertise_addr = ""
advertise_port = 7946
# 32 bytes key for AES-256 encryption between nodes
secret_key = "7AElHmk3X43hsHsTbH8mERC41PE9erzW"

backends: image

users: image

When running nntplexer.exe, sometimes I see a connection and the article is called, but there doesn't seem to be any download.

In other cases, like with nznget, I can't even connect using the host localhost and port 9999 without SSL.

ucrawler commented 2 months ago

Try connecting directly to nntplexer and test the server in your news client. Change proxy_protocol in nntplexer.ini if you can't connect.

I'll update the docs with the exact configs for your setup when I get the chance.

MythodeaLoL commented 2 months ago

seems a connection problem... connecting direct via 127.0.0.1:9999 without nginx 🤔

2024/08/31 23:31:11 [] Connection from 127.0.0.1 accepted
2024/08/31 23:31:11 [] <- Command: AUTHINFO, Arguments: [USER user1]
2024/08/31 23:31:11 [] <- Command: AUTHINFO, Arguments: [PASS pass1]
2024/08/31 23:31:11 [] -> Protocol error: 481 Authentication failed
2024/08/31 23:31:11 [] <- Command: QUIT, Arguments: []

using https://github.com/Tensai75/nzbrefresh

With another program, I can even connect, but it never seems to connect to the usenet servers:

2024/08/31 23:36:44 nntplexer v0.0.3 is starting...
2024/08/31 23:36:44 listening on 127.0.0.1:9999
2024/08/31 23:36:44 [monitoring] starting server on: 127.0.0.1:8888
2024/08/31 23:36:51 [cluster] init done, nodes joined: 0
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted
2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted

i get only this... @ucrawler

ucrawler commented 2 months ago

The top one works. Hash your password with sha256 using mysql inbuilt function.-OptiSent from my iPhoneOn Aug 31, 2024, at 11:38 PM, Castle @.***> wrote: seems a connection problem... connecting direct via 127.0.0.1:9999 without nginx 🤔 2024/08/31 23:31:11 [] Connection from 127.0.0.1 accepted 2024/08/31 23:31:11 [] <- Command: AUTHINFO, Arguments: [USER user1] 2024/08/31 23:31:11 [] <- Command: AUTHINFO, Arguments: [PASS pass1] 2024/08/31 23:31:11 [] -> Protocol error: 481 Authentication failed 2024/08/31 23:31:11 [] <- Command: QUIT, Arguments: []

using https://github.com/Tensai75/nzbrefresh With another program, I can even connect, but it never seems to connect to the usenet servers: 2024/08/31 23:36:44 nntplexer v0.0.3 is starting... 2024/08/31 23:36:44 listening on 127.0.0.1:9999 2024/08/31 23:36:44 [monitoring] starting server on: 127.0.0.1:8888 2024/08/31 23:36:51 [cluster] init done, nodes joined: 0 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted 2024/08/31 23:37:02 [] Connection from 127.0.0.1 accepted

i get only this... @ucrawler

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ucrawler commented 2 months ago

The top one works. Hash your password with sha256 using mysql inbuilt function.

MythodeaLoL commented 2 months ago

The top one works. Hash your password with sha256 using mysql inbuilt function.

I hadn't noticed that, really... now it all makes sense. thanks for the explanation.