Hi Team,
Hope you are doing great !
Kindly guide me where I am going wrong :-
- In understanding the question regarding the ports or issue.
– example :- port should be 80:5002 and I am giving 5002:5002 - Or I am missing some steps which is being checked by the python script and result is failed task with error given below.
Question Screenshot :-
Things I have tried to verify from my side.
-
First stopped and removed old container then :-
Created a new container with port number 5002:5002 as per the task given with same- name = kkloud,
- image ubuntu 18:04,
- installed apache2 inside the container using apt command.
- changed apache default port 80 to 5002 by updating the file inside container
file name :- /etc/apache2/ports.conf
-
Check and Verification done from my side
-
Checked docker ps output container is running & it showed mapping of ports like this 5002:5002.
-
Checked from inside the container -
- correct port number is showing in the file /etc/apache2/ports.conf
- Apache services are running , even restarted it once and again verified it was running.
- did the curl on localhost port 5002 (from inside the container) and its working.
- Installed netstat and verified port 5002 is listing.
-
From the Host CLI verified using -
- curl on port 5002 - it was working got the output.
- Installed netstat and verified port 5002 is listing.
-
Since this task failed , I tried once again but got similar error for port 6400 for “Apache server 2”
-
---------> Relevant Screenshot and Error message I have shared below <----------
**Error :- **
====
- ‘apache2’ is not configured to use correct port i.e ‘5002’ in ‘kkloud’ container on App Server 3
FAILED docker-exec.py::test_docker_exec - AssertionError: - ‘apache2’ is not …
Screenshot for curl from host (App Server 3) is working fine for the url : - http://localhost:5002/
Even i have checked for listing port from host and inside the container and its fine.
Screenshot for netstat command output from Host (App Server 3)
**
Since 1st Attempt it failed so I tried 2nd time still getting similar error
**
**Error :- **
====
- ‘apache2’ is not configured to use correct port i.e ‘6400’ in ‘kkloud’ container on App Server 2
FAILED docker-exec.py::test_docker_exec - AssertionError: - ‘apache2’ is not …
Error Screenshot Below
Screenshot for kkloud container file output :-etc/apache2/ports.conf
Screenshot for curl from host (App Server 2) is working fine for the url : - http://localhost:6400/