Giter VIP home page Giter VIP logo

exaproxy's People

Contributors

david-farrar avatar ema avatar furmur avatar j3tm0t0 avatar prfalken avatar thomas-mangin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exaproxy's Issues

getifaddrs fails in some linux environments - fix included

I have a fairly complicated network interface set-up on my Linux machine, and not all of the network interfaces have IP addresses. The code in interfaces.py does not account for this possibility and therefore exaproxy fails to start. The fix is simple:

In function getifaddrs() in the file interfaces.py, there is a loop starting with

    while ifa:

After the while, add the following code:

        if ifa.ifa_addr == None:
            if ifa.ifa_next:
                ifa = ifaddrs.from_address(ifa.ifa_next)
                continue
            else:
                break

Wrong log file owner when exaproxy started by root and exaproxy.daemon.user is not root

When exaproxy is started by root, it creates log files specified in exaproxy.log.destination and exaproxy.usage.destination but does not do chown to exaproxy.daemon.user, which results in the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/opt/exaproxy/lib/exaproxy/application.py", line 327, in <module>
    main()
  File "/opt/exaproxy/lib/exaproxy/application.py", line 297, in main
    Supervisor(configuration).run()
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 133, in __init__
    redirector = fork_redirector(self.poller, self.configuration)
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/__init__.py", line 34, in fork_redirector
    supervisor = RedirectorSupervisor(configuration, messagebox, controlbox)
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/supervisor.py", line 25, in __init__
    self.log_writer = SysLogWriter('log', configuration.log.destination, configuration.log.enable, level=configuration.log.level)
  File "/opt/exaproxy/lib/exaproxy/util/log/writer.py", line 107, in __init__
    _handler = self.getHandler(destination)
  File "/opt/exaproxy/lib/exaproxy/util/log/writer.py", line 147, in getHandler
    handler = logging.handlers.RotatingFileHandler(destination, maxBytes=5*1024*1024, backupCount=5)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 936, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/exaproxy/exaproxy.log'

and

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/opt/exaproxy/lib/exaproxy/application.py", line 327, in <module>
    main()
  File "/opt/exaproxy/lib/exaproxy/application.py", line 297, in main
    Supervisor(configuration).run()
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 173, in __init__
    self.redirector.requestStats()
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/dispatch.py", line 61, in requestStats
    return self.messagebox.requestStats()
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/messagebox.py", line 49, in requestStats
    identifier = self.control.send('STATS')
  File "/opt/exaproxy/lib/exaproxy/util/control.py", line 20, in send
    self.box.put((identifier, command, args))
  File "/opt/exaproxy/lib/exaproxy/util/messagebox.py", line 103, in put
    raise e
IOError: [Errno 32] Broken pipe

Occurred on: Linux proxy-eu 3.16.0-4-amd64 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux

RFC violation

Section 14.10 of RFC 2616 / 6.1 of RFC 7230 does have a rule for header stripping, it is not implemented.

The headers should be passed to the backend processess but then stripped if 204 is used and removed if still present from the response.

respmod support

Hey,

just wanted to ask if you guys have any plans to implement ICAP respmod support?

Keep up the great work with ExaProxy :)

customize usage log

Hello, how can customize log , usage log line, I want to see, for example, x-forwarded-for header ,
Regards,
Nicolas

crash when Control/Worker Control/Debug

In web interface, click on Control/xxxx crash server :
Host: 52.49.155.160:800\r\n
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\n
Accept-Language: en-US,en;q=0.5\r\n
Accept-Encoding: gzip, deflate\r\n
Connection: keep-alive\r\n
Upgrade-Insecure-Requests: 1\r\n
\r\n
]]
ExaProxy 20589 header parsing header [[GET /favicon.ico HTTP/1.1\r\n
Host: 52.49.155.160:800\r\n
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0\r\n
Accept: /\r\n
Accept-Language: en-US,en;q=0.5\r\n
Accept-Encoding: gzip, deflate\r\n
Connection: keep-alive\r\n
\r\n
]]
ExaProxy 20567 client cleanup for socket <socket._socketobject object at 0x7fdd54f378a0>
ExaProxy 20589 header parsing header [[GET /favicon.ico HTTP/1.1\r\n
Host: 52.49.155.160:800\r\n
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\n
Accept-Language: en-US,en;q=0.5\r\n
Accept-Encoding: gzip, deflate\r\n
Connection: keep-alive\r\n
\r\n
]]
ExaProxy 20589 header parsing header [[GET /control/workers.html HTTP/1.1\r\n
Host: 52.49.155.160:800\r\n
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\r\n
Accept-Language: en-US,en;q=0.5\r\n
Accept-Encoding: gzip, deflate\r\n
Referer: http://52.49.155.160:800/\r\n
Connection: keep-alive\r\n
Upgrade-Insecure-Requests: 1\r\n
\r\n
]]


-- Please provide the information below on :
-- http://code.google.com/p/exaproxy/issues/entry

-- Version

2.7.12 (default, Sep 1 2016, 22:14:00)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

-- Logging History

Fri, 25 Nov 2016 08:36:11 supervisor error Starting exaproxy version 1.2.1
Fri, 25 Nov 2016 08:36:11 supervisor error python version 2.7.12 (default, Sep 1 2016, 22:14:00) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
Fri, 25 Nov 2016 08:36:11 supervisor debug starting /tmp/exaproxy-master/lib/exaproxy/application.py
Fri, 25 Nov 2016 08:36:11 daemon critical WARNING: python remote execution via the web server is enabled
Fri, 25 Nov 2016 08:36:11 daemon info for information, your configuration requires 65728 available file descriptors
Fri, 25 Nov 2016 08:36:11 supervisor info the chosen polling reactor was epoll
Fri, 25 Nov 2016 08:36:11 server info server [http proxy] accepting up to 32768 clients
Fri, 25 Nov 2016 08:36:11 server info server [web server] accepting up to 2 clients
Fri, 25 Nov 2016 08:36:11 supervisor info found new local ip 127.0.0.1 (lo)
Fri, 25 Nov 2016 08:36:11 supervisor info found new local ip 172.16.1.53 (eth0)
Fri, 25 Nov 2016 08:36:11 supervisor info found new local ip ::1 (lo)
Fri, 25 Nov 2016 08:36:11 supervisor info found new local ip fe80::3d:f2ff:fe8b:5f11 (eth0)
Fri, 25 Nov 2016 08:37:35 client debug cleanup for socket <socket._socketobject object at 0x7fdd54f378a0>

-- Traceback

Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/exaproxy-master/lib/exaproxy/util/debug.py", line 71, in
execfile(sys.argv[0])
File "/tmp/exaproxy-master/lib/exaproxy/application.py", line 327, in
main()
File "/tmp/exaproxy-master/lib/exaproxy/application.py", line 297, in main
Supervisor(configuration).run()
File "/tmp/exaproxy-master/lib/exaproxy/supervisor.py", line 270, in run
status, events = self.reactor.run()
File "/tmp/exaproxy-master/lib/exaproxy/reactor/reactor.py", line 355, in run
self.enactDecisions(decisions)
File "/tmp/exaproxy-master/lib/exaproxy/reactor/reactor.py", line 290, in enactDecisions
response, length, status, buffer_change = self.content.getContent(client, command, decision)
File "/tmp/exaproxy-master/lib/exaproxy/reactor/content/manager.py", line 255, in getContent
content = ('close', http('200', self.page.html(path)))
File "/tmp/exaproxy-master/lib/exaproxy/html/page.py", line 446, in html
return menu(self._workers())
File "/tmp/exaproxy-master/lib/exaproxy/html/page.py", line 279, in _workers
'exaproxy.redirector.minimum' : self.supervisor.manager.low,
AttributeError: 'Supervisor' object has no attribute 'manager'


-- Please provide the information above on :
-- http://code.google.com/p/exaproxy/issues/entry

Websockets at Port 80 and 8080 don't work

Hi,

when running this websocketstest some of them fail:
http://websocketstest.com/

WebSockets (Port 80)
WebSockets (Port 8080)

I assume that's because they're normal, unencrypted Websockets:
Request URL:ws://ws.websocketstest.com:8080/service
.. and therefore not passed through with CONNECT?

Thanks.

Error on Debian Jessie trying to run 1.2.1

--------------------------------------------------------------------------------
-- Please provide the information below on :
-- http://code.google.com/p/exaproxy/issues/entry
--------------------------------------------------------------------------------


-- Version

2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2]


-- Logging History


Tue, 01 Sep 2015 09:48:58 supervisor error         Starting exaproxy version 1.2.1
Tue, 01 Sep 2015 09:48:58 supervisor error         python version 2.7.9 (default, Mar  1 2015, 12:57:24)  [GCC 4.9.2]
Tue, 01 Sep 2015 09:48:58 supervisor debug         starting /root/dl/exaproxy-1.2.1/lib/exaproxy/application.py
Tue, 01 Sep 2015 09:48:58 daemon info          for information, your configuration requires 65826 available file descriptors
Tue, 01 Sep 2015 09:48:58 supervisor info          the chosen polling reactor was epoll
Tue, 01 Sep 2015 09:48:58 server info          server [http proxy] accepting up to 32768 clients
Tue, 01 Sep 2015 09:48:58 server info          server [web server] accepting up to 100 clients
Tue, 01 Sep 2015 09:48:58 server info          server [icap server] accepting up to 32768 clients


-- Traceback


Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/util/debug.py", line 71, in <module>
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/application.py", line 306, in <module>
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/application.py", line 276, in main
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 131, in __init__
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 211, in interfaces
  File "/root/dl/exaproxy-1.2.1/lib/exaproxy/util/interfaces.py", line 233, in getifaddrs
TypeError: integer expected


--------------------------------------------------------------------------------
-- Please provide the information above on :
-- http://code.google.com/p/exaproxy/issues/entry
--------------------------------------------------------------------------------


ExaProxy 18024  supervisor    Starting exaproxy version 1.2.1
ExaProxy 18024  supervisor    python version 2.7.9 (default, Mar  1 2015, 12:57:24)  [GCC 4.9.2]
ExaProxy 18024  worker 1      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 2      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 3      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 4      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 5      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 6      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 7      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 8      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 9      could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow
ExaProxy 18024  worker 10     could not spawn process /root/dl/exaproxy-1.2.1/etc/exaproxy/redirector/url-allow

Tun interface causing issues when starting exaproxy

Hello,
there seems to be an issue related to presence of tun interface (needed i.e. by openvpn) which results in error:

-- Traceback


Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/application.py", line 306, in <module>
    main()
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/application.py", line 276, in main
    Supervisor(configuration).run()
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 131, in __init__
    self.interfaces()
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 211, in interfaces
    for interface in getifaddrs():
  File "/home/user/exaproxy-1.2.1/lib/exaproxy/util/interfaces.py", line 233, in getifaddrs
    sa = sockaddr.from_address(ifa.ifa_addr)
TypeError: integer expected

It looks very similiar to ros/ros_comm#30 .

When the tun* interface is gone (openvpn stopped) exaproxy starts normally.

Thanks for fixing problem!

better reporting

add in complement to syslog a way to log statsd and/or graylog2 GELF

Startup error

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/application.py", line 306, in <module>
    main()
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/application.py", line 276, in main
    Supervisor(configuration).run()
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 131, in __init__
    self.interfaces()
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/supervisor.py", line 211, in interfaces
    for interface in getifaddrs():
  File "/tmp/exaproxy-1.2.1/lib/exaproxy/util/interfaces.py", line 233, in getifaddrs
    sa = sockaddr.from_address(ifa.ifa_addr)
TypeError: integer expected


--------------------------------------------------------------------------------
-- Please provide the information above on :
-- http://code.google.com/p/exaproxy/issues/entry
--------------------------------------------------------------------------------

Seems like it doesn't like something in my KVM VM w/ VPN. Interfaces are just OpenVPN tunnel and eth0 (libvirt) and tun0. This is vanilla run as ./sbin/exaproxy.

exaproxy and ipv6

hello,
exa works well with ipv4,
now we are trying to use ipv6 , and as a client connect we obtain :

[tcp4]
backlog = 200
bind = '172.16.1.207'
listen = false
out = false
port = 3128
timeout = 5

[tcp6]
backlog = 200
bind = 'fe80::62:70ff:fe2f:75c3'
host = 'fd00::62:70ff:fe2f:75c3'
listen = true
out = true
port = 3128
timeout = 5
Tue, 21 Feb 2017 18:37:03 supervisor error         Starting exaproxy version 1.2.1
Tue, 21 Feb 2017 18:37:03 supervisor error         python version 2.7.12 (default, Dec 29 2016, 03:22:42)  [GCC 4.9.4]
Tue, 21 Feb 2017 18:37:03 supervisor debug         starting /root/resources/exaproxy-master/lib/exaproxy/application.py
Tue, 21 Feb 2017 18:37:03 daemon critical      WARNING: python remote execution via the web server is enabled
Tue, 21 Feb 2017 18:37:03 daemon info          for information, your configuration requires 65786 available file descriptors
Tue, 21 Feb 2017 18:37:03 supervisor info          the chosen polling reactor was epoll
Tue, 21 Feb 2017 18:37:03 server info          server [http proxy] accepting up to 32768 clients
Tue, 21 Feb 2017 18:37:03 server info          server [web server] accepting up to 100 clients
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip 127.0.0.1 (lo)
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip 172.16.1.207 (eth0)
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip ::1 (lo)
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip fe80::62:70ff:fe2f:75c3 (eth0)
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip fd00::62:70ff:fe2f:75c3 (wg0)
Tue, 21 Feb 2017 18:37:03 supervisor info          found new local ip ce80::62:70ff:fe2f:75c3 (wg0)

-- Traceback


Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/root/resources/exaproxy-master/lib/exaproxy/util/debug.py", line 71, in <module>
  File "/root/resources/exaproxy-master/lib/exaproxy/application.py", line 327, in <module>
  File "/root/resources/exaproxy-master/lib/exaproxy/application.py", line 297, in main
  File "/root/resources/exaproxy-master/lib/exaproxy/supervisor.py", line 270, in run
  File "/root/resources/exaproxy-master/lib/exaproxy/reactor/reactor.py", line 353, in run
  File "/root/resources/exaproxy-master/lib/exaproxy/reactor/reactor.py", line 325, in handle
  File "/root/resources/exaproxy-master/lib/exaproxy/reactor/reactor.py", line 50, in acceptProxyConnections
  File "/root/resources/exaproxy-master/lib/exaproxy/network/server.py", line 83, in accept
ValueError: too many values to unpack


--------------------------------------------------------------------------------
-- Please provide the information above on :
-- http://code.google.com/p/exaproxy/issues/entry
--------------------------------------------------------------------------------

ExaProxy 3011   manager       killing all workings
ExaProxy 3011   manager       we are killing worker 1
ExaProxy 3011   manager       we are killing worker 3
ExaProxy 3011   manager       we are killing worker 2
ExaProxy 3011   manager       we are killing worker 5
ExaProxy 3011   manager       we are killing worker 4

regards,
Nicolas

Statistics Hangs Server

Clicking statistics hangs the service. A few other links on the stats page do the same thing.

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/application.py", line 326, in <module>
    main()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/application.py", line 296, in main
    Supervisor(configuration).run()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/supervisor.py", line 270, in run
    status, events = self.reactor.run()
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/reactor.py", line 349, in run
    self.enactDecisions(decisions)
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/reactor.py", line 284, in enactDecisions
    response, length, status, buffer_change = self.content.getContent(client, command, decision)
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/reactor/content/manager.py", line 237, in getContent
    content = ('close', http('200', self.page.html(path)))
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/html/page.py", line 357, in html
    return menu(self._statistics())
  File "/home/jclark/devel/github/Exa-Networks/exaproxy/lib/exaproxy/html/page.py", line 128, in _statistics
    for k,v in sorted(self.monitor.statistics().items()):
TypeError: statistics() takes exactly 2 arguments (1 given)

Exaproxy does not create pid file

When exaproxy starts, it does not create pid file specified in exaproxy.daemon.pidfile and crashes with the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/opt/exaproxy/lib/exaproxy/application.py", line 327, in <module>
    main()
  File "/opt/exaproxy/lib/exaproxy/application.py", line 297, in main
    Supervisor(configuration).run()
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 123, in __init__
    if not self.initialise():
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 425, in initialise
    self.pid.save()
  File "/opt/exaproxy/lib/exaproxy/util/pid.py", line 36, in save
    with open(self.pid_file,"r") as f:
IOError: [Errno 2] No such file or directory: '/var/log/exaproxy/exaproxy.pid'

When exaproxy is started and pid file with correct owner is already present, it writes nothing in it.

broken virtualenv pip install

I think it reasonable to pip install python programs inside a python virtualenv... don't you?

Here's some output from the failure... others should be able to reproduce this:

byte-compiling /home/deploy/virtenv/lib/python2.7/site-packages/exaproxy/reactor/content/init.py to init.pyc

byte-compiling /home/deploy/virtenv/lib/python2.7/site-packages/exaproxy/reactor/redirector/worker.py to worker.pyc

byte-compiling /home/deploy/virtenv/lib/python2.7/site-packages/exaproxy/reactor/redirector/manager.py to manager.pyc

byte-compiling /home/deploy/virtenv/lib/python2.7/site-packages/exaproxy/reactor/redirector/init.py to init.pyc

byte-compiling /home/deploy/virtenv/lib/python2.7/site-packages/exaproxy/application.py to application.pyc

running install_data

creating /usr/lib/systemd

error: could not create '/usr/lib/systemd': Permission denied


Cleaning up...
Command /home/deploy/virtenv/bin/python -c "import setuptools, tokenize;file='/tmp/pip-XTwQiB-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-imyoFk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/deploy/virtenv/include/site/python2.7 failed with error code 1 in /tmp/pip-XTwQiB-build
Storing debug log for failure in /home/deploy/.pip/pip.log
(virtenv)deploy@api2:~$

Broken pipe when when writing to messagebox.

I'm not sure about the fix for this. Perhaps in the case of this specific error we could retry a few times before raising the exception?

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/opt/exaproxy/lib/exaproxy/application.py", line 317, in <module>
    main()
  File "/opt/exaproxy/lib/exaproxy/application.py", line 280, in main
    Supervisor(configuration).run()
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 124, in __init__
    redirector = fork_redirector(self.poller, self.configuration)
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/__init__.py", line 38, in fork_redirector
    supervisor.run()
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/supervisor.py", line 120, in run
    status = self.reactor.run()
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/reactor.py", line 66, in run
    self.querier.sendResponse(client_id, command, decision)
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/messagebox.py", line 69, in sendResponse
    return self.box.put(message)
  File "/opt/exaproxy/lib/exaproxy/util/messagebox.py", line 91, in put
    self.pipe_out.write(message_s)
IOError: [Errno 4] Interrupted system call


--------------------------------------------------------------------------------
-- Please provide the information above on :
-- http://code.google.com/p/exaproxy/issues/entry
--------------------------------------------------------------------------------


Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/opt/exaproxy/lib/exaproxy/reactor/redirector/dispatch.py", line 16, in run
    self.messagebox.box.put(message)
  File "/opt/exaproxy/lib/exaproxy/util/messagebox.py", line 91, in put
    self.pipe_out.write(message_s)
IOError: [Errno 32] Broken pipe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.