polardb / polardbx-sql

PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.
Apache License 2.0
1.54k stars 325 forks source link

How to debug java. #16

Closed ssslkj123 closed 2 years ago

ssslkj123 commented 3 years ago

When I try to use pxd command start PolarDB-X sample cluster in my host there are several docker containers start normally ,and it works fine, after that my workmate ask me a question : how can I debug PolarDB-X container java processes ? or expose docker port in already running PolarDB-X containers.

I assume thie containers start by docker-compose , but I cant find out this file .

So pls help to resolve this problem. Thx

Oldbread3 commented 3 years ago

From my perspective, the best way to debug CN of PolarDB-X is to build from source code. You can find some useful information from these two docs: contributing and quickstart-development

For question about expose docker port, my colleague might have answer, just wait for a moment :)

vettalwu commented 3 years ago

@ssslkj123 Nice question. Currently, the cn container deployed by pxd does not support java remote debug. If you want to debug the java process, please follow quickstart-development . If debug is a strong requirements for pxd, I will support a new option such as 'enable-debug' to expose java remote debugging port in the next version.

What's more, the containers are started only by pxd script, not docker-compose.