Apache shutdown unexpectedly启动错误解决方法


xampp启动时显示的错误为:

9:52:41  [Apache] Attempting to start Apache app…

9:52:41  [Apache]
Status change detected: running
9:52:42  [Apache] Status change detected: stopped
9:52:42  [Apache] Error: Apache shutdown unexpectedly.
9:52:42  [Apache] This may be due to a blocked port, missing dependencies, 
9:52:42  [Apache] improper privileges, a crash, or a shutdown by another method.
9:52:42  [Apache] Check the “/xampp/apache/logs/error.log” file

9:52:42  [Apache] and the Windows Event Viewer for more clues


这个问题比较常见, 通常是80、443端口被占用

cmd 通过运行apache/bin/httpd.exe 打印如下log: 

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:443 
或者后面是80端口被占用

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: could not bind to address 0.0.0.0:80  或[ : : ]:80 

一、最快的处理方法就是修改端口号:

1、443端口被占用,apache无法监听443端口,该如何解决呢? 

在/xampp/apache/conf/extra/httpd-ssl.conf 

把Listen 443 修改为 444(可自定义)


2、80
端口被占用,apache无法监听80端口,该如何解决呢? 

在/xampp/apache/conf/extra/httpd.conf 

把Listen 80 修改为 88 (可自定义)

如果配置了vhosts的话请把httpd-vhosts.conf 中端口改为88(同上端口号)


二、最直接的方法是关闭占用80、443端口的进程: 
1. 通过cmd中netstat -ano 看看本机80、 443端口被占用没               —– –这里 可能会被其他程序占用如iis、虚拟机等
2.通过cmd中打印tasklist,查找占用80、443端口的进程名称。 
3.taskkill /pid 端口号 杀掉此进程名称,XAMPP重启apache即可。

综上所述第一种方法推荐使用,第二种每次启动都或多或少的再次遇到。

Apache Tomcat 7.0启动错误

05-30

在启动Apache Tomcat 7.0 时,发生了这样的错误:rnrnMay 30, 2011 11:06:36 AM org.apache.catalina.core.AprLifecycleListener initrnINFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\rnMay 30, 2011 11:06:36 AM org.apache.tomcat.util.digester.Digester startElementrnSEVERE: Begin event threw errorrnjava.lang.NoClassDefFoundError: javax/net/ssl/KeyManagerFactoryrn at org.apache.tomcat.util.net.AbstractEndpoint.(AbstractEndpoint.java:622)rn at org.apache.tomcat.util.net.JIoEndpoint.(JIoEndpoint.java:53)rn at org.apache.coyote.http11.Http11Protocol.(Http11Protocol.java:71)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at org.apache.catalina.connector.Connector.(Connector.java:75)rn at org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:62)rn at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)rn at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)rn at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)rn at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:554)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:262)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:430)rnCaused by: java.lang.ClassNotFoundException: javax.net.ssl.KeyManagerFactoryrn at java.net.URLClassLoader$1.run(URLClassLoader.java:202)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:190)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:247)rn ... 32 morernrnrn请各位帮忙,我重新安装Tomcat 好几次都这样,不能启动rnrn-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0rn-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0rnrnrn

The program has unexpectedly finished.

05-16

代码如下:rn[b]process.cpp[/b]rnprocess::process(QWidget *parent)rn : QWidget(parent)rnrn inputLabel = new QLabel(tr("请输入命令:"));rn inputEdit = new QLineEdit;rn runButton = new QPushButton(tr("运行"));rn outputLabel = new QLabel(tr("运行结果如下:"));rn outputEdit = new QTextEdit;rn outputEdit->setReadOnly(true);rn QHBoxLayout* hlayout = new QHBoxLayout;rn hlayout->addWidget(inputEdit);rn hlayout->addWidget(runButton);rn QVBoxLayout* layout = new QVBoxLayout;rn layout->addWidget(inputLabel);rn layout->addLayout(hlayout);rn layout->addWidget(outputLabel);rn layout->addWidget(outputEdit);rn setLayout(layout);rnrn QProcess* process1 = new QProcess;rn process1->start("./home/make/work/bin/main");rnrn connect(inputEdit, SIGNAL(returnPressed()), this, SLOT(runClicked()));rn connect(runButton, SIGNAL(clicked(bool)), this, SLOT(runClicked()));rn connect(process1, SIGNAL(readyRead()), this, SLOT(readOutput()));rn resize(500, 300);rnrnrnprocess::~process()rnrnrnrnvoid process::runClicked()rnrn QString input = inputEdit->text();rn process1->start(input);rn output = tr("");rn outputEdit->setText(output);rnrnvoid process::readOutput()rnrn output += process1->readAll();rn outputEdit->setText(output);rnrnrn[b]process.h[/b]rnclass process : public QWidgetrnrn Q_OBJECTrnrnpublic:rn process(QWidget *parent = 0);rn ~process();rnprivate slots:rn void runClicked();rn void readOutput();rnprivate:rn QProcess* process1;rn QString output;rn QLabel* inputLabel;rn QLineEdit* inputEdit;rn QPushButton* runButton;rn QLabel* outputLabel;rn QTextEdit* outputEdit;rn;rnrn#endif // PROCESS_Hrnrn[b]main.cpp[/b]rnint main(int argc, char *argv[])rnrn QApplication a(argc, argv);rn process w;rn w.show();rn return a.exec();rnrnrn出现的错误是rnThe program has unexpectedly finished.rnrn求各位大神看看哪里出错了?该怎么改正??

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试