Error: (3) URL rejected: No host part in the URL

Tamir Basin 25 Reputation points
2024-03-23T10:17:52.3766667+00:00

In the module "Describe Azure compute and networking services" -> "Exercise - Configure network access" - > "Task 1: Access your web server" -> Excersize 2 (curl --connect-timeout 5 http://$IPADDRESS) I get the error "(3) URL rejected: No host part in the URL"

Running "echo $IPADDRESS" displays nothing.
However, I can see the Public IP in Azure for "my-vm"

Kindly advise,

Thank you,

Tamir

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
2,050 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,381 Reputation points MVP
    2024-03-24T00:33:36.64+00:00

    Hello @Tamir Basin !

    Welcome to Microsoft QnA!

    It seems that the IPADDRESS is not declared into the console you are using

    Declare it as $IPADDRESS= 1.1.1.1 ( your ip)

    and re try !

    --

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

  2. Rakesh Gurram 11,965 Reputation points Microsoft Vendor
    2024-03-24T13:42:16.8233333+00:00

    Hi Tamir Basin,

    Thank you for your reaching out to us on Microsoft Q&A forum.

    From your question we understand that you are trying to complete the exercise from Describe Azure compute and networking services.

    We had tried to perform the exercise and successfully completed it from our side.

    User's image

    When we run the following command (curl --connect-timeout 5 http://$IPADDRESS)

    2

    The URL is displaying the below the image:

    3 We suggest you start the lab from the beginning and complete the steps as mentioned in the exercise. Wait for each command in the exercise to execute completely.

    Please don't hesitate to reach out to us if you have any other queries with screenshots of the error.

    If the information is helpful, please Accept Answer so that it would be helpful to community members.

    Thank you.


  3. Yash Mittal 0 Reputation points
    2024-09-15T07:33:51.87+00:00

    Hi,

    Please make sure that in the following command

    IPADDRESS="$(az vm list-ip-addresses --resource-group "[sandbox resource group name]" --name my-vm --query "[].virtualMachine.network.publicIpAddresses[*].ipAddress" --output tsv)"

    you do replace the "[sandbox resource group name]" by your own group name that you can find under resource groups on microsoft azure.

    0 comments No comments

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.