You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "youzipi (via GitHub)" <gi...@apache.org> on 2023/12/28 09:24:03 UTC
[I] [Bug] missing java in docker image? [pulsar]
youzipi opened a new issue, #21815:
URL: https://github.com/apache/pulsar/issues/21815
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
```sh
docker images
>
REPOSITORY TAG IMAGE ID CREATED SIZE
apachepulsar/pulsar 3.1.1 e1ce95d6fa9f 3 months ago 1.18GB
cat /proc/version
>
Linux version 3.10.0-1160.6.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Nov 17 13:59:11 UTC 2020
```
### Minimal reproduce step
```yml
---
version: "3.7"
services:
pulsar:
image: apachepulsar/pulsar:3.1.1
environment:
- PULSAR_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g
- PULSAR_PREFIX_defaultRetentionTimeInMinutes=14400
- PULSAR_PREFIX_defaultRetentionSizeInMB=1000
- PF_ENV_DEBUG=1
command: >
/bin/bash -c
"pwd
&& echo 'JAVA_HOME='$JAVA_HOME
&& echo 'JAVA_BIN='$JAVA_BIN
&& echo $(which java)
&& ls -alh /usr/local
&& bin/pulsar standalone --advertised-address standalone -nss"
hostname: pulsar
ports:
- 8093:8080
- 6651:6650
...
```
```sh
docker-compose up
```
### What did you expect to see?
start successfully
### What did you see instead?
```log
pulsar_1 | Error: JAVA_HOME not set, and no java executable found in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.
pulsar_new_pulsar_1 exited with code 1
```
### Anything else?
i check the file
2.7.0 image:

3.1.1 image:

I test on another machine, it works.
```
uname -a
Linux test-mongo-pulsar 5.4.0-1030-aws #31-Ubuntu SMP Fri Nov 13 11:40:37 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
```
so, the jdk is removed from the old location, where is the jdk location now?
and i can not figure out why the behaviors is related to the host machine.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] `Error: JAVA_HOME not set` when docker-compose up 3.1.1 standalone [pulsar]
Posted by "youzipi (via GitHub)" <gi...@apache.org>.
youzipi commented on issue #21815:
URL: https://github.com/apache/pulsar/issues/21815#issuecomment-1871013724
```sh
$ java --version
openjdk 17.0.8.1 2023-08-24
OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1)
OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1, mixed mode, sharing)
```
```sh
java --version
[0.004s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# /pulsar/hs_err_pid37.log
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] `Error: JAVA_HOME not set` when using legacy docker [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #21815:
URL: https://github.com/apache/pulsar/issues/21815#issuecomment-6381545780
Thanks for the report and the follow-up, @youzipi. As you found, the root cause is the old Docker Engine 20.10.0 / runc 1.0.0-rc92 runtime: the JVM in the image can't start threads there (`pthread_create failed (EPERM)`), so the startup scripts can't find a working `java`. Upgrading Docker fixes it, so this isn't a Pulsar issue. Closing. If it happens on a current Docker runtime with a supported image (4.0.x, 4.2.x or 5.0.x), please reopen.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] `Error: JAVA_HOME not set` when docker-compose up 3.1.1 standalone [pulsar]
Posted by "youzipi (via GitHub)" <gi...@apache.org>.
youzipi commented on issue #21815:
URL: https://github.com/apache/pulsar/issues/21815#issuecomment-1871066093
seems docker problem:
```sh
sudo docker version
Client: Docker Engine - Community
Version: 20.10.0
API version: 1.41
Go version: go1.13.15
Git commit: 7287ab3
Built: Tue Dec 8 18:57:35 2020
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.0
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: eeddea2
Built: Tue Dec 8 18:56:55 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
```
```sh
sudo docker version
Client: Docker Engine - Community
Version: 24.0.7
API version: 1.43
Go version: go1.20.10
Git commit: afdd53b
Built: Thu Oct 26 09:11:35 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.20.10
Git commit: 311b9ff
Built: Thu Oct 26 09:10:36 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.26
GitCommit: 3dd1e886e55dd695541fdcd67420c2888645a495
runc:
Version: 1.1.10
GitCommit: v1.1.10-0-g18a0cb0
docker-init:
Version: 0.19.0
GitCommit: de40ad0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] `Error: JAVA_HOME not set` when using legacy docker [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed issue #21815: [Bug] `Error: JAVA_HOME not set` when using legacy docker
URL: https://github.com/apache/pulsar/issues/21815
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] `Error: JAVA_HOME not set` when docker-compose up 3.1.1 standalone [pulsar]
Posted by "youzipi (via GitHub)" <gi...@apache.org>.
youzipi commented on issue #21815:
URL: https://github.com/apache/pulsar/issues/21815#issuecomment-1871089559
similar issue: https://github.com/keycloak/keycloak/issues/17404
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org