1

我有一个简单的网络应用程序(http://www.webdungeon2.org)(6 页)在最新(2014 年 4 月)版本的 Rikulo Stream(Ubuntu 13.04)Dart 1.2 上运行,我在浏览时收到以下错误(我思考):

Uncaught Error: SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
#0      _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:700)
#1      _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2      _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3      _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

服务器崩溃,然后我重新启动它。这在 3 天内发生了 3 次。

我也得到了这些(不会使网站崩溃):

2014-04-09 15:07:33.394:stream:5
SHOUT: [/MY_WEB_PAGE] HttpException: Trying to set 'Transfer-Encoding: Chunked' on HTTP 1.0 headers
#0      _HttpHeaders.chunkedTransferEncoding= (http_headers.dart:142)
#1      Rsp.init (package:stream/src/rsp_util.dart:25:15)
#2      demo (file:///mytool/webdungeon/web/webapp/demo.rsp.dart:10:16)
#3      _StreamServer._handle (package:stream/src/server_impl.dart:92:39)
#4      _StreamServer._startChannel.<anonymous closure>.<anonymous closure> (package:stream/src/server_impl.dart:310:16)
#5      _rootRunUnary (dart:async/zone.dart:717)
#6      _ZoneDelegate.runUnary (dart:async/zone.dart:449)
#7      _CustomizedZone.runUnary (dart:async/zone.dart:654)
#8      _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
......
......

有什么建议么?

更新 - 4 月 12 日

Dart 1.3 上仍然出现问题,但错误代码不同

Uncaught Error: SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
#0      _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:713)
#1      _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2      _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3      _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

哔叽

更新 - 4 月 28 日

该问题似乎已在 Dart SDK 1.3.3 版中得到解决。我的服务器已经顺利运行了 2 天。

哔叽

4

2 回答 2

1

你升级到 Dart 1.3 了吗?该问题应由Issue 17468引起,并在 Dart 1.3 中修复。

对于 的问题HttpException...Chunked,我没有这方面的经验。你必须检查 Dart API,或者做一个简单的案例来重现这个问题。

于 2014-04-11T00:45:17.063 回答
0

问题 17468的修复包含一个错误。Streams 属于监听它们的区域,而不是创建的区域。我已经用r35071修复了这个错误。

虽然这不会修复 1.3 二进制文件,但应该可以检查 1.3 源并应用此补丁。

于 2014-04-15T19:03:52.800 回答