I am getting error while doing the exercise

06692725 10 Reputation points
2024-02-15T11:25:11.86+00:00

Hi, I am going through the exercise and under Task 1: Access your web server there is a task to run this command curl --connect-timeout 5 http://$IPADDRESS While running this, I am getting the below error message curl: (3) URL rejected: No host part in the URL When I ran the previous command IPADDRESS="$(az vm list-ip-addresses --resource-group "learn-769709c6-98db-4521-9b80-f495f9f16ef4" --name my-vm --query "[].virtualMachine.network.publicIpAddresses[*].ipAddress" --output tsv)" after running I tried to see the IP address but using the command "echo" the response was blank please suggest how do I proceed further

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,015 questions
Azure | Azure Training
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AmaranS 7,270 Reputation points Microsoft External Staff
    2024-02-15T11:49:25.61+00:00

    Hi @06692725

    Based on my understanding of the issue, you're practicing the following Learning Path exercise:

    Section: Describe Azure architecture and services

    Module: Describe Azure compute and networking Azure

    Unit 3: Exercise - Create an Azure Virtual Machine

    Unit 9: Exercise -configure network access.

    Why am I receiving a curl: (7) Failed to connect to xx.xxx.xx.xx port 80 after 1 ms: Couldn't connect to server error?

    You could have a Network Security Group preventing inbound traffic on port 80, or the Virtual Machine itself could have a configuration issue where it's not listening on that port.

    Please correct me if you are referring to a different exercise.

    Was the sandbox still active when you copy/pasted the above command into the cloud shell?

    It is intended for you to activate a new sandbox and complete all of the tasks in Unit 3 (earlier exercise) and Unit 9 (exercise you are referring to) in less than 1 hour. The sandbox expires after an hour and all the resources are deleted automatically.

    If you scroll back up to the top of the exercise you can see the remaining time before the sandbox expires.

    Please go back to Unit 3 Exercise, activate a new sandbox, perform all of the tasks, jump to Unit 9 Exercise, perform all of the tasks, and then reply back with your results.

    Unit 3:Exercise - Create an Azure Virtual Machine Task 1: Create a Linux virtual machine and install Nginx: step 1 User's image

    step 2User's image

    Unit 9 : Exercise - Configure network access. Task 1: Access your web server step1 & step2
    User's image

    & step3 Task 2: List the current network security group rulesUser's image

    Task 3: Create the network security ruleUser's image

    User's image

    We have tried multiple times to reproduce the issue, but we haven't faced any error.

    Additionally reference thread link:

    https://learn.microsoft.com/en-us/answers/questions/1340660/azure-fundamentals-exercise-configure-network-acce

    If you are still running into this issue after completing the prerequisite, post a comment to let us know and we'll continue to troubleshoot this.

    Complete the prerequisite less than an hour before working on this unit so that your VM isn't automatically deleted.

    If the issue persists, please reach out to us.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.