Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Avoid strange women and temporary variables.


computers / Rocksolid Nodes Help / cron.php fails

SubjectAuthor
* cron.php failsMarco Moock
`* cron.php failsRetro Guy
 `* cron.php failsMarco Moock
  +* cron.php failsRetro Guy
  |`* cron.php failsMarco Moock
  | `* cron.php failsRetro Guy
  |  `- cron.php failsRetro Guy
  `- cron.php failsRetro Guy

1
cron.php fails

<ulrm3v$3vdos$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usenet-es@dorfdsl.de (Marco Moock)
Newsgroups: rocksolid.nodes.help
Subject: cron.php fails
Date: Tue, 19 Dec 2023 10:00:46 +0100
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <ulrm3v$3vdos$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Date: Tue, 19 Dec 2023 09:00:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="549eaa34ef6db9138386845ce3e1b7f5";
logging-data="4175644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HZL5lQi5nhA9WdUbhCiYC"
Cancel-Lock: sha1:zfpl5VEgVpdZ9GvKuk9PYZ4ylbI=
 by: Marco Moock - Tue, 19 Dec 2023 09:00 UTC

Hello!

I've enabled the cron job, but when started manually as user root,
it fails because it can't connect to the server.

root@rslight:~/rocksolid-light/Rocksolid_Light# cd /var/www/html/spoolnews ; bash -lc "php /etc/rslight/scripts/cron.php"
Updated user count
Sending articles
<p><font color="red">Error:</font></p><p>The connection to the Message Server failed</p>
Refreshed spoolnews
Expired articles
Sending articles
<p><font color="red">Error:</font></p><p>The connection to the Message Server failed</p>
Refreshed spoolnews
Expired articles
RSS Feeds updated
Log files rotated
Keys rotated
PHP Fatal error: Uncaught TypeError: array_diff(): Argument #1 ($array) must be of type array, bool given in /etc/rslight/scripts/cron.php:162
Stack trace:
#0 /etc/rslight/scripts/cron.php(162): array_diff()
#1 /etc/rslight/scripts/cron.php(146): expire_files()
#2 {main}
thrown in /etc/rslight/scripts/cron.php on line 162

The server runs:
root@rslight:/var/www/html/spoolnews# telnet 127.0.0.1 119
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
200 Rocksolid Light NNTP Server ready (no posting)
quit
205 closing connection - goodbye!
Connection closed by foreign host.
root@rslight:/var/www/html/spoolnews#

--
Gruß
Marco

Re: cron.php fails

<ulrq94$72kp$5@i2pn2.org>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!.POSTED!not-for-mail
From: retroguy@i2pn2.org (Retro Guy)
Newsgroups: rocksolid.nodes.help
Subject: Re: cron.php fails
Date: Tue, 19 Dec 2023 10:11:48 -0000 (UTC)
Organization: i2pn2 (i2pn.org)
Message-ID: <ulrq94$72kp$5@i2pn2.org>
References: <ulrm3v$3vdos$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Dec 2023 10:11:48 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="232089"; mail-complaints-to="usenet@i2pn2.org";
posting-account="Gg8gAsZLN5FnWZrpbmz42d6ib2C2ewfwYI9Q557pxrY";
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
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|
 by: Retro Guy - Tue, 19 Dec 2023 10:11 UTC

On Tue, 19 Dec 2023 10:00:46 +0100, Marco Moock wrote:

> Hello!
>
> I've enabled the cron job, but when started manually as user root,
> it fails because it can't connect to the server.
>
> root@rslight:~/rocksolid-light/Rocksolid_Light# cd
> /var/www/html/spoolnews ; bash -lc "php /etc/rslight/scripts/cron.php"
> Updated user count Sending articles <p><font
> color="red">Error:</font></p><p>The connection to the Message Server
> failed</p>
> Refreshed spoolnews Expired articles Sending articles <p><font
> color="red">Error:</font></p><p>The connection to the Message Server
> failed</p>
> Refreshed spoolnews Expired articles RSS Feeds updated Log files rotated
> Keys rotated PHP Fatal error: Uncaught TypeError: array_diff():
> Argument #1 ($array) must be of type array, bool given in
> /etc/rslight/scripts/cron.php:162 Stack trace:
> #0 /etc/rslight/scripts/cron.php(162): array_diff()
> #1 /etc/rslight/scripts/cron.php(146): expire_files()
> #2 {main}
> thrown in /etc/rslight/scripts/cron.php on line 162

Syber Shock will be happy you have the same error he did :) I will fix
this in the code soon, but please create the following directories as the
user that runs your web server (possibly www-data):

By default, $spooldir is /var/spool/rslight, unless you set something
else:
/var/spool/rslight/nocem/processed
/var/spool/rslight/nocem/failed

> The server runs:
> root@rslight:/var/www/html/spoolnews# telnet 127.0.0.1 119 Trying
> 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> 200 Rocksolid Light NNTP Server ready (no posting)
> quit 205 closing connection - goodbye!
> Connection closed by foreign host.
> root@rslight:/var/www/html/spoolnews#

Once the directories are created, run cron.php in cron every 5 or 10
minutes or so (or use Syber Shock's script), and see if it eventually add
articles to the site.

Re: cron.php fails

<ulrr0p$384$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usenet-es@dorfdsl.de (Marco Moock)
Newsgroups: rocksolid.nodes.help
Subject: Re: cron.php fails
Date: Tue, 19 Dec 2023 11:24:25 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ulrr0p$384$1@dont-email.me>
References: <ulrm3v$3vdos$1@dont-email.me>
<ulrq94$72kp$5@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Dec 2023 10:24:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="549eaa34ef6db9138386845ce3e1b7f5";
logging-data="3332"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QzB4hIqjyKdutLhFArgGQ"
Cancel-Lock: sha1:4s4yWg9GweSMISMMjQrj9tX+KQo=
 by: Marco Moock - Tue, 19 Dec 2023 10:24 UTC

Am 19.12.2023 um 10:11:48 Uhr schrieb Retro Guy:

> Syber Shock will be happy you have the same error he did :) I will
> fix this in the code soon, but please create the following
> directories as the user that runs your web server (possibly www-data):

Thanks, that fixed the PHP stuff, but sadly it won't fix the connection
problem to the local server.

The problem was the connection to the upstream NNRP server. I enabled
TLS and entered port 563, but it tried to connect to port 1 (IPv6).

I will do more tests and try to figure out, what happens.

I tried news.mixmin.net (it doesn't need auth for reading) with its
hostname that uses IPv6 on my test system.

Re: cron.php fails

<c3036d74d79b6da528b2bdadd3e78262$1@news.novabbs.org>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Date: Tue, 19 Dec 2023 10:37:15 +0000
Message-ID: <c3036d74d79b6da528b2bdadd3e78262$1@news.novabbs.org>
Organization: Rocksolid Light
From: retroguy@novabbs.org (Retro Guy)
Subject: Re: cron.php fails
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: <ulrm3v$3vdos$1@dont-email.me> <ulrq94$72kp$5@i2pn2.org>
<ulrr0p$384$1@dont-email.me>
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 - Tue, 19 Dec 2023 10:37 UTC

On Tue, 19 Dec 2023 11:24:25 +0100, Marco Moock wrote:

> Am 19.12.2023 um 10:11:48 Uhr schrieb Retro Guy:
>
>> Syber Shock will be happy you have the same error he did :) I will fix
>> this in the code soon, but please create the following directories as
>> the user that runs your web server (possibly www-data):
>
> Thanks, that fixed the PHP stuff, but sadly it won't fix the connection
> problem to the local server.
>
> The problem was the connection to the upstream NNRP server. I enabled
> TLS and entered port 563, but it tried to connect to port 1 (IPv6).
>
> I will do more tests and try to figure out, what happens.
>
> I tried news.mixmin.net (it doesn't need auth for reading) with its
> hostname that uses IPv6 on my test system.

Please make sure to put the ssl port number in $remote_ssl variable, not a
'1' to enable same.

So in /etc/rslight/rslight.inc.php:
<?php
return [
'remote_server' => 'news.mixmin.net',
'remote_port' => '119',
'remote_ssl' => '563',
...

Should connect using ssl to 'remote_server'. ssl is preferred in the code:

if ($CONFIG['remote_ssl']) {
if ($nport == $CONFIG['remote_port']) {
$nport = $CONFIG['remote_ssl'];
}

Feel free to use news.i2pn2.org also as you wish. No auth required for
reading.

Re: cron.php fails

<75d61aeb65a1ec55024cab0280273cb4@news.novabbs.org>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Date: Tue, 19 Dec 2023 11:57:10 +0000
Subject: Re: cron.php fails
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
From: retro.guy@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes.help
X-Rslight-Site: $2y$10$wTky6HuZaQDdP7k4rXxOa.ut7PU2IVsocY8aZTrLy3giAUJ6Nth7i
X-Rslight-Posting-User: 91053d4a47d51b416144568e5a1040f05e31ed1b
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light
References: <ulrm3v$3vdos$1@dont-email.me> <ulrq94$72kp$5@i2pn2.org> <ulrr0p$384$1@dont-email.me>
Organization: Rocksolid Light
Message-ID: <75d61aeb65a1ec55024cab0280273cb4@news.novabbs.org>
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_B
H0=hZt'[%)4kG|
 by: Retro Guy - Tue, 19 Dec 2023 11:57 UTC

Marco Moock wrote:

> Am 19.12.2023 um 10:11:48 Uhr schrieb Retro Guy:

>> Syber Shock will be happy you have the same error he did :) I will
>> fix this in the code soon, but please create the following
>> directories as the user that runs your web server (possibly www-data):

This is now fixed in latest (master) on gitlab.

--
Retro Guy

Re: cron.php fails

<uls6ss$26de$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usenet-es@dorfdsl.de (Marco Moock)
Newsgroups: rocksolid.nodes.help
Subject: Re: cron.php fails
Date: Tue, 19 Dec 2023 14:47:07 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uls6ss$26de$1@dont-email.me>
References: <ulrm3v$3vdos$1@dont-email.me>
<ulrq94$72kp$5@i2pn2.org>
<ulrr0p$384$1@dont-email.me>
<c3036d74d79b6da528b2bdadd3e78262$1@news.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Dec 2023 13:47:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="549eaa34ef6db9138386845ce3e1b7f5";
logging-data="72110"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hRcfG0vfhNLB0Hjj+X8Z7"
Cancel-Lock: sha1:fHEp+CQIps75NwWa14IllDuMAZU=
 by: Marco Moock - Tue, 19 Dec 2023 13:47 UTC

Am 19.12.2023 um 10:37:15 Uhr schrieb Retro Guy:

> Please make sure to put the ssl port number in $remote_ssl variable,
> not a '1' to enable same.

Then the description is wrong:

Enable if connecting to remote server using ssl (1=true, blank=false):

Re: cron.php fails

<a69b695ec8a2f14e5e2b5e36d75c9e6d$1@news.novabbs.org>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Date: Tue, 19 Dec 2023 13:53:50 +0000
Message-ID: <a69b695ec8a2f14e5e2b5e36d75c9e6d$1@news.novabbs.org>
Organization: Rocksolid Light
From: retroguy@novabbs.org (Retro Guy)
Subject: Re: cron.php fails
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: <ulrm3v$3vdos$1@dont-email.me> <ulrq94$72kp$5@i2pn2.org>
<ulrr0p$384$1@dont-email.me>
<c3036d74d79b6da528b2bdadd3e78262$1@news.novabbs.org>
<uls6ss$26de$1@dont-email.me>
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 - Tue, 19 Dec 2023 13:53 UTC

On Tue, 19 Dec 2023 14:47:07 +0100, Marco Moock wrote:

> Am 19.12.2023 um 10:37:15 Uhr schrieb Retro Guy:
>
>> Please make sure to put the ssl port number in $remote_ssl variable,
>> not a '1' to enable same.
>
> Then the description is wrong:
>
> Enable if connecting to remote server using ssl (1=true, blank=false):

Yes, it is wrong. Syber Shock let me know that recently. The error is
mine :)

I will fix the description soon.

Re: cron.php fails

<48b5ee51d25b591bfb97c8d40775fb4d@news.novabbs.org>

  copy mid

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

  copy link   Newsgroups: rocksolid.nodes.help
Date: Tue, 19 Dec 2023 14:38:22 +0000
Subject: Re: cron.php fails
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
From: retro.guy@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes.help
X-Rslight-Site: $2y$10$Rf6CYL.U1xulp.12sc..TudmAnBbLrvbDxGSVJkFs1uZTsV9xoacC
X-Rslight-Posting-User: 91053d4a47d51b416144568e5a1040f05e31ed1b
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light
References: <ulrm3v$3vdos$1@dont-email.me> <ulrq94$72kp$5@i2pn2.org> <ulrr0p$384$1@dont-email.me> <c3036d74d79b6da528b2bdadd3e78262$1@news.novabbs.org> <uls6ss$26de$1@dont-email.me> <a69b695ec8a2f14e5e2b5e36d75c9e6d$1@news.novabbs.org>
Organization: Rocksolid Light
Message-ID: <48b5ee51d25b591bfb97c8d40775fb4d@news.novabbs.org>
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_B
H0=hZt'[%)4kG|
 by: Retro Guy - Tue, 19 Dec 2023 14:38 UTC

Retro Guy wrote:

> On Tue, 19 Dec 2023 14:47:07 +0100, Marco Moock wrote:

>> Am 19.12.2023 um 10:37:15 Uhr schrieb Retro Guy:
>>
>>> Please make sure to put the ssl port number in $remote_ssl variable,
>>> not a '1' to enable same.
>>
>> Then the description is wrong:
>>
>> Enable if connecting to remote server using ssl (1=true, blank=false):

> Yes, it is wrong. Syber Shock let me know that recently. The error is
> mine :)

> I will fix the description soon.

Fixed.

--
Retro Guy

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor