AutomatedTester / browsermob-proxy-py

A python wrapper for Browsermob Proxy
http://oss.theautomatedtester.co.uk/browsermob-proxy-py
236 stars 104 forks source link

Permission denied while starting server #79

Closed rajagopalx closed 6 years ago

rajagopalx commented 6 years ago

On Ubuntu 16, while running server.start(),

---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
<ipython-input-3-508ab784f514> in <module>()
----> 1 server.start()

/home/raja/browsermob-proxy-py/browsermobproxy/server.py in start(self, options)
    111         self.process = subprocess.Popen(self.command,
    112                                         stdout=self.log_file,
--> 113                                         stderr=subprocess.STDOUT)
    114         count = 0
    115         while not self._is_listening():

/usr/lib/python3.5/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds)
    945                                 c2pread, c2pwrite,
    946                                 errread, errwrite,
--> 947                                 restore_signals, start_new_session)
    948         except:
    949             # Cleanup if the child failed starting.

/usr/lib/python3.5/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
   1549                             else:
   1550                                 err_msg += ': ' + repr(orig_executable)
-> 1551                     raise child_exception_type(errno_num, err_msg)
   1552                 raise child_exception_type(err_msg)
   1553

PermissionError: [Errno 13] Permission denied
rajagopalx commented 6 years ago

I got the above error only if I install through python setup.py. If I install through pip it will not be a problem.

But I faced two more issues.

  1. Permission denied on log file. Refer #53 to solve this
  2. OSError: [Errno 8] Exec format error

I added ['java', '-jar'] to self.command in server.py add here