Attaching apm-agent-attach-cli.jar to a running process that already has javaagents

Hi,
I am trying to attach an agent to a running process that has another agent attached at startup time using -javaagent option. The agent throws the following:

{"@timestamp":"2022-12-19T19:50:48.574Z","log.level": "INFO","message":"The agent is already attached to JVM 1 myapp", "ecs.version": "1.2.0","service.name":"java-attacher","event.dataset":"java-attacher.log","process.thread.name":"main","log.logger":"co.elastic.apm.attach.AgentAttacher"}
{"@timestamp":"2022-12-19T19:50:48.574Z","log.level":"ERROR","message":"Unable to attach to JVM with PID = 1", "ecs.version": "1.2.0","service.name":"java-attacher","event.dataset":"java-attacher.log","process.thread.name":"main","log.logger":"co.elastic.apm.attach.AgentAttacher"}

Any advise on how to overcome this will be highly appreciated

Running in a container where PID 1 is the main java application.