[freeside] Re: Connection refused [SignupClient.pm] line 189
Johannes Strydom
strydom at prosperitas.com.au
Thu Jul 6 17:33:21 PDT 2000
Kristian Hoffmann wrote:
> We had the exact same problem while doing signups. It has to do with
> signal handler weirdness. Explaination; at the top of fs_signup_server,
> the signal handler for SIG_CHILD is set to do a wait(). The problems is
> that when ssh process finishes, it generates a SIG_CHILD and, I dunno.
> Things break. I can't explain it better than that. Mark's the one who
> fixed this.
>
> Anyway, here's our patch for svc_acct.pm,
>
> ...Before...
> #one way
> ssh("root\@$shellmachine",
> "useradd -d $dir -m -s $shell -u $uid $username"
> );
> #another way
>
> ...After...
> #one way
> my $temp = $SIG{CHLD};
> undef $SIG{CHLD};
> ssh("root\@$shellmachine",
> "useradd -d $dir -m -s $shell -u $uid $username"
> );
> $SIG{CHLD} = $temp;
> #another way
>
> You'll be able to find that in sub insert in svc_acct.pm.
> I'm sure Ivan will want to clean that up, but it works.
>
> -Kristian
> <khoff at pc-intouch.com>
>
> On Thu, 6 Jul 2000, ivan wrote:
>
> > On Sat, Jul 08, 2000 at 08:59:40AM +1000, Johannes Strydom wrote:
> > > ivan wrote:
> > >
> > > > On Wed, Jul 05, 2000 at 06:03:55PM +1000, Johannes Strydom wrote:
> > > > >
> > > > > Hi Ivan,
> > > > > I've added a couple of warn statements into fs_signup_server and
> > > > > cust_main.pm and here is the result (it does'nt make much sense to me)
> > > >
> > > > If it doesn't make sense to you, then it certainly isn't going to make
> > > > sense to me.
> > > >
> > > > As I said previously, since I'm unable to duplicate your problem, you'll
> > > > need to find it yourself. I suggest using the Perl debugger to step
> > > > through the code until you find more specifically where it is hanging.
> > > >
> > > > Emailing the debugging output of your local verson to the list is not
> > > > likely to help you or anyone else, sorry.
> > > >
> > > > Good luck!
> > > >
> > > > --
> > > > meow
> > > > _ivan
> > >
> > > Ivan,
> > > I've traced the program to where it stops. It stops in SSH.pm at line 85
> > > ...system(@cmd)
> > > The user gets created in the shell machine and it seems that it waits for
> > > the (child) process to complete.
> > >
> > > Any Ideas??
> >
> > Why doesn't the child process on the remote machine complete?
> >
> > When you add an account using the regular web interface, does it hang on
> > waiting for the same process?
> >
> > --
> > meow
> > _ivan
> >
Thanks Kristian, it works at last. Now I can take it easy again.
Regards,
Koos
More information about the freeside-users
mailing list