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

无法调试jvm? #10

Open
lialzm opened this issue Dec 25, 2020 · 4 comments
Open

无法调试jvm? #10

lialzm opened this issue Dec 25, 2020 · 4 comments

Comments

@lialzm
Copy link

lialzm commented Dec 25, 2020

使用ps aux可以看到相关程序,但是使用 jstack 提示

Unable to open socket file: target process not responding or HotSpot VM not loaded

@zeromake
Copy link
Owner

应该是文件路径挂在了其它地方导致jstack去调取文件按原来路径,导致了无法打开调试的socket文件。

@xiongjy2104
Copy link

我连java都没法执行,这个能想办法解决吗?

@zeromake
Copy link
Owner

@xiongjy2104
可以尝试把原容器的 PATH 继承过来,你用的镜像是哪个呢?我试试效果,如果可以我加个参数来继承环境变量。

@xiongjy2104
Copy link

xiongjy2104 commented Jan 21, 2022

我用的s1mplecc/spark-hadoop:3,或者我把compose文件放上来你看看。我自己尝试添加JAVA_HOME映射也不行。诉求一个是java命令,另一个是里面的spark-shell命令能运行。

version: '2'

services:
spark:
#image: docker.io/bitnami/spark:3
image: s1mplecc/spark-hadoop:3
hostname: master
privileged: true
ipc: shareable
environment:
- SPARK_MODE=master
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- JAVA_HOME=/opt/bitnami/java
volumes:
- /d/docker/spark/master/opt/share:/opt/share:rshared
- /d/docker/spark/master/opt:/opt:rshared
ports:
- '8080:8080'
- '4040:4040'
spark-worker-1:
image: s1mplecc/spark-hadoop:3
hostname: worker1
privileged: true
environment:
- SPARK_MODE=worker
- SPARK_MASTER_URL=spark://master:7077
- SPARK_WORKER_MEMORY=1G
- SPARK_WORKER_CORES=1
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- JAVA_HOME=/opt/bitnami/java
volumes:
- /d/docker/spark/worker1/opt/share:/opt/share
ports:
- '8081:8081'
spark-worker-2:
image: s1mplecc/spark-hadoop:3
hostname: worker2
privileged: true
environment:
- SPARK_MODE=worker
- SPARK_MASTER_URL=spark://master:7077
- SPARK_WORKER_MEMORY=1G
- SPARK_WORKER_CORES=1
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- JAVA_HOME=/opt/bitnami/java
volumes:
- /d/docker/spark/worker2/opt/share:/opt/share
ports:
- '8082:8081'

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