Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR SCMB connection error #144

Closed
yyappyyy opened this issue Apr 16, 2018 · 8 comments
Closed

ERROR SCMB connection error #144

yyappyyy opened this issue Apr 16, 2018 · 8 comments

Comments

@yyappyyy
Copy link

Does anyone know how to fix this error?or How to import certificates on Windows?
scmb error

PS C:\Users\Administrator\git\hubot> .\bin\hubot
[Sun Apr 15 2018 23:36:40 GMT+0900 ] ERROR SCMB connection error { Error: connect ECONNREFUSED 172.16.100
.1:5671
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '172.16.100.1',
port: 5671 }
My env. is Windows 2016, npm 4.2.0.

@danielreed
Copy link
Member

On the host where you are running Hubot can you reach 172.16.100.1? Is this the address of your OneView appliance? When you start the bot it should create the OneView SCMB certificates (if necessary).

@yyappyyy
Copy link
Author

@danielreed Yes, the IP of OneView appliance is 172.16.100.1.. and, I checked the created caroot.pem, client.pem and key.pem files. But, "caroot.pem" is just "[object Object]".
Like this.
PS C:\Users\Administrator\git\hubot> cat .\oneview-hubot\pem_files\172.16.100.1\caroot.pem
[object Object]

Is that right ??

@llvieira
Copy link
Member

Hi @yagi09, can you run Hubot in TRACE level logging? To do that you should set the environment variable HUBOT_LOG_LEVEL to trace before running the Hubot, like export HUBOT_LOG_LEVEL="trace".

Maybe it can help us to detect your issue.

Here is an example: How to see Hubot log messages.

@yyappyyy
Copy link
Author

Thanks for your help! Here is the HUBOT_LOG_LEVEL="trace"

PS C:\Users\Administrator\git\hubot> $env:HUBOT_LOG_LEVEL='trace'
PS C:\Users\Administrator\git\hubot> .\bin\hubot.cmd
npm WARN hubot-help@0.2.2 requires a peer of coffee-script@^1.12.6 but none was installed.
[Wed Apr 18 2018 02:05:29 GMT+0900 (東京 (標準時))] DEBUG Loading adapter shell
myhubot> [Wed Apr 18 2018 02:05:30 GMT+0900 (東京 (標準時))] DEBUG Loading scripts from C:\Users\Administrator\git\hubot\scripts
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] INFO Applying configuration from oneview-configuration.json file.
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] INFO Initializing NLP
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] INFO Initializing OneView client
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\scripts\oneview.js
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] INFO C:\Users\Administrator\git\hubot\scripts\oneview.js is using deprecated documentation syntax
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] DEBUG Loading scripts from C:\Users\Administrator\git\hubot\src\scripts
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] DEBUG Loading hubot-scripts from C:\Users\Administrator\git\hubot\node_modules\hubot-scripts\src\scripts
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (https://github
.com/github/hubot-scripts/issues/1113) in favor of packages for each script.

Your hubot-scripts.json is empty, so you just need to remove it.
[Wed Apr 18 2018 02:05:34 GMT+0900 (東京 (標準時))] DEBUG Loading external-scripts from npm packages
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-diagnostics\src\diagnostics.c
offee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-help\src\help.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] ERROR hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. heroku config:set HUBOT_ HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web.url | cut -d= -f2)
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-heroku-keepalive\src\heroku-k
eepalive.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-google-images\src\google-imag
es.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-google-translate\src\google-t
ranslate.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-pugme\src\pugme.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-maps\src\maps.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] INFO hubot-redis-brain: Using default redis on localhost:6379
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-redis-brain\src\redis-brain.c
offee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-rules\src\rules.coffee
[Wed Apr 18 2018 02:05:35 GMT+0900 (東京 (標準時))] DEBUG Parsing help for C:\Users\Administrator\git\hubot\node_modules\hubot-shipit\src\shipit.coffee
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Connecting to SCMB on host 172.16.100.1
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Connected to SCMB. Waiting for messages.
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Successfully logged into host 172.16.100.1
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Logged into OneView.
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Applying configuration from json file.
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Configured with notification filters [ { severity: 'Critical' } ]
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server profile template: (Name: test-rhel7.3, URI: 172.16.100.1/rest/server-profile-templates
/61acbf2c-3912-4382-913f-0fe8f57f2448)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 4, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345134)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 5, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345132)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 2, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345133)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 6, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345136)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 1, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345137)
[Wed Apr 18 2018 02:05:36 GMT+0900 (東京 (標準時))] INFO Found server hardware: (Name: SGH802XAT7, bay 3, URI: 172.16.100.1/rest/server-hardware/39313738-36
34-4E43-3738-303130345135)
Hello, I'm myhubot! Your OneView instance is currently showing:
• 6 server(s).
• 0 server profile(s).
• 1 server profile template(s).
How can I assist you? Type '@myhubot help' to learn what I can do.
[Wed Apr 18 2018 02:05:37 GMT+0900 (東京 (標準時))] ERROR SCMB connection error { Error: connect ECONNREFUSED 172.16.100.1:5671
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '172.16.100.1',
port: 5671 }
[Wed Apr 18 2018 02:05:39 GMT+0900 (東京 (標準時))] ERROR SCMB connection error { Error: connect ECONNREFUSED 172.16.100.1:5671
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '172.16.100.1',
port: 5671 }
[Wed Apr 18 2018 02:05:40 GMT+0900 (東京 (標準時))] DEBUG in exitHandler, calling disconnect

@yyappyyy
Copy link
Author

here is also error log level=trace..
[root@ovpod hubot]# ./bin/hubot
npm WARN hubot-help@0.2.2 requires a peer of coffee-script@^1.12.6 but none was installed.
[Wed Apr 18 2018 02:25:01 GMT+0900 (JST)] DEBUG Loading adapter shell
myhubot> [Wed Apr 18 2018 02:25:02 GMT+0900 (JST)] DEBUG Loading scripts from /hpe/git/hubot/scripts
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] INFO Applying configuration from oneview-configuration.json file.
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] INFO Initializing NLP
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] INFO Initializing OneView client
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/scripts/oneview.js
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] INFO /hpe/git/hubot/scripts/oneview.js is using deprecated documentation syntax
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Loading scripts from /hpe/git/hubot/src/scripts
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Loading hubot-scripts from /hpe/git/hubot/node_modules/hubot-scripts/src/scripts
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (github/hubot-scripts#1113) in favor of packages for each script.

Your hubot-scripts.json is empty, so you just need to remove it.
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Loading external-scripts from npm packages
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-diagnostics/src/diagnostics.coffee
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-help/src/help.coffee
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] ERROR hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web.url | cut -d= -f2)
[Wed Apr 18 2018 02:25:03 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-heroku-keepalive/src/heroku-keepalive.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-google-images/src/google-images.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-google-translate/src/google-translate.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-pugme/src/pugme.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-maps/src/maps.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] INFO hubot-redis-brain: Using default redis on localhost:6379
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-redis-brain/src/redis-brain.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-rules/src/rules.coffee
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] ERROR { RequestError: Error: tunneling socket could not be established, cause=write EPROTO 140247144318784:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

at new RequestError (/hpe/git/hubot/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/hpe/git/hubot/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/hpe/git/hubot/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/hpe/git/hubot/node_modules/request/request.js:186:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/hpe/git/hubot/node_modules/request/request.js:824:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at ClientRequest.onError (/hpe/git/hubot/node_modules/tunnel-agent/index.js:178:21)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at TLSSocket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:191:7)
at onwriteError (_stream_writable.js:341:10)
at onwrite (_stream_writable.js:359:5)
at fireErrorCallbacks (net.js:481:13)
at TLSSocket.Socket._destroy (net.js:522:3)
at WriteWrap.afterWrite (net.js:816:10)

name: 'RequestError',
message: 'Error: tunneling socket could not be established, cause=write EPROTO 140247144318784:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:\n',
cause:
{ Error: tunneling socket could not be established, cause=write EPROTO 140247144318784:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

 at ClientRequest.onError (/hpe/git/hubot/node_modules/tunnel-agent/index.js:176:17)
 at Object.onceWrapper (events.js:293:19)
 at emitOne (events.js:96:13)
 at ClientRequest.emit (events.js:191:7)
 at TLSSocket.socketErrorListener (_http_client.js:358:9)
 at emitOne (events.js:96:13)
 at TLSSocket.emit (events.js:191:7)
 at onwriteError (_stream_writable.js:341:10)
 at onwrite (_stream_writable.js:359:5)
 at fireErrorCallbacks (net.js:481:13)
 at TLSSocket.Socket._destroy (net.js:522:3)
 at WriteWrap.afterWrite (net.js:816:10)
code: 'ECONNRESET' },

error:
{ Error: tunneling socket could not be established, cause=write EPROTO 140247144318784:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

 at ClientRequest.onError (/hpe/git/hubot/node_modules/tunnel-agent/index.js:176:17)
 at Object.onceWrapper (events.js:293:19)
 at emitOne (events.js:96:13)
 at ClientRequest.emit (events.js:191:7)
 at TLSSocket.socketErrorListener (_http_client.js:358:9)
 at emitOne (events.js:96:13)
 at TLSSocket.emit (events.js:191:7)
 at onwriteError (_stream_writable.js:341:10)
 at onwrite (_stream_writable.js:359:5)
 at fireErrorCallbacks (net.js:481:13)
 at TLSSocket.Socket._destroy (net.js:522:3)
 at WriteWrap.afterWrite (net.js:816:10)
code: 'ECONNRESET' },

options:
{ method: 'POST',
uri: 'https://172.16.100.1/rest/login-sessions',
json: true,
headers:
{ 'X-API-Version': 600,
Accept: 'application/json',
'Content-Type': 'application/json',
auth: '' },
body:
{ authLoginDomain: undefined,
password: 'xxxxxxxxxx',
userName: 'administrator',
loginMsgAck: 'true' },
resolveWithFullResponse: true,
agent:
Agent {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: {},
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
maxCachedSessions: 100,
_sessionCache: [Object] },
rejectUnauthorized: false,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false },
response: undefined }
[Wed Apr 18 2018 02:25:04 GMT+0900 (JST)] DEBUG Parsing help for /hpe/git/hubot/node_modules/hubot-shipit/src/shipit.coffee

@llvieira
Copy link
Member

@yagi09, regarding the first error log you sent, does Hubot still works ok? I think when I started using it I got this error as well. It's really annoying when you start it from shell because it's almost impossible to write bot commands due the error log. Using Slack or Flowdock that error still appears but it does not disturbs you there.

To ran it on Slack or Flowdock: bin/hubot -a <slack or flowdock>

I'm still not talking about the issue solution, but if the Hubot still works with it, maybe this bug can be more easy to solve.

About the second one, are you behind a proxy?

We will definitely investigate this problems as soon as possible. 😀

@yyappyyy
Copy link
Author

@llvieira Thanks for Kindly reply. yes, I think it works OK , here is logs with error...
myhubot> @myhubot Server hardware help[Wed Apr 18 2018 17:37:02 GMT+0900 (JST)] ERROR SCMB connection error { Error: connect ECONNREFUSED 172.16.100.1:5671
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)

code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '172.16.100.1',
port: 5671 }

myhubot> Server hardware commands:
~ Power on/off a specific (server) hardware (e.g. turn on Encl1, bay 1).
~ List all (server) hardware (e.g. list all hardware).
~ List server hardware utilization (e.g. list Encl1, bay 1 utilization).
~ List server hardware utilization (e.g. list Encl1, bay 1 utilization).
~ List server hardware by name (e.g. list Encl1, bay 1).
~ List all critical/warning/ok/disabled (server) hardware (e.g. list all critical hardware).
~ List all powered on/off (server) hardware.

I' will try to run it on Slack now.

About the second one, are you behind a proxy?
➡Yes, it is....

Is there any idea??

@llvieira
Copy link
Member

We already solved it, right? I'll close this issue, @yagi09. Have a good seminar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants