当我们在没有浏览器的服务器上运行时,车辆生命周期应用程序退出。有解决方案吗

时间:2017-06-30 13:39:44

标签: hyperledger-composer

我正在使用来自数字海洋的16.04 ubuntu服务器。 我试图从composer-sample-appplication git项目运行车辆示例。所以一旦我们使用build.sh然后超越install.sh,它就像下载docker图像和部署bna一样。 Eveything处以罚款。

所以一旦网络启动,

它启动UI应用程序如下:

# Start the VDA application.
docker run \
-d \
--network composer_default \
--name vda \
-e COMPOSER_BASE_URL=http://rest:3000 \
-e NODE_RED_BASE_URL=ws://node-red:1880 \
-p 6001:6001 \
hyperledger/vehicle-lifecycle-vda
2e0370a1d3694e6504d16fdf7b542f36bfb8c9a9e37f217ce35625968e772b52

# Start the manufacturing application.
docker run \
-d \
--network composer_default \
--name manufacturing \
-e COMPOSER_BASE_URL=http://rest:3000 \
-e NODE_RED_BASE_URL=ws://node-red:1880 \
-p 6002:6001 \
hyperledger/vehicle-lifecycle-manufacturing
09f641244ad91e410640450c55e8997fc0b60464c649180721465a63efbeb445

# Start the car-builder application.
docker run \
-d \
--network composer_default \
--name car-builder \
-e NODE_RED_BASE_URL=ws://node-red:1880 \
-p 8100:8100 \
hyperledger/vehicle-lifecycle-car-builder
4ef35265ee0f507ddfabcdc36ed6774fa8e0137808f7fd4b47c1a36ce74c4e10

但在此之后

# Open the playground in a web browser.  
URLS="http://localhost:8080 http://localhost:3000/explorer/ http://localhost:1880 http://localhost:6001 http://localhost:6002 http://localhost:8100"  
case "$(uname)" in  
"Darwin") open ${URLS}  
          ;;  
"Linux")  if [ -n "$BROWSER" ] ; then  
                    $BROWSER http://localhost:8080 http://localhost:3000/explorer/ http://localhost:1880 http://localhost:6001 http://localhost:6002 http://localhost:8100  
            elif      which x-www-browser > /dev/null ; then  
                  nohup x-www-browser ${URLS} < /dev/null > /dev/null 2>&1 &  
          elif    which xdg-open > /dev/null ; then  
                  for URL in ${URLS} ; do   
                          xdg-open ${URL}  
                    done  
          elif      which gnome-open > /dev/null ; then
                    gnome-open http://localhost:8080 http://localhost:3000/explorer/ http://localhost:1880 http://localhost:6001 http://localhost:6002 http://localhost:8100  
          #elif other types blah blah  
            else
                    echo "Could not detect web browser to use - please launch Composer Playground URL using your chosen browser ie: <browser executable name> http://localhost:8080 or set your BROWSER variable to the browser launcher in your PATH" 
            fi  
          ;;  
*)        echo "Playground not launched - this OS is currently not supported "
          ;;  
esac 
uname  
Could not detect web browser to use - please launch Composer Playground URL using your chosen browser ie: <browser executable name> http://localhost:8080 or set your BROWSER variable to the browser launcher in your PATH  

# Exit; this is required as the payload immediately follows.  
exit 0  

因此服务器没有GUI和浏览器。我认为scipt(install.sh)无法加载所需的所有有效负载。这可以以某种方式修复吗?

1 个答案:

答案 0 :(得分:0)

脚本的所有部分都是尝试打开W​​eb浏览器并打开各种页面。它不会对启动的docker容器产生任何影响。