IOError: [Errno 32] Broken pipe in Ubuntu VM

14 views
Skip to first unread message

Jim Carow

unread,
Jun 8, 2016, 8:29:02 PM6/8/16
to airbnb_caravel
Hello,

Trying to install Caravel in an Ubuntu 16.04 VM running in VirtualBox. After a successful login the main Caravel page loads and the below listed exception occurs. Any idea what is happening to the socket?

thanks, Jim

016-06-08 15:10:31,730:INFO:werkzeug:
127.0.0.1 - - [08/Jun/2016 15:10:31] "GET /caravel/activity_per_day HTTP/1.1" 200 -
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 659, in inner
    srv.serve_forever()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 499, in serve_forever
    HTTPServer.serve_forever(self)
  File "/usr/lib/python2.7/SocketServer.py", line 233, in serve_forever
    self._handle_request_noblock()
  File "/usr/lib/python2.7/SocketServer.py", line 292, in _handle_request_noblock
    self.handle_error(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 216, in handle
    rv = BaseHTTPRequestHandler.handle(self)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 251, in handle_one_request
    return self.run_wsgi()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 184, in execute
    write(data)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 152, in write
    self.send_header(key, value)
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 401, in send_header
    self.wfile.write("%s: %s\r\n" % (keyword, value))
IOError: [Errno 32] Broken pipe

Jim Carow

unread,
Jun 8, 2016, 8:49:19 PM6/8/16
to airbnb_caravel
Hi, More info...

The broken pipe only occurs when loading the Welcome page.

If I restart the server and use another URL like:  localhost:8088/caravel/dashboard/births/

The dashboard will load. Only the Welcome page fails.

thanks, Jim

Davor Poldrugo

unread,
Jun 16, 2016, 7:32:12 AM6/16/16
to airbnb_caravel
I'm having the same problem on Ubuntu 14.04 (Docker container, host is CentOs). After some time Caravel hangs and I need to restart it. This happens multiple times per day. I'm using Caravel 0.9.0.

These are the lines that are always last in the log, after the server hangs:

2016-06-16_10:46:05.42007 Exception in thread Thread-1:
2016-06-16_10:46:05.42008 Traceback (most recent call last):
2016-06-16_10:46:05.42008   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
2016-06-16_10:46:05.42008     self.run()
2016-06-16_10:46:05.42009   File "/usr/lib/python2.7/threading.py", line 763, in run
2016-06-16_10:46:05.42009     self.__target(*self.__args, **self.__kwargs)
2016-06-16_10:46:05.42009   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 659, in inner
2016-06-16_10:46:05.42009     srv.serve_forever()
2016-06-16_10:46:05.42009   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 499, in serve_forever
2016-06-16_10:46:05.42010     HTTPServer.serve_forever(self)
2016-06-16_10:46:05.42010   File "/usr/lib/python2.7/SocketServer.py", line 238, in serve_forever
2016-06-16_10:46:05.42010     self._handle_request_noblock()
2016-06-16_10:46:05.42010   File "/usr/lib/python2.7/SocketServer.py", line 297, in _handle_request_noblock
2016-06-16_10:46:05.42010     self.handle_error(request, client_address)
2016-06-16_10:46:05.42011   File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
2016-06-16_10:46:05.42011     self.process_request(request, client_address)
2016-06-16_10:46:05.42011   File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
2016-06-16_10:46:05.42011     self.finish_request(request, client_address)
2016-06-16_10:46:05.42011   File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
2016-06-16_10:46:05.42012     self.RequestHandlerClass(request, client_address, self)
2016-06-16_10:46:05.42012   File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
2016-06-16_10:46:05.42012     self.handle()
2016-06-16_10:46:05.42013   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 216, in handle
2016-06-16_10:46:05.42013     rv = BaseHTTPRequestHandler.handle(self)
2016-06-16_10:46:05.42013   File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
2016-06-16_10:46:05.42013     self.handle_one_request()
2016-06-16_10:46:05.42013   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 251, in handle_one_request
2016-06-16_10:46:05.42014     return self.run_wsgi()
2016-06-16_10:46:05.42014   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in run_wsgi
2016-06-16_10:46:05.42014     execute(self.server.app)
2016-06-16_10:46:05.42014   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 184, in execute
2016-06-16_10:46:05.42014     write(data)
2016-06-16_10:46:05.42015   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in write
2016-06-16_10:46:05.42015     self.wfile.write(data)
2016-06-16_10:46:05.42015 IOError: [Errno 104] Connection reset by peer
2016-06-16_10:46:05.42015 


2016-06-16_11:08:25.38299 Exception in thread Thread-1:
2016-06-16_11:08:25.38300 Traceback (most recent call last):
2016-06-16_11:08:25.38300   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
2016-06-16_11:08:25.38300     self.run()
2016-06-16_11:08:25.38300   File "/usr/lib/python2.7/threading.py", line 763, in run
2016-06-16_11:08:25.38301     self.__target(*self.__args, **self.__kwargs)
2016-06-16_11:08:25.38301   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 659, in inner
2016-06-16_11:08:25.38301     srv.serve_forever()
2016-06-16_11:08:25.38301   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 499, in serve_forever
2016-06-16_11:08:25.38301     HTTPServer.serve_forever(self)
2016-06-16_11:08:25.38302   File "/usr/lib/python2.7/SocketServer.py", line 238, in serve_forever
2016-06-16_11:08:25.38302     self._handle_request_noblock()
2016-06-16_11:08:25.38302   File "/usr/lib/python2.7/SocketServer.py", line 297, in _handle_request_noblock
2016-06-16_11:08:25.38302     self.handle_error(request, client_address)
2016-06-16_11:08:25.38303   File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
2016-06-16_11:08:25.38304     self.process_request(request, client_address)
2016-06-16_11:08:25.38304   File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
2016-06-16_11:08:25.38304     self.finish_request(request, client_address)
2016-06-16_11:08:25.38304   File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
2016-06-16_11:08:25.38305     self.RequestHandlerClass(request, client_address, self)
2016-06-16_11:08:25.38305   File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
2016-06-16_11:08:25.38305     self.handle()
2016-06-16_11:08:25.38305   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 216, in handle
2016-06-16_11:08:25.38306     rv = BaseHTTPRequestHandler.handle(self)
2016-06-16_11:08:25.38306   File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
2016-06-16_11:08:25.38306     self.handle_one_request()
2016-06-16_11:08:25.38306   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 251, in handle_one_request
2016-06-16_11:08:25.38306     return self.run_wsgi()
2016-06-16_11:08:25.38307   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in run_wsgi
2016-06-16_11:08:25.38307     execute(self.server.app)
2016-06-16_11:08:25.38307   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 184, in execute
2016-06-16_11:08:25.38307     write(data)
2016-06-16_11:08:25.38307   File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in write
2016-06-16_11:08:25.38308     self.wfile.write(data)
2016-06-16_11:08:25.38308 IOError: [Errno 32] Broken pipe
2016-06-16_11:08:25.38308 

stupidki...@gmail.com

unread,
Jun 16, 2016, 9:47:58 AM6/16/16
to airbnb_caravel
Hi, I got a fix by the method from Max.
You could give a try by running the commend with "caravel runserver".

What Max though is as below:
"I think it has to do with using the debug server (`-d` flag when starting the web server), and concurrency perhaps. That debug web server is named Werkzeug and clearly shows in the stack trace. Remove the `-d` flag to get a more proper web server running (gunicorn)."

Davor Poldrugo

unread,
Jun 16, 2016, 10:00:49 AM6/16/16
to airbnb_caravel
Thanks, I did that. We'll see how it works now... the UI seems to load more quickly.

Maxime Beauchemin

unread,
Jun 16, 2016, 12:18:00 PM6/16/16
to airbnb_caravel
I just changed the docs to tell people to run the production server in the installation instructions.

Davor Poldrugo

unread,
Jun 17, 2016, 3:04:51 PM6/17/16
to airbnb_caravel
This definitively fixed the problem, it's running smoothly since I started caravel without -d flag.
@Maxime, the doc was the reason why I used -d flag. Great to change that. And BTW, great thing that AirBnb open-sourced Caravel (ex Panoramix)!

Maxime Beauchemin

unread,
Jun 17, 2016, 6:18:05 PM6/17/16
to Davor Poldrugo, airbnb_caravel
I'm very grateful that we are able to share Caravel with the world! All aboard!!!!

For the record I think Werkzeug (the debug web server lib) has been showing this issue since 0.11.x ...

Max

--
You received this message because you are subscribed to the Google Groups "airbnb_caravel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to airbnb_carave...@googlegroups.com.
To post to this group, send email to airbnb_...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/airbnb_caravel/41dec286-c056-480c-86d8-b1b78fbe8f45%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

pg...@janacare.com

unread,
Jul 9, 2016, 9:45:20 AM7/9/16
to airbnb_caravel
Hello,

I get this error quite often while running Caravel in development mode.

For production purpose it should be run without '-d'.

So is there any benefit of running Caravel in Development mode, except for log output ?
(since as mentioned before, this error occurs quite often for me)

Thank you,


On Saturday, June 18, 2016 at 3:48:05 AM UTC+5:30, Maxime Beauchemin wrote:
I'm very grateful that we are able to share Caravel with the world! All aboard!!!!

For the record I think Werkzeug (the debug web server lib) has been showing this issue since 0.11.x ...

Max
On Fri, Jun 17, 2016 at 12:04 PM, Davor Poldrugo <dpol...@gmail.com> wrote:
This definitively fixed the problem, it's running smoothly since I started caravel without -d flag.
@Maxime, the doc was the reason why I used -d flag. Great to change that. And BTW, great thing that AirBnb open-sourced Caravel (ex Panoramix)!

On Thursday, June 16, 2016 at 6:18:00 PM UTC+2, Maxime Beauchemin wrote:
I just changed the docs to tell people to run the production server in the installation instructions.

--
You received this message because you are subscribed to the Google Groups "airbnb_caravel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to airbnb_caravel+unsubscribe@googlegroups.com.
To post to this group, send email to airbnb_caravel@googlegroups.com.

Maxime Beauchemin

unread,
Jul 11, 2016, 12:17:53 PM7/11/16
to airbnb_caravel
The dev (debug) server auto-reloads when altering files while developing, serves a nice interactive debug page when needed and outputs sequential logs.

Max

Andrew Pitts

unread,
Jul 16, 2016, 11:23:09 PM7/16/16
to airbnb_caravel
Have been hitting this same issue. Will try without the -d flag..sure it will work. It looks like the main docs haven't been updated yet though. Here I mean: http://airbnb.io/caravel/installation.html. I can see the edit though here: https://github.com/airbnb/caravel/commit/04388a7b9b2aff026f46a4412aff48558f9150ec. I guess it just hasn't gone live yet....

Maxime Beauchemin

unread,
Jul 17, 2016, 4:08:03 PM7/17/16
to airbnb_caravel
Thanks for letting me know, I just updated the docs.

Max
Reply all
Reply to author
Forward
0 new messages