Unable to connect to Java application running inside docker container locally

Questions about YourKit Java Profiler
Post Reply
schaudhary
Posts: 2
Joined: Mon Mar 18, 2024 3:10 pm

Unable to connect to Java application running inside docker container locally

Post by schaudhary »

I know this will be something silly because its so straight forward. I was trying to get profiler working with the container using instructions https://www.yourkit.com/docs/java-profi ... direct.jsp. But The YourKit UI is not finding the application.

The full log of container agent is

Code: Select all


23.9-109 0.002: Log file: /home/liquidnt/.yjp/log/app-1.log
23.9-109 0.002: Command line:
  java
  -agentpath:/usr/local/YourKit-JavaProfiler-2023.9/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all
  -XX:+UseContainerSupport
  -Duser.timezone=GMT
  -Dspring.profiles.active=spring-auth
  -jar
  /app/app.jar
23.9-109 0.002: Executable: /home/liquidnt/jdk/bin/java
23.9-109 0.002: uname:
  sysname: Linux
  release: 5.10.16.3-microsoft-standard-WSL2
  version: #1 SMP Fri Apr 2 22:23:49 UTC 2021
  machine: x86_64
23.9-109 0.002: Linux; linux-x86-64; 64-bit process
23.9-109 0.002: hid: 3602619757ZX88999756W2WY6412YWYW5V 64-bit machine
23.9-109 0.002: RAM: 7952 MB
23.9-109 0.002: Today is 20240318
23.9-109 0.002: full_build_stamp: 2023.9.109 202402151224
23.9-109 0.002: Agent library path: /usr/local/YourKit-JavaProfiler-2023.9/bin/linux-x86-64/libyjpagent.so
23.9-109 0.002: getTimeNsInfo: "monotonic"
23.9-109 0.002: Agent_OnLoad: orig_options=port=10001,listen=all
  full_options=port=10001,listen=all
23.9-109 0.002: y_setenv: _YJP_AGENT_LOADED=1
23.9-109 0.002: jvmtiVersion: 30110000
23.9-109 0.002: phase: 1
23.9-109 0.002: vendor: Azul Systems, Inc.
23.9-109 0.002: version: 17.0.4.1+1-LTS
23.9-109 0.002: specVersion: 17
23.9-109 0.002: info: mixed mode, sharing
23.9-109 0.002: heap_sampling: capability is available
23.9-109 0.002: virtual_threads: capability is not available (isAttached=0, version=17.0.4.1+1-LTS)
23.9-109 0.002: asynchronous sampling: available
23.9-109 0.012: inside Kubernetes: 0
23.9-109 0.012: session GUID: RJm7OmcsKSdAARJ85MyH
23.9-109 0.013: line_method: 1
23.9-109 0.013: heap_sampling: will be used instead of BCI
23.9-109 0.018: Jar file created: /tmp/yjp202402151224.jar
23.9-109 0.018: JVMTI 30110000; 17.0.4.1+1-LTS; Azul Systems, Inc.; mixed mode, sharing; Java version: 17
23.9-109 0.033: warning: possible performance issue: probe class pattern is "*", none of @InstanceOf, @This, @RetransformIfInstanceOf specified: com.yourkit.probes.builtin.JUnitTests$Run_Probe
23.9-109 0.033: warning: possible performance issue: probe class pattern is "*", none of @InstanceOf, @This, @RetransformIfInstanceOf specified: com.yourkit.probes.builtin.JUnitTests$SetUp_Probe
23.9-109 0.033: warning: possible performance issue: probe class pattern is "*", none of @InstanceOf, @This, @RetransformIfInstanceOf specified: com.yourkit.probes.builtin.JUnitTests$TearDown_Probe
23.9-109 0.047: Successfully registered probes: 28
  Registered: .AgentLoadingSupport
  Registered: .AsyncChannels
  Registered: .AwtEvents
  Registered: .Cassandra
  Registered: .CassandraLW
  Registered: .Databases
  Registered: .DatabasesLW
  Registered: .DirectoryStreams
  Registered: .Files
  Registered: .FilesLW
  Registered: .HBase
  Registered: .HBaseLW
  Registered: .JNDI
  Registered: .JPA_DataNucleus
  Registered: .JPA_EclipseLink
  Registered: .JPA_Hibernate
  Registered: .JPA_OpenJPA
  Registered: .JUnitTests
  Registered: .MongoDB
  Registered: .MongoDBLW
  Registered: .Processes
  Registered: .Servlets
  Registered: .ServletsLW
  Registered: .Sockets
  Registered: .SocketsLW
  Registered: .Sync
  Registered: .TestNg
  Registered: .Threads
23.9-109 0.076: async_sampling: native libs: 14
23.9-109 0.139: agentStart: 1
23.9-109 0.139: agentStart: 2
23.9-109 0.140: agentStart: OK
23.9-109 0.141: vmInit: 1
23.9-109 0.150: vmInit: async-sampling initialization
23.9-109 0.150: vmInit: 2
23.9-109 0.150: agentInit: 1
23.9-109 0.150: agentInit: isAttached=0
23.9-109 0.187: tracing=off: large method: 5109 jdk.internal.org.objectweb.asm.ClassReader readCode(jdk.internal.org.objectweb.asm.MethodVisitor, jdk.internal.org.objectweb.asm.Context, int)
23.9-109 0.206: tracing=off: large method: 2305 jdk.internal.org.objectweb.asm.Frame execute(int, int, jdk.internal.org.objectweb.asm.Symbol, jdk.internal.org.objectweb.asm.SymbolTable)
23.9-109 0.213: AddModuleExports returned 0:JVMTI_ERROR_NONE
23.9-109 0.215: agentInit: Core loaded
23.9-109 0.232: setTriggers:

23.9-109 0.232: setTriggers: to unregister: 0
23.9-109 0.232: setTriggers: method listeners to register: 0
23.9-109 0.232: setTriggers: OK
23.9-109 0.232: ourUnsafe: true
23.9-109 0.245: agentInit: Core.init() called
23.9-109 0.245: Retransform early class: java/io/FileInputStream
23.9-109 0.245: [ssl-config] generating SSL certificate...
23.9-109 0.245: [ssl-config] OpenSSL 3.0.13 30 Jan 2024
23.9-109 0.247: Retransform early class: java/io/FileOutputStream
23.9-109 0.249: Retransform early class: java/lang/Thread
23.9-109 0.257: agentInit: OK
23.9-109 0.257: vmInit: 3
23.9-109 0.257: onStartProfiling: entering...
23.9-109 0.257: onStartProfiling: done
23.9-109 0.257: vmInit: OK
23.9-109 0.423: SP: pin java.lang.ClassNotFoundException
23.9-109 0.514: tracing=off: large method: 2719 java.util.regex.CharPredicates forProperty(java.lang.String, boolean)
23.9-109 0.591: [m: 5207 90] total classes: processed=1000 instrumented=884 199ms
23.9-109 0.627: [ssl-config] generating SSL certificate done: ctx 1, key 378, serial 0, cert 1, sign 2, use 0
23.9-109 0.627: [server] listening; port=10001; ip=0.0.0.0; url=https://127.0.0.1:10001
23.9-109 0.627: [shmem] permissions: set_unrestricted
23.9-109 0.627: [shmem] creating shared_memory_object
23.9-109 0.627: [shmem] get_size
23.9-109 0.627: [shmem] get size result=1, size=0
23.9-109 0.627: [shmem] truncate
23.9-109 0.627: [shmem] creating mapped_region
23.9-109 0.627: [shmem] mapped address=00007F9092A48000, mapped size=106500, area size=106500
23.9-109 0.631: *** HINT ***: To get profiling results, connect to the application from the profiler UI
23.9-109 0.696: GC counter installed to G1 Young Generation
23.9-109 0.696: GC counter installed to G1 Old Generation
23.9-109 0.767: SP: pin java.io.FileNotFoundException
23.9-109 0.773: SP: pin java.lang.NoSuchFieldException
23.9-109 1.079: SP: pin java.lang.IllegalArgumentException
23.9-109 1.083: SP: pin java.security.AccessControlException
23.9-109 1.892: [m: 6515 165] total classes: processed=2000 instrumented=1748 405ms
23.9-109 2.171: SP: pin java.lang.InterruptedException
23.9-109 2.188: SP: pin java.lang.NoSuchMethodException
23.9-109 2.941: SP: pin java.net.MalformedURLException
23.9-109 3.572: SP: pin jakarta.validation.ValidationException
23.9-109 4.163: tracing=off: large method: 3184 org.hibernate.validator.internal.metadata.core.ConstraintHelper <init>(java.util.Set)
23.9-109 4.202: [m: 6654 185] total classes: processed=3000 instrumented=2610 658ms
23.9-109 6.435: tracing=off: large method: 5113 org.springframework.asm.ClassReader readCode(org.springframework.asm.MethodVisitor, org.springframework.asm.Context, int)
23.9-109 6.473: tracing=off: large method: 8176 sun.text.resources.cldr.FormatData getContents()
23.9-109 6.474: tracing=off: large method: 3264 sun.text.resources.cldr.FormatData_en getContents()
23.9-109 6.487: tracing=off: large method: 3433 java.lang.CharacterData00 toLowerCase(int)
23.9-109 6.488: tracing=off: large method: 3456 java.lang.CharacterData00 toUpperCase(int)
23.9-109 6.488: tracing=off: large method: 3056 java.lang.CharacterData00 toUpperCaseEx(int)
23.9-109 6.730: [m: 6718 216] total classes: processed=4000 instrumented=3425 968ms
23.9-109 7.692: SP: pin java.lang.NoClassDefFoundError
23.9-109 8.342: SP: pin java.lang.IllegalStateException
23.9-109 10.657: [m: 6790 287] total classes: processed=5000 instrumented=4271 1281ms
23.9-109 10.758: tracing=off: large method: 2292 org.springframework.asm.Frame execute(int, int, org.springframework.asm.Symbol, org.springframework.asm.SymbolTable)
23.9-109 10.786: SP: pin org.springframework.cglib.core.ClassNameReader$EarlyExitException
23.9-109 10.891: tracing=off: large method: 2049 sun.security.util.KnownOIDs $values()
23.9-109 11.128: SP: pin org.springframework.beans.factory.UnsatisfiedDependencyException
23.9-109 11.165: SP: pin java.lang.TypeNotPresentException
23.9-109 11.581: SP: pin java.lang..
23.9-109 12.565: tracing=off: large method: 2459 com.nimbusds.oauth2.sdk.as.AuthorizationServerMetadata parse(net.minidev.json.JSONObject)
23.9-109 12.581: tracing=off: large method: 2734 com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata parse(net.minidev.json.JSONObject)
23.9-109 12.946: tracing=off: large method: 2129 sun.net.www.protocol.http.HttpURLConnection getInputStream0()
23.9-109 13.038: [m: 6801 308] total classes: processed=6000 instrumented=5169 1511ms
23.9-109 13.223: SP: pin java.lang.NumberFormatException
23.9-109 16.683: [m: 6809 352] total classes: processed=7000 instrumented=6037 1752ms
23.9-109 17.121: SP: pin org.springframework.beans.factory.NoSuchBeanDefinitionException
23.9-109 18.621: SP: pin java.lang.UnsatisfiedLinkError
23.9-109 18.628: SP: pin java.lang.reflect.InvocationTargetException
23.9-109 19.152: SP: pin java.lang.UnsupportedOperationException
23.9-109 1026.389: [http] 172.17.0.1 POST "/yjp/api/v1/getStatus" 200 685  {"Host":"localhost:10001","User-Agent":"curl/7.68.0","Accept":"*/*"}

As you can from last line I am able to curl and get status on host machine using

Code: Select all

curl -k -X POST https://localhost:10001/yjp/api/v1/getStatus
{
    "allocationRecording" : false,
    "allocationRecordingSettings" : {
        "mode" : "",
        "recordEach" : 0,
        "sizeLimit" : 0,
        "heapSamplingInterval" : 0
    },
    "asyncSamplingCpu" : false,
    "asyncSamplingPeriodic" : false,
    "callCounting" : false,
    "cpuProfiling" : false,
    "exceptionProfiling" : true,
    "monitorProfiling" : false,
    "pid" : 1,
    "sampling" : false,
    "appName" : "app",
    "stackTelemetry" : true,
    "tracing" : false,
    "agentVersion" : "YourKit Java Profiler 2023.9-b109"
}
On UI side after the remote setup, test connection is successful. And then it just shows 0 applications under that. Here is UI log. It doesn't seem to move at all during all this. As if nothing is happening as a result of my actions.

Code: Select all

23.9-110 0.002: Log file: C:\Users\schaudhary\.yjp\log\profiler-ui-1048.log
23.9-110 0.002: Command line:
  D:\YourKit\jre64\bin\javaw.exe
  -Djava.awt.smartInvalidate=true
  -Djna.nosys=true
  --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
  -XX:+HeapDumpOnOutOfMemoryError
  -Xmx8G
  -jar
  ..\lib\yourkit.jar
23.9-110 0.002: Executable: D:\YourKit\jre64\bin\javaw.exe
23.9-110 0.002: Windows 10; version 10.0.19041; windows-x86-64; 64-bit process
23.9-110 0.002: hid: 16022545YU3528X74X77U739YY9060Z7U4 64-bit machine
23.9-110 0.002: RAM: 32440 MB
23.9-110 0.002: Today is 20240318
23.9-110 0.002: full_build_stamp: 2023.9.110 202403131827
23.9-110 0.002: Agent library path: D:\YourKit\bin\windows-x86-64\yjpagent.dll
23.9-110 0.002: getTimeNsInfo: "PerformanceFrequency=10000000"
23.9-110 0.002: 
---------------------------------------------------------------------
Product: YourKit Java Profiler 2023.9-b110 - built on 202403131827
JDK: 17.0.10
VM: OpenJDK 64-Bit Server VM
VM version: 17.0.10+1-b1087.21
Vendor: JetBrains s.r.o.
OS: Windows 10
OS version: 10.0
OS arch: amd64
Date and time: 2024-03-18 11:31:38
System properties:
  file.encoding=Cp1252
  file.separator=\
  java.awt.smartInvalidate=true
  java.class.path=..\lib\yourkit.jar
  java.class.version=61.0
  java.home=D:\YourKit\jre64
  java.io.tmpdir=C:\Users\SCHAUD~1\AppData\Local\Temp\
  java.library.path=D:\YourKit\jre64\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\CCM\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Citrix\Workspace Environment Management Agent;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\Citrix\HDX\bin\;C:\Program Files\Citrix\HDX\bin\;%NVM_HOME%;%NVM_SYMLINK%;C:\Users\schaudhary\scoop\apps\gpg4win\current\GnuPG\bin;C:\Users\schaudhary\scoop\apps\gpg4win\current\Gpg4win\bin;C:\Users\schaudhary\scoop\apps\vscode\current\bin;C:\Users\schaudhary\scoop\apps\python27\current\Scripts;C:\Users\schaudhary\scoop\apps\python27\current;C:\Users\schaudhary\scoop\apps\python310\current\Scripts;C:\Users\schaudhary\scoop\apps\python310\current;C:\Users\schaudhary\scoop\apps\maven\current\bin;C:\Users\schaudhary\scoop\apps\zulu17-jdk\current\bin;C:\Users\schaudhary\scoop\shims;C:\Users\schaudhary\.devops\bin;D:\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\schaudhary\AppData\Local\Microsoft\WindowsApps;D:\protobuf\protoc-2.4.1-win32;D:\oracle\client_21_11;D:\nvm;D:\nvm\nodejs;D:\perl\strawberry-perl-5.32.1.1-64bit\c\bin;D:\perl\strawberry-perl-5.32.1.1-64bit\perl\site\bin;D:\perl\strawberry-perl-5.32.1.1-64bit\perl\bin;C:\Users\schaudhary\AppData\Local\Programs\Git\cmd;.
  java.runtime.name=OpenJDK Runtime Environment
  java.runtime.version=17.0.10+1-b1087.21
  java.specification.name=Java Platform API Specification
  java.specification.vendor=Oracle Corporation
  java.specification.version=17
  java.vendor.url.bug=https://bugreport.java.com/bugreport/
  java.vendor.url=https://openjdk.java.net/
  java.vendor.version=JBR-17.0.10+1-1087.21-nomod
  java.vendor=JetBrains s.r.o.
  java.version.date=2024-01-16
  java.version=17.0.10
  java.vm.compressedOopsMode=Zero based
  java.vm.info=mixed mode
  java.vm.name=OpenJDK 64-Bit Server VM
  java.vm.specification.name=Java Virtual Machine Specification
  java.vm.specification.vendor=Oracle Corporation
  java.vm.specification.version=17
  java.vm.vendor=JetBrains s.r.o.
  java.vm.version=17.0.10+1-b1087.21
  jbr.virtualization.information=Hyper-V role
  jdk.debug=release
  jna.nosys=true
  line.separator=


  native.encoding=Cp1252
  os.arch=amd64
  os.name=Windows 10
  os.version=10.0
  path.separator=;
  sun.arch.data.model=64
  sun.awt.enableExtraMouseButtons=true
  sun.boot.library.path=D:\YourKit\jre64\bin
  sun.cpu.endian=little
  sun.cpu.isalist=amd64
  sun.io.unicode.encoding=UnicodeLittle
  sun.java.command=..\lib\yourkit.jar
  sun.java.launcher=SUN_STANDARD
  sun.jnu.encoding=Cp1252
  sun.management.compiler=HotSpot 64-Bit Tiered Compilers
  sun.os.patch.level=
  user.country=US
  user.dir=D:\YourKit\bin
  user.home=C:\Users\schaudhary
  user.language=en
  user.name=schaudhary
  user.script=
  user.timezone=America/New_York
  user.variant=
Environment:
  <<retracted>>
---------------------------------------------------------------------


23.9-110 0.002: com.yourkit.Main1: Starting...
23.9-110 0.003: com.yourkit.Main1: Number of args=0
23.9-110 0.005: com.yourkit.Main1: http.agent=YourKit-Java-Profiler-UI/2023.9.110 (Windows 10 amd64 10.0)
23.9-110 0.066: com.yourkit.aj.p: no update scheduled - nothing to do
23.9-110 0.250: com.yourkit.Main1: oomeDumperStatus: ON
23.9-110 0.251: com.yourkit.ai.ad.e: awt.useSystemAAFontSettings=lcd
23.9-110 0.251: com.yourkit.ai.ad.e: sun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
23.9-110 0.312: com.yourkit.b.bc: Background saving has been started
23.9-110 2.995: com.yourkit.ai.al.a: JVM UI scale enabled=true
23.9-110 2.995: com.yourkit.ai.al.a: JVM UI scale=1
23.9-110 2.997: com.yourkit.ai.al.a: System UI scale=1.0
23.9-110 2.997: com.yourkit.ai.al.a: Font scale=1.0
23.9-110 3.012: com.yourkit.ai.al.a: Primary font=java.awt.Font[family=Segoe UI,name=Segoe UI,style=plain,size=12]
23.9-110 3.012: com.yourkit.ai.al.a: Menu font=java.awt.Font[family=Segoe UI,name=Segoe UI,style=plain,size=12]
23.9-110 3.012: com.yourkit.ai.al.a: Found theme=BRIGHT
23.9-110 3.012: com.yourkit.ai.al.a: Scaled primary font=java.awt.Font[family=Segoe UI,name=Segoe UI,style=plain,size=12]
23.9-110 3.012: com.yourkit.ai.al.a: Scaled menu font=java.awt.Font[family=Segoe UI,name=Segoe UI,style=plain,size=12]
23.9-110 3.090: com.yourkit.ai.al.a: Found theme=BRIGHT
23.9-110 3.192: com.yourkit.r.x: Cannot read license config; file=C:\Users\schaudhary\.yjp\am-eval-yjp_2023_9.txt
23.9-110 3.200: com.yourkit.r.x: Read license config; file=C:\Users\schaudhary\.yjp\am.txt
23.9-110 3.201: com.yourkit.r.ab: Alive notifier has been started
23.9-110 3.410: com.yourkit.ae.n: Statistics loop has been started
23.9-110 3.411: com.yourkit.ae.u: Display resolution: 1920x1080
23.9-110 3.411: com.yourkit.ae.u: Display resolution: 1920x1080
23.9-110 3.419: com.yourkit.aj.r: UPDATES_URL: https://www.yourkit.com/updates.json
23.9-110 3.693: com.yourkit.ai.al.a: Found theme=BRIGHT
23.9-110 3.739: [shmem] permissions: set_unrestricted
23.9-110 3.739: [shmem] creating shared_memory_object
23.9-110 3.748: [shmem] get_size
23.9-110 3.748: [shmem] get size result=1, size=106500
23.9-110 3.748: [shmem] creating mapped_region
23.9-110 3.749: [shmem] mapped address=000001EA65FE0000, mapped size=106500, area size=106500
23.9-110 4.113: com.yourkit.c.c: Open socket; port=62552; address=localhost/127.0.0.1
23.9-110 4.115: com.yourkit.c.c: Marker created C:\Users\schaudhary\.yjp\.yjp_ui_20161012_62552
23.9-110 4.116: com.yourkit.c.c: Listener thread started
23.9-110 4.118: com.yourkit.c.b: Found marker; file=C:\Users\schaudhary\.yjp\.yjp_ui_20161012_62552
23.9-110 4.243: com.yourkit.w.m: Add strategy 'java'; com.github.markusbernhardt.proxy.search.java.JavaProxySearchStrategy@207dc974
23.9-110 4.243: com.yourkit.w.m: Add strategy 'env'; com.github.markusbernhardt.proxy.search.env.EnvProxySearchStrategy@5bca6c9
23.9-110 4.244: com.yourkit.w.m: Add strategy 'desktop'; com.github.markusbernhardt.proxy.search.desktop.DesktopProxySearchStrategy@76892b76
23.9-110 4.246: com.yourkit.w.m: Add strategy 'IE'; com.github.markusbernhardt.proxy.search.browser.ie.IEProxySearchStrategy@11455d3f
23.9-110 4.247: com.yourkit.w.m: Add strategy 'firefox'; com.github.markusbernhardt.proxy.search.browser.firefox.FirefoxProxySearchStrategy@32b04046
23.9-110 4.247: com.yourkit.w.m: Probing strategy 'java'; com.github.markusbernhardt.proxy.search.java.JavaProxySearchStrategy@207dc974
23.9-110 4.248: com.yourkit.w.m: No proxy found for 'java'
23.9-110 4.248: com.yourkit.w.m: Probing strategy 'env'; com.github.markusbernhardt.proxy.search.env.EnvProxySearchStrategy@5bca6c9
23.9-110 4.249: com.yourkit.w.m: No proxy found for 'env'
23.9-110 4.249: com.yourkit.w.m: Probing strategy 'desktop'; com.github.markusbernhardt.proxy.search.desktop.DesktopProxySearchStrategy@76892b76
23.9-110 4.334: com.yourkit.w.m: No proxy found for 'desktop'
23.9-110 4.334: com.yourkit.w.m: Probing strategy 'IE'; com.github.markusbernhardt.proxy.search.browser.ie.IEProxySearchStrategy@11455d3f
23.9-110 4.338: com.yourkit.w.m: No proxy found for 'IE'
23.9-110 4.338: com.yourkit.w.m: Probing strategy 'firefox'; com.github.markusbernhardt.proxy.search.browser.firefox.FirefoxProxySearchStrategy@32b04046
23.9-110 4.349: com.yourkit.w.m: No proxy found for 'firefox'
23.9-110 5.150: com.yourkit.r.ai: message=shls=null;  code=200; text=payload=AM...\

result=ok

I tried with localhost and port 10001, 127.0.0.1 and even machine IP but no luck

Running same application and profiling it within intellij seems to be fine
schaudhary
Posts: 2
Joined: Mon Mar 18, 2024 3:10 pm

Re: Unable to connect to Java application running inside docker container locally

Post by schaudhary »

Changed port from 10001 to 10002 for the profiler. And it started to work :cry:
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Re: Unable to connect to Java application running inside docker container locally

Post by Vladimir Kondratyev »

Do you run command "curl -k -X POST https://localhost:10001/yjp/api/v1/getStatus" inside Docker container? You should run it outside, on the host machine, i.e. host's port 10001 should be forwarded into the port 10001 inside the Docker container.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Post Reply