尝试通过DIY墨盒在OpenShift上运行Dart。我有为RHEL6构建的二进制文件并且它们正在运行(dart VM本身工作正常)。然而,在我的钩子中,我在构建阶段尝试pub build
,自然地,编译Javascript等等。pub get
工作正常,但运行pub build
会导致错误。这是堆栈跟踪:
FINE: Pub 1.5.1
IO : Deleting directory build.
FINE: Loaded package graph.
FINE: Clean up system cache temp directory /var/lib/openshift/(snip)/app-root/runtime/repo/_temp.
ERR : Failed to create server socket (OS Error: Permission denied, errno = 13), address = 127.0.0.1, port = 0
FINE: Exception type: SocketException
FINE: dart:io HttpServer.bind
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/barback/barback_server.dart 49 BarbackServer.bind
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 395 AssetEnvironment._load
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 70 AssetEnvironment.create.<fn>
| dart:isolate _RawReceivePortImpl._handleMessage
| ===== asynchronous gap ===========================
| dart:async _Future.then
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart 62 AssetEnvironment.create
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/command/build.dart 56 BuildCommand.onRunTransformerCommand
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/command/barback.dart 60 onRun
| dart:async Future.Future.sync
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/utils.dart 90 syncFuture
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/command.dart 178 PubCommand.run
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/bin/pub.dart 198 invokeCommand.<fn>
| dart:async Future.Future.sync
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/utils.dart 90 syncFuture
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/bin/pub.dart 197 invokeCommand
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/bin/pub.dart 87 runPub.<fn>
| dart:async Future.Future.sync
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/utils.dart 102 captureErrors.<fn>
| package:stack_trace/src/chain.dart 93 Chain.capture
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/lib/src/utils.dart 116 captureErrors
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/bin/pub.dart 87 runPub
| /usr/local/sandbox/dart/sdk/lib/_internal/pub/bin/pub.dart 74 main.<fn>
| dart:isolate _RawReceivePortImpl._handleMessage
我很困惑为什么pub build
需要打开HttpServer连接......如果我理解堆栈跟踪,它试图绑定到127.0.0.1端口0?而OpenShift不允许这样做?我理解正确吗?任何OpenShift或Dart专家都有任何想法吗?
感谢。