[Samba] SOLVED Re: NT_STATUS_CONNECTION_REFUSED

Rowland Penny rowlandpenny at googlemail.com
Thu Feb 26 01:55:12 MST 2015


On 26/02/15 08:15, L.P.H. van Belle wrote:
> aha ...
>
> ;-)
>
> netstat --numeric-hosts --numeric-ports --programs -u -t -l
> i didnt see samba running..  ;-)
>
>
>> I removed the "service bind9 stop &&" from line 449 (as bind9 was
>> already stopped, why stop it again) and ran the script on my
>> VM. All the "NT_STATUS_CONNECTION_REFUSED" warnings were gone.
> but.. the NT_STATUS_CONNECTION_REFUSED is a samba message not bind,
> and does not involve any thing with bind, stopping it 2 x times does not do anything..
>
> The service bind9 stop && service bind9 start was the problem yes,
> I should have put these on 2 lines and dont use the &&
> this wil be changed in the new version and improved.

Ah, but the '&&' means that bind9 would only get started if the command 
on the left finished without an error and as it errored out because 
there was nothing to stop.......

>
> Im stopping bind there 2 times yes, this is because i noticed that
> a few times bind wasnt stopped correctly, and stopping it 2 times worked.

If there is a potential problem, you should check for it and if 
required, do something, what about:

BINDTEST=$(ps ax | grep [n]amed)
if [ -n "${BINDTEST}" ]; then
     # Bind9 is still running
     service bind9 stop
     sleep 2
     service bind9 start
else
     # Bind9 is not running
     service bind9 start
fi

Rowland

> But good to know you nailed it.
>
>
> ;-)
>
> Greetz,
>
> Louis
>
>
>



More information about the samba mailing list