Operating System - HP-UX
1830936 Members
2047 Online
110017 Solutions
New Discussion

Re: cannot restart services

 
mwagiru
Frequent Advisor

cannot restart services

How can services be restart in HP-UX 11i ?
I tried /etc/services restart
I got "execute permission denied"
10 REPLIES 10
Peter Godron
Honored Contributor

Re: cannot restart services

Hi,
Please read:
http://66.34.90.71/ITRCForumsEtiquette/after.html
on what to do AFTER raising questions

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

So far you have not awarded any points !


Which service do you want to restart ?
The answer to this will determine the detailed answer.
Ivan Krastev
Honored Contributor

Re: cannot restart services

use:

/sbin/init.d/servicename stop
/sbin/init.d/servicename start


regards,
ivan
Robert-Jan Goossens_1
Honored Contributor

Re: cannot restart services

Hi,

To re-read the inet configuration files use;

# inetd -c

Regards,
Robert-Jan
Reshma Malusare
Trusted Contributor

Re: cannot restart services

Hi mwagiru,
To start particular service syntax is
/sbin/init.d/service stop
/sbin/init.d/service start

e.g to start inetd daemon
/sbin/init.d/inetd start

/etc/services --> contains port numbers for particular services

Regards
Reshma
mwagiru
Frequent Advisor

Re: cannot restart services

I commented out several services in /etc/inetd.conf like telnet.
However, I can still telnet to the HP-UX box.
melvyn burnard
Honored Contributor

Re: cannot restart services

the syntax you tried is incorrect.
If you have made a chaneg to the inetd.conf file, you have to tell inetd to re-read the file :
inetd -c

Failing that, reboot your server
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
mwagiru
Frequent Advisor

Re: cannot restart services

Thanks Robert.inetd -c did it !!
mwagiru
Frequent Advisor

Re: cannot restart services

thanks all
Problem solved
melvyn burnard
Honored Contributor

Re: cannot restart services

For this user:
I have assigned points to 0 of 23 responses to my questions.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Ralph Grothe
Honored Contributor

Re: cannot restart services

As Robert-Jan wrote,
you need to signal inetd of any changes you made in /etc/inetd.conf
This can either be done by

# /usr/sbin/inetd -c

or

# kill -1 $(UNIX95= ps -o pid= -C inetd)



If you get a permission denied message when you try to run an init script you may not have invoked it as root?
Also there could other issues which can be caused by what is happening in the script.
Maybe there is an su to another uid, or a service forks and changes ownership of the child who then may encounter some problem accessing a device or file that would require elevated privileges.
In the end you would have to look into the affected init script and find out where things go awry.
Also note that your init script may not have a case match for a "restart" argument.
Then you would have to first stop and then start.
Madness, thy name is system administration