The Browsermob-Proxy server process failed to start

3.2k views Asked by At

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.

I've been stuck here for too long. Can Anybody give me a feasible solution? Many thanks!!!

2

There are 2 answers

0
Tempo810 On

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. Simply type "java" in CMD or terminal to confirm the same problem. Then install java and add the path containing the java runtime to PATH.

0
Tom Davenport On

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. I eventually decided to enter the /full/path/to/browsermob-proxy and voila, it finally worked! 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).