[英]The Browsermob-Proxy server process failed to start
I encountered this error when I just start the server.我刚启动服务器时遇到了这个错误。 Here's the code:这是代码:
server = Server(r"path\to\browsermob-proxy")
server.start()
Then it stopped and raised an error like this:然后它停止并引发如下错误:
browsermobproxy.exceptions.ProxyServerError: The Browsermob-Proxy server process failed to start. Check <_io.TextIOWrapper name='C:\...\server.log' mode='w' encoding='cp936'>for a helpful error message.
The log file seems not providing anything helpful.日志文件似乎没有提供任何有用的信息。 It just said that 'java' is not recognized as an internal or external command, operable program, or batch file.它只是说“java”不被识别为内部或外部命令、可运行的程序或批处理文件。
I've been stuck here for too long.我被困在这里太久了。 Can Anybody give me a feasible solution?谁能给我一个可行的解决方案? Many thanks!!!非常感谢!!!
This was driving me nuts.这让我发疯。 Even after installing Java Runtime Environment (and making sure it was in the system path) it didn't fix things.即使在安装 Java 运行时环境(并确保它在系统路径中)之后,它也没有解决问题。 I eventually decided to enter the /full/path/to/browsermob-proxy and voila, it finally worked!我最终决定输入 /full/path/to/browsermob-proxy 并且瞧,它终于奏效了! Using the relative/path/to/browsermob-proxy failed (even though it found the file and would give another error if the relative path or the filename was incorrect, it wasn't enough without the full path).使用 relative/path/to/browsermob-proxy 失败(即使它找到了文件并且如果相对路径或文件名不正确会给出另一个错误,没有完整路径是不够的)。
I came across with this yesterday, same error in the log.我昨天遇到了这个,日志中也有同样的错误。 This is caused by either the operation system has not installed java or java has not added to path.这是由于操作系统没有安装java或java没有添加到路径引起的。 Simply type "java" in CMD or terminal to confirm the same problem.只需在 CMD 或终端中输入“java”即可确认相同的问题。 Then install java and add the path containing the java runtime to PATH.然后安装java并将包含java运行时的路径添加到PATH。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.