Closed lukebakken closed 7 years ago
Anything new? With this issue, vaurien is just not working.
Hi, I'm new to vaurien are there any work arounds for this?
I've tried a variety of different configs (including sync, reconnect) but it always seems to fail. Using vaurien 1.9. Also tried with 1.9 but hitting the same issue.
In case this helps:
root@2f2edc0464b0:/# python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vaurien
>>> vaurien.__version__
'1.8'
>>>
root@2f2edc0464b0:/# vaurien --protocol http --proxy 0.0.0.0:5672 --backend google.com:80 --behavior 20:delay
2016-05-13 14:10:28 [18] [INFO] Starting the Chaos TCP Server
2016-05-13 14:10:28 [18] [INFO] Options:
2016-05-13 14:10:28 [18] [INFO] * proxies from 0.0.0.0:5672 to google.com:80
2016-05-13 14:10:28 [18] [INFO] * timeout: 30
2016-05-13 14:10:28 [18] [INFO] * stay_connected: 0
2016-05-13 14:10:28 [18] [INFO] * pool_max_size: 100
2016-05-13 14:10:28 [18] [INFO] * pool_timeout: 30
2016-05-13 14:10:28 [18] [INFO] * async_mode: 1
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 534, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/vaurien/proxy.py", line 214, in _weirdify
behavior, behavior_name)
File "/usr/local/lib/python2.7/dist-packages/vaurien/proxy.py", line 162, in _weirdify
return self.handler(source, dest, to_backend, behavior)
File "/usr/local/lib/python2.7/dist-packages/vaurien/protocols/base.py", line 58, in __call__
return self._handle(source, dest, to_backend)
File "/usr/local/lib/python2.7/dist-packages/vaurien/protocols/http.py", line 46, in _handle
dest.sendall(data)
File "/usr/local/lib/python2.7/dist-packages/gevent/_socket2.py", line 412, in sendall
timeleft = self.__send_chunk(chunk, flags, timeleft, end)
File "/usr/local/lib/python2.7/dist-packages/gevent/_socket2.py", line 357, in __send_chunk
raise timeout('timed out')
timeout: timed out
<Greenlet at 0x7f559fc8bcd0: <bound method RandomProxy._weirdify of <RandomProxy at 0x7f559fbf5590 fileno=5 address=0.0.0.0:5672>>(<socket at 0x7f559f971a50 fileno=6 sock=172.17.138, <socket at 0x7f559f971cd0 fileno=8 sock=172.17.138, True, 'http.97be5caf-30b7-43d9-8143-7d457b34d8d9.', <vaurien.behaviors.dummy.Dummy object at 0x7f559fb, 'dummy')> failed with timeout
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 534, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/gevent/baseserver.py", line 25, in _handle_and_close_when_done
return handle(*args_tuple)
File "/usr/local/lib/python2.7/dist-packages/vaurien/proxy.py", line 116, in handle
res = [green.get() for green in greens]
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 480, in get
self._raise_exception()
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 171, in _raise_exception
reraise(*self.exc_info)
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 534, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/vaurien/proxy.py", line 214, in _weirdify
behavior, behavior_name)
File "/usr/local/lib/python2.7/dist-packages/vaurien/proxy.py", line 162, in _weirdify
return self.handler(source, dest, to_backend, behavior)
File "/usr/local/lib/python2.7/dist-packages/vaurien/protocols/base.py", line 58, in __call__
return self._handle(source, dest, to_backend)
File "/usr/local/lib/python2.7/dist-packages/vaurien/protocols/http.py", line 46, in _handle
dest.sendall(data)
File "/usr/local/lib/python2.7/dist-packages/gevent/_socket2.py", line 412, in sendall
timeleft = self.__send_chunk(chunk, flags, timeleft, end)
File "/usr/local/lib/python2.7/dist-packages/gevent/_socket2.py", line 357, in __send_chunk
raise timeout('timed out')
timeout: timed out
<Greenlet at 0x7f559fc8bc30: _handle_and_close_when_done(<bound method RandomProxy.handle of <RandomProxy a, <bound method RandomProxy.do_close of <RandomProxy, (<socket at 0x7f559f971a50 fileno=[Errno 9] Bad fi)> failed with timeout
@andrewmichaelsmith - see PR #53
@lukebakken thanks! I just installed your branch and it works perfectly.
Environment:
Command:
Exception raised:
PR on the way.