🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by Grant Taylor Sun, 21 Jun 2009 07:26
FreeBSD problems...
#81434
Author: Grant Taylor
Date: Sun, 21 Jun 2009 07:26
24 lines
1908 bytes
I'm having a bit of a problem with start up scripts on FreeBSD 6.4 w/ 
INN 2.4.3.  Specifically I'm getting the following error in news.err

    innd: SERVER must be run as user news, not root (use inndstart)

I have tried a few different things to make INN start correctly on 
system boot.  Thus far everything I've tried (including making the rc 
script call the following command) has failed and results in the above 
news.err log entry.

If I stop INN and use the following command to start it everything 
starts up and runs just fine.

    su news -c /usr/local/news/bin/rc.news start

Currently as things are starting incorrectly I'm unable to use ctlinnd. 
  The only way to make ctlinnd work is to stop INN and restart it with 
the above command.

Does any one have any suggestions?



Grant. . . .
Re: FreeBSD problems...
#81435
Author: Gérald Niel
Date: Sun, 21 Jun 2009 08:00
25 lines
1753 bytes
Le Dimanche 21 juin 2009 à 07:26 UTC, Grant Taylor écrivait sur
news.software.nntp :

> I'm having a bit of a problem with start up scripts on FreeBSD 6.4 w/ 
> INN 2.4.3.  Specifically I'm getting the following error in news.err
>
>     innd: SERVER must be run as user news, not root (use inndstart)

Here is what i have about Inn in my rc.conf :

innd_enable="YES"
innd_user="news"
innd_group="news"

if you want stop or restart Inn if it is installed with ports :

su -c /usr/local/etc/rc.d/innd [start|stop|restart]

(sorry for my english)

-- 
Gérald Niel
<http://news.gegeweb.org>
Gleb Bones : <http://www.jamendo.com/fr/album/46018>
Re: FreeBSD problems...
#81436
Author: Julien ÉLIE
Date: Sun, 21 Jun 2009 08:04
68 lines
2712 bytes
Hi Grant,

> If I stop INN and use the following command to start it everything starts up and runs just fine.
>
>    su news -c /usr/local/news/bin/rc.news start

That's the command you should use.


> Currently as things are starting incorrectly I'm unable to use ctlinnd. The only way to make ctlinnd work is to stop INN and 
> restart it with the above command.
>
> Does any one have any suggestions?

There is a script in your FreeBSD port:
    http://www.freebsd.org/cgi/cvsweb.cgi/ports/news/inn/

It does:
    su -fm news -c "/usr/local/news/bin/rc.news start"


#!/bin/sh
#
# PROVIDE: innd
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# $FreeBSD: ports/news/inn/files/innd.sh.in,v 1.2 2006/10/31 02:35:51 shaun Exp $
#

. %%RC_SUBR%%

name=innd

PREFIX=%%PREFIX%%

innd_enable=${innd_enable-"NO"}
innd_user=${innd_user-"news"}
innd_group=${innd_group-"news"}

required_files="%%DBDIR%%/history.dir"

load_rc_config ${name}

start_cmd=${name}_start
stop_cmd=${name}_stop

rcvar=`set_rcvar`

command=%%NEWSBASE%%/bin/rc.news

innd_start() {
 su -fm ${innd_user} -c "${command} start"
}

innd_stop() {
 su -fm ${innd_user} -c "${command} stop"
}

load_rc_config ${name}
run_rc_command "$1"


-- 
Julien ÉLIE

« Quand tu auras lu ces lignes, le papyrus s'autodétruira. » (Astérix) 
Re: FreeBSD problems...
#81446
Author: Grant Taylor
Date: Sun, 21 Jun 2009 20:31
33 lines
2192 bytes
Gérald Niel wrote:
> Here is what i have about Inn in my rc.conf :
> 
> innd_enable="YES"
> innd_user="news"
> innd_group="news"

*nod*

I had (prior to disabling / commenting out and testing) _enable and 
_user, but no_group.  I did not think it was explicitly necessary as the 
group "news" is the default in the actual script.

I will try re enabling / uncommenting the lines and test to see if it 
makes any difference with the _group specified.

> if you want stop or restart Inn if it is installed with ports :
> 
> su -c /usr/local/etc/rc.d/innd [start|stop|restart]

I don't use the "su -c" portion as I'm running the command as root. 
Other wise, I can do that or the following command to start things 
manually and they work just fine.

    /usr/local/news/bin/rc.news start

> (sorry for my english)

Your english is just fine.



Grant. . . .
Re: FreeBSD problems...
#81447
Author: Grant Taylor
Date: Sun, 21 Jun 2009 21:33
29 lines
1878 bytes
Julien ÉLIE wrote:
> Hi Grant,

Hi Julien,

> That's the command you should use.

*nod*

I use either that command or call the following rc script.

    /usr/local/etc/rc.d/innd

> It does:
>    su -fm news -c "/usr/local/news/bin/rc.news start"

*nod*

I've tried editing the /usr/local/etc/rc.d/inn script that calls the 
above line to instead call the following line:

    su news -c /usr/local/news/bin/rc.news start

I was thinking that for some reason the one or more variable(s) in the 
innd rc script.  That did not make any difference either.

(See my reply to Gérald's recommendation for more details.)

Grant. . . .
Re: FreeBSD problems...
#81448
Author: Grant Taylor
Date: Sun, 21 Jun 2009 21:36
22 lines
2149 bytes
Grant Taylor wrote:
> I will try re enabling / uncommenting the lines and test to see if it 
> makes any difference with the _group specified.

I tried uncommenting what I had commented out and adding the innd_group 
to /etc/rc.conf and restarting.  Unfortunately I had no luck.

When I let the system start INN on start up, I am unable to use ctlinnd 
to do any thing.  If I stop INN (I have to kill things manually b/c 
neither /usr/local/etc/rc.d/innd or /usr/local/news/bin/rc.news function 
properly when the system starts up) and restart it via either the 
/usr/local/etc/rc.d/innd or /usr/local/news/bin/rc.news script things 
work just fine.

The more I mess with this the more I think it is a problem with how 
scripts are run at boot time.

Note:  I am testing things by calling "ctlinnd mode" to get output.



Grant. . . .
Re: FreeBSD problems...
#81470
Author: Black Dragon
Date: Tue, 23 Jun 2009 17:34
20 lines
1414 bytes
Grant Taylor wrote:

> I was thinking that for some reason the one or more variable(s) in the 
> innd rc script.  That did not make any difference either.

Perhaps a better understanding of starting services on FreeBSD will
help? The FreeBSD handbook covers it all.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-configfiles.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-starting-services.html

-- 
Black Dragon

Everyone's in a high place when you're on your knees.
Re: FreeBSD problems...
#81513
Author: Grant Taylor
Date: Sun, 28 Jun 2009 07:50
39 lines
2690 bytes
On 6/23/2009 12:34 PM, Black Dragon wrote:
> Perhaps a better understanding of starting services on FreeBSD will 
> help? The FreeBSD handbook covers it all.

Nope.

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.html

Interesting.

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-configfiles.html

Interesting but no real value to this problem.

> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-starting-services.html

Probably the most valuable (along with lined man pages) but of little 
help with the problem that I am having.

Upon boot the system does start INN via the script that was installed 
with INN (from ports).  In fact, INN is up and running and accessible 
across the network.  The problem is that INN is not started in such a 
way that ctlinnd can communicate with it.

As I stated before, if I stop (kill) INN and restart it via either the 
/usr/local/etc/rc.d/innd or /usr/local/news/bin/rc.news scripts 
everything works fine /and/ ctlinnd can communicate with INN.

So I am still left thinking that there is a problem with INN's start up 
script that comes with INN via ports.

I will see about writing my own custom start up script and see if that 
makes any difference.

In the mean time if you have any other ideas I'd love to hear them.



Grant. . . .
Re: FreeBSD problems... Solved.
#81516
Author: Grant Taylor
Date: Sun, 28 Jun 2009 08:10
17 lines
2094 bytes
On 6/28/2009 2:50 AM, Grant Taylor wrote:
> As I stated before, if I stop (kill) INN and restart it via either the 
> /usr/local/etc/rc.d/innd or /usr/local/news/bin/rc.news scripts 
> everything works fine /and/ ctlinnd can communicate with INN.
> 
> So I am still left thinking that there is a problem with INN's start up 
> script that comes with INN via ports.

Well, in a manner of speaking, the problem was with the script that was 
being called during start up.  I found an extra script "news" in 
/etc/rc.d that was a sym-link to the /usr/local/news/bin/rc.news start 
up script.  When I removed this "rogue" sym-link, the normal FreeBSD 
port provided start up script worked as intended.



Grant. . . .
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads