从Finder中跑出secgw.command并得到许多NPM错误
我安装了log4js(npm install log4js -g),但仍然出错。
sudo
没有帮助。
将 ibm 目录复制到其他地方并使用MacBook-Pro:ibm jps$ cd Desk*
MacBook-Pro:ibm jps$ cd ibm
MacBook-Pro:ibm jps$ sudo ./secgw.command
MacBook-Pro-3:client jps$ node lib/secgwclient.js <gateway> -t <token>
[2017-10-14 13:33:37.290] [INFO] (Client ID 22481) No password provided. The UI will not require a password for access
[2017-10-14 13:33:37.313] [WARN] (Client ID 22481) UI Server started. The UI is not currently password protected
[2017-10-14 13:33:37.313] [INFO] (Client ID 22481) Visit localhost:9003/dashboard to view the UI.
cli> [2017-10-14 13:33:37.750] [INFO] (Client ID 22482) Setting log level to TRACE
[2017-10-14 13:33:37.755] [DEBUG] (Client ID 22482) The Secure Gateway client will fetch its configuration from https://sgmanager.eu-de/.bluemix.net/sgconfig/QqiJp83bfu4_prod_eu-de/
[2017-10-14 13:33:37.862] [INFO] (Client ID 22483) Setting log level to INFO
[2017-10-14 13:33:37.870] [ERROR] (Client ID 22482) The response is code: ENOTFOUND, message: getaddrinfo
cli> [2017-10-14 13:33:37.872] [INFO] (Client ID 22482) Process exiting without errors due to user or server request
[2017-10-14 13:33:38.422] [ERROR] (Client ID 22483) The Secure Gateway tunnel connection had an error
cli> [2017-10-14 13:33:38.425] [INFO] (Client ID 22483) Process exiting without errors due to user or server request
cli>
增加loglevel的输出:
Peters-MacBook-2784:~ jps$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.12.140...
Connected to eu-de.bluemix.net.
Escape character is '^]'.
Telnet到德国:已连接,但未提示用户
[2017-10-14 22:07:43.205] [INFO] (Client ID 27049) No password provided. The UI will not require a password for access
[2017-10-14 22:07:43.216] [ERROR] (Client ID 27049) Unable to establish UI on port 9003. Is this port already in use?
cli> [2017-10-14 22:07:43.497] [INFO] (Client ID 27050) Setting log level to INFO
[2017-10-14 22:07:43.537] [ERROR] (Client ID 27050) The response is code: ENOTFOUND, message: getaddrinfo
cli> [2017-10-14 22:07:43.539] [INFO] (Client ID 27050) Process exiting without errors due to user or server request
再次尝试了secgw.command:
#logonav {
height: 40px;
width: auto;
}
/* change the link color */
.navbar-custom .navbar-nav .nav-link {
color: #2E8B57;
}
/* change the color of active or hovered links */
.navbar-custom .nav-item .nav-link .active,
.navbar-custom .nav-item:hover .nav-link {
color: orangered;
}
/* change the brand and text color */
.navbar-custom .navbar-brand,
.navbar-custom .navbar-text {
color: #2E8B57;
}
.custom-toggler.navbar-toggler {
border-color: rgb(46,139,87);
}
.custom-toggler .navbar-toggler-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(46, 139, 87, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
crossorigin="anonymous">
<link rel="stylesheet" href="ergo.css">
<title>Bettina Klinkicht Ergotherapeutische Praxis Bonn</title>
<link rel="shortcut icon" type="image/x-icon" class="img-circle" href="logopur.png">
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107069424-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments) };
gtag('js', new Date());
gtag('config', 'UA-107069424-1');
</script>
</head>
<body>
<nav class="navbar navbar-inverse fixed-top transparent navbar-toggleable-sm navbar-custom">
<div class="navbar-inner">
<!-- Brand and toggle grouped for better mobile display -->
<button class="navbar-toggler navbar-toggler-right custom-toggler" type="button" data-toggle="collapse" data-target="#navmobile"
aria-controls="navmobile" aria-expanded="false" aria-label="Toggle Navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a href="home.html" class="navbar-brand"><img src="logopur_neu.png" alt="Logo" id="logonav"></a>
</div>
<!-- Collect nav-links for toggling-->
<div class="collapse navbar-collapse" id="navmobile">
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link active" href="#">Home</a>
<a class="nav-item nav-link" href="Therapeutin.html">Über mich</a>
<div class="dropdown">
<a class="nav-item nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="servicesDropdown" aria-haspopup="true" aria-expanded="false">Angebot</a>
<div class="dropdown-menu" aria-labelledby="servicesDropdown">
<a class="dropdown-item" href="Geriatrie.html">Geriatrie</a>
<a class="dropdown-item" href="Neurologie.html">Neurologie</a>
<a class="dropdown-item" href="Spiegeltherapie.html">Spiegeltherapie</a>
<a class="dropdown-item" href="Schwindeltherapie.html">Schwindeltherapie</a>
<a class="dropdown-item" href="Biographiearbeit.html">Biographiearbeit</a>
<a class="dropdown-item" href="Brain_Gym.html">Brain Gym</a>
<a class="dropdown-item" href="Sensibilitaetstraining.html">Sensibilitätstraining</a>
<a class="dropdown-item" href="Gleichgewichtstraining.html">Gleichgewichtstraining</a>
</div>
</div>
<a class="nav-item nav-link" href="Kontakt.html">Kontakt</a>
</div>
</div>
</div>
</div>
</nav>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
crossorigin="anonymous"></script>
<script src="ergo.js"></script>
</body>
</html>
答案 0 :(得分:1)
tar.unpack untar error
可能意味着这些软件包没有正确下载,因此无法解压缩(see this npm issue)。尝试运行npm cache clean
(可能需要sudo),然后再次运行secgw.command脚本。
确保您可以远程登录区域服务器(基于您的Bluemix区域)sgmanager.<region>.bluemix.net
其中一个是:
ng
eu-gb
eu-de
au-syd
例如,如果您使用的是德国地区,则成功的telnet连接应如下所示:
$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.24.140...
Connected to eu-de.bluemix.net.
对于您尝试连接的网关,它将在网关信息面板的Secure Gateway仪表板上指定一个节点。确保您也可以在端口9000上telnet到该服务器名称。例如,具有节点cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com
的网关将具有成功的telnet:
$ telnet cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com 9000
Trying 159.122.71.68...
Connected to cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com.
托管Secure Gateway Client的计算机必须能够访问您的网关所在的区域服务器和服务器才能成功连接。
尝试连接Secure Gateway客户端时,ENOTFOUND
意味着网络问题导致运行客户端的主机无法解析sgmanager.<region>.bluemix.net
或特定网关节点的地址,并且导致上述一个或两个telnet命令失败。