Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Torque is cheap.


rocksolid / Rocksolid Nodes Help / Re: [bug report] data for fresh rslight install not syncing any messages

Re: [bug report] data for fresh rslight install not syncing any messages

<f539ea5efeb9c52404369413919be686$1@news.novabbs.org>

  copy mid

https://news.novabbs.org/rocksolid/article-flat.php?id=667&group=rocksolid.nodes.help#667

  copy link   Newsgroups: rocksolid.nodes.help
Date: Sat, 9 Dec 2023 11:23:48 +0000
Message-ID: <f539ea5efeb9c52404369413919be686$1@news.novabbs.org>
Organization: Rocksolid Light
From: retroguy@novabbs.org (Retro Guy)
Subject: Re: [bug report] data for fresh rslight install not syncing any
messages
Newsgroups: rocksolid.nodes.help
X-Face: .&YR-G(w(DZ$$,}%k=]*5*!p'=(anr"IT`wZG'2VWdfl\r)l[42u7JH`n(JUQ*e5
*A|XCDf?&\X&uwkl38"CYX3O8m}C8E4p'%N$2#kSTVzx{Ly|DjLT\Vk7NE}NQ(VC$Yq]i:7
|z[.9iv^g>*8_BH0=hZt'[%)4kG|
References: <20231207072108.5828229f@dev>
<a5ec99fe2e4fa5981c1ddac89e40c3a9$1@news.novabbs.org>
<20231207145151.1e4e0cf8@dev>
<45614232c688d63b285f6722d224eeb9@rocksolidbbs.com>
<20231207181823.4ceb4d76@dev> <717039d70886635ef10260014994c711@example.com>
<20231208165140.792ce244@dev> <20231208215835.2061849a@dev>
<20231208231043.666beb7b@dev> <20231209012242.19c53bd9@dev>
<20231209022406.2580b9b7@dev>
MIME-Version: 1.0
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
 by: Retro Guy - Sat, 9 Dec 2023 11:23 UTC

On Fri, 8 Dec 2023 16:51:40 -0600, Syber Shock wrote:

> <snip> continuation of thread as bug report data </snip>
>
> Retro Guy: will you check your NNTP access logs for logs containing user
> 'sybershock' at i2pn2.org and novabbs.org?

I'm seeing logins, but no activity. (Just log in and leave).

> I tried again with the most recent rslight version set for tradspool.
> Newsportal and NNTP server never come online. Data below.
>
> OS info:
> OS: Debian GNU/Linux 12 (bookworm) x86_64 Kernel: 6.1.0-13-amd64
> Server info:
> Package: nginx Version: 1.25.3-1~bookworm
> Package: apache2 Version: 2.4.58-1+0~20231025.34+debian12~1.gbp0fd694
> nginx is proxy with php-fpm enabled.

Thanks for this info. My testing system:
OS: Debian 12 (Bookworm) x86_64 Kernel: 6.1.37-1
Nginx: 1.22.1-9
PHP, php-fpm: 8.2.7

Install dirs: DEFAULT (/etc/rslight, /var/spool/rslight, /var/www/html)
All suggested packages from INSTALL file installed.

> Steps taken:
>
> 1. Download .zip from gitlab.
> 2. Unpack .zip.
> 3. Run installer and mkdir spool/nocem/failed & spool/nocem/processed.

I find that I do not need to create these dirs manually. They are only
created if 'nocem' is configured to be used, but I get NO errors without
these dirs existing.

> 4. Configured using /common/setup.php for test account at i2pn2.org.
> 5. Manually connected to i2pn2.org with openssl.
> 6. Verified authinfo and got successful authentication at i2pn2.org.
> ==> 281 Authentication succeeded

YAY!

> 7. Fired the cron job manually by copypasting the output from installer.

You may try (this is how I do it) to run it manually by:
cd <$webdir>/spoolnews
php <$config_dir>/scripts/cron.php

Run the above as 'root' user (cron.php must be run as root)

> 8. Looped the cron job many times with short intervals.
> 9. Each run of the cron job gave exactly this output:
>
> Updated user count Sending articles Send Done Refreshed spoolnews
> Expired articles Sending articles Send Done Refreshed spoolnews Expired
> articles RSS Feeds updated Log files rotated Keys rotated Removed old
> files
>
> There are no exceptions to this output. It is exactly the same output on
> every cron run during testing.

Interesting. It is making it through the entire script.

> 10. PHP portal pages give this error on all tries:
> ==> Error: The connection to the Message Server failed.
> 11. The cron job never activates newsportal.php.
> 12. The local NNTP server never runs at all.
> 13. Checked firewall and NNTP ports are whitelisted.
> 14. 100% certain that the NNTP server is never activated by cron job.
> 15. No nntp.lock or nntp-ssl.lock ever appears in spool/lock folder.

I know you know this, but just putting it out there in case:
'local_server' => '[::]', // where to bind
'local_port' => '1119', // port to bind
'local_ssl_port' => '1563', // ssl port to bind if using ssl
'enable_all_networks' => '', // just bind to all available
'server_auth_user' => 'localuser', // local nntp server username for
newsportal
'server_auth_pass' => 'blahblahblah', // local nntp server password for
newsportal

> 23. Cat nntp.log.1
> ==> Dec 08 21:03:40 Creating self-signed certificate

This is actually run from cron.php

>
> 27. expire.log has hundreds of VACUUM entries.

expire should actually create a file in $spooldir to keep track of when it
last ran.
You should see files like 'rocksolid-expire-timer' in $spooldir, and when
you try to run expire.php again, it should immediately quit if the file is
not at least 24 hours old.

Are these files being created?
>
> 28. spool/log# cat spoolnews.log
>
> Dec 08 21:07:20 spoolnews remote_server: news.i2pn2.org Dec 08 21:08:24
> spoolnews remote_server: news.i2pn2.org Dec 08 21:09:41 spoolnews
> remote_server: news.i2pn2.org [truncated]
> Dec 08 22:15:28 spoolnews remote_server: news.i2pn2.org Dec 08 22:15:42
> spoolnews remote_server: news.i2pn2.org Dec 08 22:15:56 spoolnews
> remote_server: news.i2pn2.org Dec 08 22:16:09 spoolnews remote_server:
> news.i2pn2.org
>
> I also get the same output for all other servers tried.

Are the config files in $config_dir (mainly groups.txt in sections)
readable by www-data (or whatever www user)?
Is menu.conf default and readable?

> All I can tell is that the local newsportal NNTP server never runs at
> all and no errors of any kind appear anywhere I would expect errors.

Try (as root):
cd $webdir/spoolnews
php $config_dir/scripts/nntp.php

and see what errors you get (if any).

> [Fri Dec 08 21:00:30.241715 2023] [proxy_fcgi:error] [pid 25642:tid
> 139703332300480] [client 174.247.224.6:0] AH01071: Got error 'PHP
> message: PHP Fatal error: Uncaught Error: Call to undefined function
> fdiv() in .../rocksolid/newsportal.php:1796\nStack trace:\n#0
> .../rocksolid/head.inc(10): throttle_hits()\n#1
> .../rocksolid/index.php(22): include('/home/nightbulb...')\n#2 {main}\n
> thrown in .../rocksolid/newsportal.php on line 1796'
>
> And I believe this error may be from the front end rather than the cron
> job.

fdiv() is in php8. You'll see the error in php7, but should not in php8.
This function is used to avoid a possible division by zero error.

Yes, it is from the newsportal part.

>
> I installed rslight on another debian machine and I was able to
> syncronize messages via Tor with that fresh install using the same
> configuration in rslight.inc.php.

So it worked on another machine? What is different between the systems
(I'm sure you thought about this already :)

> I wonder ...
>
> $ cgi-fcgi -bind -connect 127.0.0.1:1119 Could not connect to
> 127.0.0.1:1119
>
> But netcat can grab the port:
>
> $ nc -l 1119

Do you see nntp.php running with 'ps aux | grep nntp' ?

> Is it possible that somewhere in the guts of php-fpm that listening on
> ports is blocked or locked such that the newsportal module would fail to
> register a port with silent failure? Where might I look?

It's possible, but I am not finding that issue myself with php8. If I
figure out how to check that in php settings, I'll let you know.

> On another fresh install I decided to run the installer as user instead
> of root. Some interesting errors occurred. First, the installer output
> sed errors:
<snip>
> /opt/rslight/config/sed0TqTjt: Permission denied sed: can't read : No
> such file or directory sed: couldn't open temporary file
<snip>
>
> Secondly, when I entered the config directory I found this:
>
> $ cat admin.inc.php <?php
> $admin = array();
> $admin['password'] = '<admin_password>';
> $admin['key'] = '<admin_key>';
> ?>

That is what's in that file before sed operates on it. It's how sed knows
where to put the username and password.

>
> Then I re-ran the debian-install.sh script as root and got less explicit
> errors with the sed commands:
>
> Applying configuration...sed: can't read : No such file or directory
> sed: can't read : No such file or directory sed: can't read : No such
> file or directory sed: can't read : No such file or directory sed: can't
> read : No such file or directory sed: can't read : No such file or
> directory sed: can't read : No such file or directory sed: can't read :
> No such file or directory sed: can't read : No such file or directory
> sed: can't read : No such file or directory done

The above is a known issue. Error (can't read) but it works anyway. Not
sure about that one (it works in BSD)

> Updated user count Sending articles Send Done Refreshed spoolnews
> Expired articles Sending articles Send Done Refreshed spoolnews Expired
> articles RSS Feeds updated Rotated: /opt/rslight/spool//log/access.log
> Rotated: /opt/rslight/spool//log/cron.log Rotated:
> /opt/rslight/spool//log/expire.log Rotated:
> /opt/rslight/spool//log/nntp.log Rotated:
> /opt/rslight/spool//log/spoolnews.log Log files rotated Keys rotated
> Removed old files
>
> Double slashes show up here but I did not use trailing slashes for the
> path datas on the installer wizard.

Double slashes should not be a problem. the OS handles these like single.
They are there in case an admin forgets or removes a trailing slash in
config files, so that it will work anyway.

> And still the NNTP server does not start or show up in linux process
> manager and no remote data is fetched into the /spool directory. There
> are no errors to be found anywhere. I even read over 3000 lines of
> strace output yet I did not find anything relevant in it.

Wow, that is brain numbing! (reading strace)

> I wanted to check what is happening between the local rslight install
> and the remote server during the cron job. So I used a proxy to dump the
> session to file while the cron was running. Here is the complete content
> of the session.
>
> 200 rocksolid2 InterNetNews NNRP server INN 2.7.1 ready (no posting)
> MODE reader 200 rocksolid2 InterNetNews NNRP server INN 2.7.1 ready (no
> posting) AUTHINFO USER [redacted]
> 381 Enter password AUTHINFO PASS [redacted]
> 281 Authentication succeeded QUIT 200 rocksolid2 InterNetNews NNRP
> server INN 2.7.1 ready (no posting) MODE reader 200 rocksolid2
> InterNetNews NNRP server INN 2.7.1 ready (no posting) AUTHINFO USER
> [redacted]
> 381 Enter password AUTHINFO PASS [redacted]
> 281 Authentication succeeded 200 rocksolid2 InterNetNews NNRP server INN
> 2.7.1 ready (no posting) MODE reader 200 rocksolid2 InterNetNews NNRP
> server INN 2.7.1 ready (no posting) AUTHINFO USER [redacted]
> 381 Enter password AUTHINFO PASS [redacted]
> 281 Authentication succeeded QUIT
>
> It seems like it authenticates then starts over a few times without
> sending any other commands.

That is what I saw in the i2pn2.org logs also.

It's kind of looking like it does not know what groups to sync, so it
syncs nothing.

Try this:

Go into a few of the files (cron.php, spoolnews.php, expire.php etc.) and
add a line near the top such as:

'touch(<$spooldir>/SOMETHING-was-here);' Then see if that filename appears
in $spooldir

Then create a text file in <$config_dir>. Go back into the scripts and try
this:

'echo file_get_contents($config_dir/file_i_created);'

Access the page either from the command line or browser (depending on
file) and see if it outputs the contents of the file.

SubjectRepliesAuthor
o help request: rslight fatal array type error on fresh install

By: Syber Shock on Thu, 7 Dec 2023

20Syber Shock
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor