cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Node.js agent wont connect to controller

sayak.banerjee
Explorer

Hi everyone,

 

I have been trying to get the node.js agent (v4.3.6) to connect to our company's test SaaS controller from within an alpine linux (v3.4) docker container. I keep getting proxy errors (please see attached file).

 

Any ideas around how can I debug this issue?

 

17 REPLIES 17

Kyle.Furlong
AppDynamics Team (Retired)

Hi Sayak,

 

Could you provide your Dockerfile so that I can try and reproduce this?

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

I've tried to strip off any company internal code and attached what i have.

 

PS. Thank you so much for your help so far.

Hi Kyle,

 

Any luck with the issue? were you able to replicate it?

Kyle.Furlong
AppDynamics Team (Retired)

Hi Sayak,

 

I do apologize but I've had other committments. I will let you know as soon as I have more info to share.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

No problem at all! Thank you for helping.

Kyle.Furlong
AppDynamics Team (Retired)

Hi Sayak,

 

It looks like all this needs is the bash shell installed in the container. If you amend your Dockerfile changing this line:

apk --allow-untrusted add glibc-bin-2.25-r0.apk glibc-2.25-r0.apk curl && \

to this:

apk --allow-untrusted add glibc-bin-2.25-r0.apk glibc-2.25-r0.apk curl bash && \

All should work.

 

Please let me know how it goes.

 

Regards,

Kyle

Thanks,
Kyle Furlong, Technical Lead (C++ and Dynamic Languages)




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Thank you Kyle! I am facing some other challenges with my base image (I was not using mhart/alpine-node before – and I am facing issues if I use it).
Let me temporarily switch back to mhart/alpine-node and try this out.

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Hi Kyle,

 

It still isn't able to connect to proxy. However, i am able to curl the saas controller from within the container.

Also, pl notice the crypto error in the stacktrace.

 

bash-4.3# node -v
v8.6.0
bash-4.3# cat /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/appd_node_agent_2017_10_18__19_01_56.log
[2017-10-18 19:01:56.175] [INFO] default - NodeJS x64 runtime properties for PID 21
[2017-10-18 19:01:56.176] [INFO] default - Process command line [/usr/bin/node,/usr/src/app/server.js]
[2017-10-18 19:01:56.176] [INFO] default - Full node executable path: /usr/bin/node
[2017-10-18 19:01:56.177] [INFO] default - version: http_parser = 2.7.0
[2017-10-18 19:01:56.177] [INFO] default - version: node = 8.6.0
[2017-10-18 19:01:56.177] [INFO] default - version: v8 = 6.0.287.53
[2017-10-18 19:01:56.177] [INFO] default - version: uv = 1.14.1
[2017-10-18 19:01:56.177] [INFO] default - version: zlib = 1.2.11
[2017-10-18 19:01:56.177] [INFO] default - version: ares = 1.10.1-DEV
[2017-10-18 19:01:56.177] [INFO] default - version: modules = 57
[2017-10-18 19:01:56.177] [INFO] default - version: nghttp2 = 1.25.0
[2017-10-18 19:01:56.177] [INFO] default - version: openssl = 1.0.2l
[2017-10-18 19:01:56.177] [INFO] default - version: icu = 59.1
[2017-10-18 19:01:56.177] [INFO] default - version: unicode = 9.0
[2017-10-18 19:01:56.177] [INFO] default - version: cldr = 31.0.1
[2017-10-18 19:01:56.177] [INFO] default - version: tz = 2017b
[2017-10-18 19:01:56.177] [INFO] default - feature: debug = false
[2017-10-18 19:01:56.177] [INFO] default - feature: uv = true
[2017-10-18 19:01:56.177] [INFO] default - feature: ipv6 = true
[2017-10-18 19:01:56.177] [INFO] default - feature: tls_npn = true
[2017-10-18 19:01:56.177] [INFO] default - feature: tls_alpn = true
[2017-10-18 19:01:56.177] [INFO] default - feature: tls_sni = true
[2017-10-18 19:01:56.177] [INFO] default - feature: tls_ocsp = true
[2017-10-18 19:01:56.177] [INFO] default - feature: tls = true
[2017-10-18 19:01:56.177] [INFO] default - release information: name = node
[2017-10-18 19:01:56.177] [INFO] default - release information: sourceUrl = https://nodejs.org/download/release/v8.6.0/node-v8.6.0.tar.gz
[2017-10-18 19:01:56.177] [INFO] default - release information: headersUrl = https://nodejs.org/download/release/v8.6.0/node-v8.6.0-headers.tar.gz
[2017-10-18 19:01:56.177] [INFO] default - configuration target defaults: cflags =
[2017-10-18 19:01:56.177] [INFO] default - configuration target defaults: default_configuration = Release
[2017-10-18 19:01:56.177] [INFO] default - configuration target defaults: defines =
[2017-10-18 19:01:56.177] [INFO] default - configuration target defaults: include_dirs =
[2017-10-18 19:01:56.177] [INFO] default - configuration target defaults: libraries =
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: asan = 0
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: coverage = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: debug_devtools = node
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: debug_http2 = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: debug_nghttp2 = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: force_dynamic_crt = 0
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: gas_version = 2.28
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: host_arch = x64
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_data_file = icudt59l.dat
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_data_in = ../../deps/icu-small/source/data/in/icudt59l.dat
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_endianness = l
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_gyp_path = tools/icu/icu-generic.gyp
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_locales = en,root
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_path = deps/icu-small
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_small = true
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: icu_ver_major = 59
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_byteorder = little
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_enable_d8 = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_enable_v8_vtunejit = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_install_npm = true
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_module_version = 57
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_no_browser_globals = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_prefix = /usr
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_release_urlbase =
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared_cares = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared_http_parser = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared_libuv = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared_openssl = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_shared_zlib = false
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_tag =
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_use_bundled_v8 = true
[2017-10-18 19:01:56.178] [INFO] default - configuration variables: node_use_dtrace = false
[2017-10-18 19:01:56.179] [INFO] default - configuration variables: node_use_etw = false
[2017-10-18 19:01:56.179] [INFO] default - configuration variables: node_use_lttng = false
[2017-10-18 19:01:56.179] [INFO] default - configuration variables: node_use_openssl = true
[2017-10-18 19:01:56.179] [INFO] default - configuration variables: node_use_perfctr = false
[2017-10-18 19:01:56.179] [INFO] default - configuration variables: node_use_v8_platform = true
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: node_without_node_options = false
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: openssl_fips =
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: openssl_no_asm = 0
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: shlib_suffix = so.57
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: target_arch = x64
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: uv_parent_path = /deps/uv/
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: uv_use_dtrace = false
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_enable_gdbjit = 0
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_enable_i18n_support = 1
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_enable_inspector = 1
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_no_strict_aliasing = 1
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_optimized_debug = 0
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_promise_internal_field_count = 1
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_random_seed = 0
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_trace_maps = 0
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: v8_use_snapshot = true
[2017-10-18 19:01:56.180] [INFO] default - configuration variables: want_separate_host_toolset = 0
[2017-10-18 19:01:56.181] [INFO] default - agent.proxyCtrlDir = "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c"
[2017-10-18 19:01:56.183] [DEBUG] default - Loaded native extention.
[2017-10-18 19:01:56.192] [INFO] default - launching proxy from master node 0
[2017-10-18 19:01:56.200] [DEBUG] default - updating analytics config
[2017-10-18 19:01:56.201] [INFO] default - ProcessScanner - maxSnapshotsPerPeriod: 2
[2017-10-18 19:01:56.201] [INFO] default - ProcessScanner - snapshotCountResetPeriodMS: 60000
[2017-10-18 19:01:56.201] [INFO] default - ProcessScanner - autoSnapshotDurationSeconds: 10
[2017-10-18 19:01:56.214] [DEBUG] default - found cluster module
[2017-10-18 19:01:56.215] [DEBUG] default - found fs module
[2017-10-18 19:01:56.216] [DEBUG] default - found http module
[2017-10-18 19:01:56.216] [DEBUG] default - found https module
[2017-10-18 19:01:56.217] [DEBUG] default - found net module
[2017-10-18 19:01:56.422] [DEBUG] default - found aws-sdk module
[2017-10-18 19:01:56.479] [ERROR] default - Uncaught exception:TypeError: The "digest" argument is required and must not be undefined
[2017-10-18 19:01:56.479] [ERROR] default - uncaughtException:
[2017-10-18 19:01:56.480] [ERROR] default - TypeError: The "digest" argument is required and must not be undefined
    at pbkdf2 (crypto.js:635:11)
    at Object.exports.pbkdf2Sync (crypto.js:628:10)
    at Object.<anonymous> (/usr/src/app/helper.js:10:18)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at Module.afterExecLogic (/usr/src/app/node_modules/appdynamics/lib/core/proxy.js:236:22)
[2017-10-18 19:01:56.485] [INFO] default - proxyArgs = [
 "-d",
 "/usr/src/app/node_modules/appdynamics-proxy/proxy",
 "-r",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r",
 "-j",
 "/usr/src/app/node_modules/appdynamics-jre/jre",
 "--",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l",
 "-Dregister=false"
]
[2017-10-18 19:01:56.485] [DEBUG] default - cmdLine = /usr/src/app/node_modules/appdynamics-proxy/proxy/runProxy -d /usr/src/app/node_modules/appdynamics-proxy/proxy -r /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r -j /usr/src/app/node_modules/appdynamics-jre/jre -- /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l -Dregister=false
[2017-10-18 19:01:56.488] [INFO] default - Proxy logging to: /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l
[2017-10-18 19:01:56.488] [INFO] default - Proxy spawned!
[2017-10-18 19:02:03.866] [DEBUG] default - starting control socket..
[2017-10-18 19:02:10.435] [DEBUG] default - { appName: 'MYAPP_DEV',
  tierName: 'myapp-ol',
  nodeName: 'exception-logger-0',
  controllerHost: 'mycompany-test.saas.appdynamics.com',
  controllerPort: 443,
  sslEnabled: true,
  accountName: 'mycompany-test',
  accountAccessKey: 'my_key',
  httpProxyHost: undefined,
  httpProxyPort: undefined,
  httpProxyUser: undefined,
  httpProxyPasswordFile: undefined,
  metadata:
   [ { name: 'Application name', value: undefined },
     { name: 'Node Version', value: 'v8.6.0' },
     { name: 'Exec Path', value: '/usr/bin/node' },
     { name: 'NODE_ENV', value: undefined },
     { name: 'Hostname', value: 'a9ae64d09f55' },
     { name: 'OS type', value: 'Linux' },
     { name: 'Platform', value: 'linux' },
     { name: 'Architecture', value: 'x64' },
     { name: 'CPU Model',
       value: 'Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz' },
     { name: 'CPU Speed', value: 2394 },
     { name: 'CPU Cores', value: 2 },
     { name: 'Node arguments',
       value: '/usr/bin/node /usr/src/app/server.js' },
     { name: 'Node PID', value: 21 },
     { name: 'Module versions: http_parser', value: '2.7.0' },
     { name: 'Module versions: node', value: '8.6.0' },
     { name: 'Module versions: v8', value: '6.0.287.53' },
     { name: 'Module versions: uv', value: '1.14.1' },
     { name: 'Module versions: zlib', value: '1.2.11' },
     { name: 'Module versions: ares', value: '1.10.1-DEV' },
     { name: 'Module versions: modules', value: '57' },
     { name: 'Module versions: nghttp2', value: '1.25.0' },
     { name: 'Module versions: openssl', value: '1.0.2l' },
     { name: 'Module versions: icu', value: '59.1' },
     { name: 'Module versions: unicode', value: '9.0' },
     { name: 'Module versions: cldr', value: '31.0.1' },
     { name: 'Module versions: tz', value: '2017b' },
     { name: 'AppDynamics version', value: '4.3.6.0' },
     { name: 'AppDynamics options: controllerHostName',
       value: 'mycompany-test.saas.appdynamics.com' },
     { name: 'AppDynamics options: controllerPort', value: 443 },
     { name: 'AppDynamics options: controllerSslEnabled',
       value: true },
     { name: 'AppDynamics options: accountName',
       value: 'mycompany-test' },
     { name: 'AppDynamics options: applicationName',
       value: 'MYAPP_DEV' },
     { name: 'AppDynamics options: tierName', value: 'myapp-ol' },
     { name: 'AppDynamics options: nodeName',
       value: 'exception-logger' },
     { name: 'AppDynamics options: debug', value: true },
     { name: 'AppDynamics options: excludeAgentFromCallGraph',
       value: true } ] }
[2017-10-18 19:02:16.243] [ERROR] default - no response on control socket
[2017-10-18 19:02:17.041] [WARN] default - attempting to re-launch proxy...
[2017-10-18 19:02:17.088] [INFO] default - launching proxy from master node 0
[2017-10-18 19:02:17.716] [INFO] default - proxyArgs = [
 "-d",
 "/usr/src/app/node_modules/appdynamics-proxy/proxy",
 "-r",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r",
 "-j",
 "/usr/src/app/node_modules/appdynamics-jre/jre",
 "--",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l",
 "-Dregister=false"
]
[2017-10-18 19:02:17.718] [DEBUG] default - cmdLine = /usr/src/app/node_modules/appdynamics-proxy/proxy/runProxy -d /usr/src/app/node_modules/appdynamics-proxy/proxy -r /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r -j /usr/src/app/node_modules/appdynamics-jre/jre -- /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l -Dregister=false
[2017-10-18 19:02:19.951] [INFO] default - Proxy logging to: /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l
[2017-10-18 19:02:20.161] [INFO] default - Proxy spawned!
[2017-10-18 19:02:28.011] [ERROR] default - no response on control socket
[2017-10-18 19:02:28.012] [WARN] default - attempting to re-launch proxy...
[2017-10-18 19:02:28.012] [INFO] default - launching proxy from master node 0
[2017-10-18 19:02:28.021] [INFO] default - proxyArgs = [
 "-d",
 "/usr/src/app/node_modules/appdynamics-proxy/proxy",
 "-r",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r",
 "-j",
 "/usr/src/app/node_modules/appdynamics-jre/jre",
 "--",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l",
 "-Dregister=false"
]
[2017-10-18 19:02:28.021] [DEBUG] default - cmdLine = /usr/src/app/node_modules/appdynamics-proxy/proxy/runProxy -d /usr/src/app/node_modules/appdynamics-proxy/proxy -r /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r -j /usr/src/app/node_modules/appdynamics-jre/jre -- /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l -Dregister=false
[2017-10-18 19:02:28.030] [INFO] default - Proxy logging to: /tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l
[2017-10-18 19:02:28.030] [INFO] default - Proxy spawned!
[2017-10-18 19:02:39.428] [ERROR] default - no response on control socket
[2017-10-18 19:02:40.552] [WARN] default - attempting to re-launch proxy...
[2017-10-18 19:02:40.865] [INFO] default - launching proxy from master node 0
[2017-10-18 19:02:43.420] [INFO] default - proxyArgs = [
 "-d",
 "/usr/src/app/node_modules/appdynamics-proxy/proxy",
 "-r",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/r",
 "-j",
 "/usr/src/app/node_modules/appdynamics-jre/jre",
 "--",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/c",
 "/tmp/appd/dc7181b4f7aacb644977e34c7a5920d3/proxy/l",
 "-Dregister=false"
]
bash-4.3#