Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2004
    Location
    Atlanta Ga!
    Posts
    43

    Default Service command not working after cpanel upgrade...

    Is anyone else having this problem?

    service httpd restart

    root@***** [~]# service httpd restart
    bash: service: command not found

    This happens on all of the service commands:
    service httpd
    service exim
    service proftpd
    service named
    service mysql

    WHM 9.2.0 cPanel 9.3.0-C4
    RedHat Enterprise 3 - WHM X v3.1.0

    Anyone know of a fix?

    Thanks,
    Scott

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Is the binary on the server?

    /sbin/service
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Dec 2005
    Posts
    51

    Default

    Really OLD topic that I need help with...

    Here is my problem:

    root@server [/sbin]# service httpd restart
    bash: service: command not found

    BUT! if I do:

    root@server [/sbin]# ./service httpd restart
    /etc/init.d/httpd restart: httpd restarted

    Whats going on with THAT?!

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You're probably using su to go from a non-priv user to root and not doing it correctly. You need to remember to use:

    su -

    The dash sets up the environment correctly.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Dec 2005
    Posts
    51

    Default

    Thank you.

  6. #6
    Member
    Join Date
    Apr 2007
    Posts
    32

    Default

    Sorry for digging up and old thread, but I too get "command not found" when executing "httpd configtest".

    Does anyone have a clue?

    - Simsen

  7. #7
    Registered User
    Join Date
    Apr 2007
    Posts
    1

    Default

    When it says "bash: service: command not found" it is telling you that the command "service" is not a command it can find. It has nothing to do with what service you are trying to start/restart/etc. or whatever you are trying to accomplish with service.

    So as said before by chirpy. Check to see if the binary is there. If it isn't then make sure, if you are using su to switch users to the root user, that you use the - to set the environment correctly.

Similar Threads & Tags
Similar threads

  1. service command not working
    By shortfork in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-19-2011, 05:21 PM
  2. Replies: 0
    Last Post: 01-18-2006, 09:41 AM
  3. How to check service status in command line
    By shann in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-19-2005, 02:34 PM
  4. Cpanel Upgrade not working
    By ChemicalWH in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 10-11-2004, 01:12 PM
  5. service: command not found
    By mind-field in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-06-2003, 02:38 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube