-
Notifications
You must be signed in to change notification settings - Fork 161
Using volume to map SSL certificates can cause certificate mismatch #122
Comments
Thank you for your attention. I need to point out that the owner of all files in the |
@VincentSit Sorry for the late reply. First, the error of |
@VincentSit We are trying to reproduce your issue. I have a question about docker:
Did you restart EMQX after you executed |
@zhanghongtong Sorry for the late reply. I didn't restart the EMQX, all operations including logs are as above. |
@VincentSit I'm sorry we didn't reproduce the problem. We create the container from |
I'm not too sure either. I'll pack the whole test environment for you. But it may be a little late to have time to do it. Thank you! |
The complete step is like above, And I did a test before opening the issue to make sure it could reproduce the problem. I don't know why you can't reproduce it, please wait for me to pack a whole test environment for you. |
Make sure you read and understand http://emqtt.io/docs/v2/index.html.
Use one of the two templates below and delete the rest.
For detailed steps, please check out the Test code below. My question is whether this problem is caused by my incorrect configuration or it's a bug in emqx. I tested all versions of 3.x and the issue exists.
BTW, I want to ask what this means?
Expected behavior
Can be successfully connected via SSL.
Actual behavior
emqx reported that the certificate does not match.
Test code
First attempt (Failed)
I have an instance of emqx running in the docker container, configured as follows:Here is the log:
As you can see that it has been successfully run. At this point I enter the container and add a few users. Because you changed this mechanism, it is a little troublesome.
The contents of the
add-user.sh
script are as follows (sensitive information has been modified):At this point emqx output log is as follows:
I don't know what it means, so I choose to ignore it because it works fine.
At this point I try to connect to the instance, I use MQTT.fx as the test client, the connection is successful, the emqx log is as follows:
Then I disconnected, the emqx log is as follows:
At this point I tried to use the SSL connection, the connection failed, I guarantee that the client configuration is correct, the emqx log is as follows:
Second attempt (Successful)
Based on the configuration of the first attempt, I removed the following from volume:
Then execute the following command:
I repeat the first attempted steps until I am ready to connect via SSL. As of now, everything is the same as the first step.
Now I run the following command in another session window to manually copy the SSL certificates into the container.
Now I connect to the emqx instance via SSL. The connection is successful, here is the log
EMQ version
v3.2.1
Docker version
Which docker-engine version?
Docker version 19.03.1, build 74b1e89
How docker info?
System
What system do you use?
Hardware
How is the host machine?
The host is a vagrant virtual machine created specifically to test the problem, running on VirtualBox with dual-core CPU and 2 GB of memory. There are no other programs running. This problem also exists on my production server on AWS. I can't I did the test on the production server, so I deployed the test environment. I think the problem has nothing to do with the host environment, so I didn't attach the Vagrantfile, but I can attach it if you need it.
The text was updated successfully, but these errors were encountered: