"Illegal character in hostname at index 33" error reported on the Cloud Director cell after upgrading Cloud Director
search cancel

"Illegal character in hostname at index 33" error reported on the Cloud Director cell after upgrading Cloud Director

book

Article ID: 320483

calendar_today

Updated On: 02-24-2025

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • When browsing the Cloud Director cell on the Cloud Director UI you see the error below:
java.net.URISyntaxException: Illegal character in hostname at index X: wss://vcd_cell.example.com/messaging/mqtt - Illegal character in hostname at index X: wss://vcd_cell.example.com/messaging/mqtt
  • On /opt/vmware/vcloud-director/logs/vcloud-container-info.log you have an error similar the one reported below:
2024-03-11 08:32:12,251 | ERROR    | pool-jetty-150420         | DefaultExceptionMapper         | Internal server exception | requestId=REQUEST_ID,request=GET https://vcloud.director,example.com/cloudapi/1.0.0/cells/urn:vcloud:cell:ID_OF_THE_VCD_CELL/accessEndpoints,requestTime=1710145932198,remoteAddress=VCD_CELL_IP_ADDRESS:20046,userAgent=Mozilla/5.0(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/json;version 39.0.0-alpha java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in hostname at index X: wss://vcd_cell.example.com/messaging/mqtt
....
Caused by: java.net.URISyntaxException: Illegal character in hostname at index X: wss://vcd_cell.example.com/messaging/mqtt
        at java.base/java.net.URI$Parser.fail(URI.java:2913)
        at java.base/java.net.URI$Parser.parseHostname(URI.java:3448)
        at java.base/java.net.URI$Parser.parseServer(URI.java:3297)
        at java.base/java.net.URI$Parser.parseAuthority(URI.java:3216)

        at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3158)
        at java.base/java.net.URI$Parser.parse(URI.java:3114)
        at java.base/java.net.URI.<init>(URI.java:685)
        at com.vmware.vcloud.api.presentation.entity.system.CellAccessSpec.<init>(CellAccessSpec.java:86)
        ... 165 more


Environment

VMware Cloud Director 10.5.1

Cause

The error occurs when the hostname of the Cell does not conform to the standards of RFC 2396.
In this instance it was an underscore '_' which caused the issue.

Resolution

Change the Cloud Director cell hostname to remove the underscore character.

The underscore character must not be present in the machine's hostname as per the documentation.

  • https://techdocs.broadcom.com/us/en/vmware-cis/cloud-director/vmware-cloud-director/10-5/network-configuration-requirements.html
  • The hostnames of the VMware Cloud Director cells must not contain any underscores.