jchristi / harstorage

Automatically exported from code.google.com/p/harstorage
Other
1 stars 0 forks source link

Httplib and socket errors #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Installing harstorage on windows
2.Starting up browsermob-proxy and mongodb
3.Run python script for browsermob-proxy

What is the expected output? What do you see instead?
The expected output would be the Har would be sent to harstorage but in there 
were errors in the python script.  The errors were the following:

Traceback (most recent call last):
  File "C:\HarStorage\testing.py", line 74, in <module>
    headers)
  File "C:\HarStorage\testing.py", line 13, in http_request
    connection.request(http_request_type, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 941, in request
    self._send_request(method, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 975, in _send_request
    self.endheaders(body)
  File "C:\Python27\lib\httplib.py", line 937, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 797, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 759, in send
    self.connect()
  File "C:\Python27\lib\httplib.py", line 740, in connect
    self.timeout, self.source_address)
  File "C:\Python27\lib\socket.py", line 571, in create_connection
    raise err
socket.error: [Errno 10061] No connection could be made because the target 
machine actively refused it

Now I have opened up all the ports because I thought that may have been the 
problem but was to no avail.  I have python 2.7.2.  

What version of the product are you using? On what operating system? harstorage 
0.5.2 and Windows

Please provide any additional information below.

Original issue reported on code.google.com by kentasem...@gmail.com on 15 Dec 2011 at 2:56

GoogleCodeExporter commented 9 years ago
Please run in command prompt:
  telnet localhost 5000 (harstorage)
  telnet localhost 8080 (browsermob-proxy)

Port may differ for your installation.

What is the result?

Can you also share fragment of your code near line 74?

Original comment by Pavel.Pa...@gmail.com on 15 Dec 2011 at 3:10

GoogleCodeExporter commented 9 years ago
I figured the problem out.  Thank you for your help.  I did have to install 
telnet and then realized I had set the production.ini host to an IP address and 
not localhost and when I changed those it ran perfectly.  

Thanks for the quick reply and help.

Original comment by kentasem...@gmail.com on 15 Dec 2011 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by Pavel.Pa...@gmail.com on 15 Dec 2011 at 5:24