You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/05 09:07:10 UTC
[GitHub] [rocketmq] liruhui opened a new issue, #4117: Docker data volume questions
liruhui opened a new issue, #4117:
URL: https://github.com/apache/rocketmq/issues/4117
# three question
## 1: fist question
```java
Use docker run a namesrv container There are log files when data volumes are not used, but There are no log files when using data
volumes
// example1 log files
docker run -d --name huigenamesrv -p 9876:9876 apache/rocketmq:4.9.2 sh mqnamesrv
//example2 no log files
docker run -d --name huigenamesrv -p 9876:9876 -v namesrv:/home/rocketmq/logs apache/rocketmq:4.9.2 sh mqnamesrv
why?????
```
## 2: second question
```java
Use docker run a broker container There are log files when data volumes are not used, but There are no log files when using data
volumes
// example1 log files
docker run -d --name huigebroker -p 10911:10911 -p 10909:10909 -p 10912:10912 -e "NAMESRV_ADDR=192.168.154.128:9876" apache/rocketmq:4.9.2 sh mqbroker
//example2 no log files
docker run -d --name huigebroker -p 10911:10911 -p 10909:10909 -p 10912:10912 -e "NAMESRV_ADDR=192.168.154.128:9876" -v brokerlog:/home/rocketmq/logs apache/rocketmq:4.9.2 sh mqbroker -c ../conf/broker.conf
why?????
```
## 3: three question
```java
Use docker run a broker container When the store is not mounted, it starts normally; when the store is mounted, an error will be reported, and there is no store data in the data volume.
// example1: no mount store ==> success
docker run -d --name huigebroker -p 10911:10911 -p 10909:10909 -p 10912:10912 -e "NAMESRV_ADDR=192.168.154.128:9876" -v brokerlog:/home/rocketmq/logs -v brokerconfig:/home/rocketmq/rocketmq-4.9.2/conf apache/rocketmq:4.9.2 sh mqbroker -c ../conf/broker.conf
// example2 : mount store => error container exit
docker run -d --name huigebroker -p 10911:10911 -p 10909:10909 -p 10912:10912 -e "NAMESRV_ADDR=192.168.154.128:9876" -v brokerlog:/home/rocketmq/logs -v brokerstore:/home/rocketmq/store -v brokerconfig:/home/rocketmq/rocketmq-4.9.2/conf apache/rocketmq:4.9.2 sh mqbroker -c ../conf/broker.conf
why??? how to do ??
```
--
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: dev-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] HScarb commented on issue #4117: Docker data volume questions
Posted by GitBox <gi...@apache.org>.
HScarb commented on issue #4117:
URL: https://github.com/apache/rocketmq/issues/4117#issuecomment-1090418297
```
docker run -d --name huigenamesrv -p 9876:9876 -v namesrv:/home/rocketmq/logs apache/rocketmq:4.9.2 sh mqnamesrv
```
As you are not using absolute after `-v`, docker will create a volume named namesrv for you.
You can use `docker inspect namesrv` to inspect the detail of this volume.
It probably returns
```json
"Mounts": [
{
"Type": "volume",
"Name": "namesrv",
"Source": "/var/lib/docker/volumes/namesrv/_data",
"Destination": "/home/rocketmq/logs",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
```
Find logs in Source location
Reference: https://docs.docker.com/storage/volumes/#start-a-container-with-a-volume
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] MatrixHB commented on issue #4117: Docker data volume questions
Posted by GitBox <gi...@apache.org>.
MatrixHB commented on issue #4117:
URL: https://github.com/apache/rocketmq/issues/4117#issuecomment-1088649029
-v namesrvlogs:/home/rocketmq/logs

-v /Users/xyb/namesrvlogs

"-v" use Absolute path
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] github-actions[bot] commented on issue #4117: Docker data volume questions
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4117:
URL: https://github.com/apache/rocketmq/issues/4117#issuecomment-1502494459
This issue was closed because it has been inactive for 3 days since being marked as stale.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] github-actions[bot] closed issue #4117: Docker data volume questions
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4117: Docker data volume questions
URL: https://github.com/apache/rocketmq/issues/4117
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] github-actions[bot] commented on issue #4117: Docker data volume questions
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4117:
URL: https://github.com/apache/rocketmq/issues/4117#issuecomment-1500733692
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org