Author Topic: Apache dont start , /bin/bash: /usr/sbin/httpd: No such file or directory  (Read 26005 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hello Partners .
centos 6.7 + CWP install with 50 domains and around 125 email accounts
LAMP was installed by the cwp installer at the begining
all were functioning perfect but!

Apache wont start after trying to install freetds  asked by boss for conecting to some windows SQL server remotly.

i did as follow :
> yum update
> yum groupinstall ‘Development Tools’  (did not work)
> yum install httpd  (did not do it cause already had apache installed and working)
> yum install freetds
> yum install freetds-devel
> yum install php php-devel php-mssql
> service httpd restart  (showed the mentioned error)
> php -m (showed some )

Then i rebooted and apache never start again  showing this error from CWP
Iniciando httpd: /bin/bash: /usr/sbin/httpd: No such file or directory
[FALLÓ]

I did yum history undo all the above to see if i could rollback and be alive again  but did not . start apache again with same error

I am desperate cause my boss does not know i am on this problem , i just said server down for maintenance . while i try to solve this situation.

All other services are working 100%   postfix,dovecot,etc....  just apache wont start .

I have another server just  clone of this problem one , lets call it workingserver .
i checked on workingserver to compare , and also there is not httpd on /usr/sbin/ but it does starts apache with no problems.
i also compared permissions on folders and all are the same.

i have some ideas but i am scared to dead to loose any info that was created all true cwp like users , emails , vhosts, etc...

#1 idea . use cwp panel  Apache--> apache-rebuild -->  but (i dont know if i can loose all my cwp data )

#2 idea  UNISTALL AND INSTALL HTTPD from command shell , (i dont know if that could make me lost cwd data and unsynchronized with CWP for worst ? )

#3 idea  ask on cwp forum for some expert to be kind to help me out to solve this without generating other errors on the sever.

As you see i am a newbie with linux , but i know how to permissions , ownerships , and some understanding of directories , like copy , move , zip,unzip , vi files  , and much more .

i think i can handle instructions fast .

Please  someone give me a hand on this .
Thanks in adavance for coolaboration .


Signature:
Sharing Knowledge , grows communities

Offline
*****
you have to rebuild the apache and apache should be on port 80 at the time of rebuild

Offline
*
you have to rebuild the apache and apache should be on port 80 at the time of rebuild

Hi Sandeep ,
thanks for your reply .
if i do so ? will apache-rebuild , remove all my vhosts , accounts , emails , already configure on the server ?
Signature:
Sharing Knowledge , grows communities

Offline
*
you have to rebuild the apache and apache should be on port 80 at the time of rebuild

Hi Sandeep ,
thanks for your reply .
if i do so ? will apache-rebuild , remove all my vhosts , accounts , emails , already configure on the server ?

Sandepp  , i did so , apache-rebuild from cwp ,  i waited a complete hour , then checked and the same error , httpd wont start showing same error ,  what else do you think , i could try ?
Signature:
Sharing Knowledge , grows communities

Offline
*****
without checking I can't say.

Offline
*
without checking I can't say.

Good Morning sandeep ,
thanks again for your time and cooperation.
refreshing the problem
Al problem came after i try to install freetds using this procedure . (apache stoped working after this)
---------------------------------------------------------------------------

i did as follow :
> yum update
> yum groupinstall ‘Development Tools’  (did not work)
> yum install httpd  (did not do it cause already had apache installed and working)
> yum install freetds
> yum install freetds-devel
> yum install php php-devel php-mssql
> service httpd restart  (showed the mentioned error)
> php -m (showed some )


------------------------------------------------------------------------

Well i did as you said , i did Apache-rebuild from cwp .
reboot
Same problem apche wont start.
giving this error :
Iniciando httpd: /bin/bash: /usr/sbin/httpd: No such file or directory [FAIL]
--------------------------------------------------------------------------------------------

As mentioned before i have another server (Cloned) which i have being using for comparing files and configurations (workingserver)

when i compare the files on servers   /etc/init.d/httpd   i found diferent directories on the conf .

------------------------- not starting apache server --/etc/init.d/httpd--------------
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
STOP_TIMEOUT=${STOP_TIMEOUT-10}

------------------------------------------------------------------

-------------------------Workingserver----/etc/init.d/httpd-------------------------
# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/local/apache/bin/apachectl
httpd=${HTTPD-/usr/local/apache/bin/httpd}
prog=httpd
pidfile=${PIDFILE-/usr/local/apache/logs/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
STOP_TIMEOUT=${STOP_TIMEOUT-10}
--------------------------------------------------------------------------------------

Sandeep   so i did , the change  copying and pasting .

And APACHE DID START .
at the first start , it showed an error that apache ip on port 80 was already in use .
after second restart it did start correctly , with no errors at list shown by cwp.
i did run service httpd configtest and also no errors shown .


The problem now is , that none of the webpages works , it gives an internal  Server error you can see it here  http://asaabogados.com

IMPORTANT TIPS:   could be wrong but said by others:

I did contact the person from PERU s. america that created the tutorial for instaling the freetds (gave me all the problems)
this person very kind , enter the server , and sayd that :

*he thinks there are two apache running .
*he thinks that apache runing should have someting to do with cd /usr/local/cwpsrv/conf
*He does not much about cwp but he thinks that probably apache should run true cd /usr/local/cwpsrv/conf  instead       /usr/local/apache/   

Sandeep  i dont know why but i thing , when a tryied to install freetds , some change could happen on suphp or php .
please Let me know  shell commands of reports you could need , to check the problem .

Sandeep Many thanks in advance again for your time and cooperation helping to solve my server problem .
Very kind of you .
Signature:
Sharing Knowledge , grows communities

Offline
*****
I'll check and inform you
« Last Edit: May 28, 2016, 11:56:06 AM by Sandeep »

Offline
*****
u need to contact cwp support as the server is messed up
« Last Edit: May 28, 2016, 02:22:06 PM by Sandeep »

Offline
*
hello

--------------------------------------------------------------------------------------------
giving this error :
Iniciando httpd: /bin/bash: /usr/sbin/httpd: No such file or directory [FAIL]
--------------------------------------------------------------------------------------------

I've faced the same problem today rebuilding apache

try «ln -s /usr/local/apache/bin/httpd /usr/sbin/httpd», this should help