From 4a9418c6f325bc84a9b3c1bf226343015b9ec48e Mon Sep 17 00:00:00 2001 From: Robert McLaws <1657085+robertmclaws@users.noreply.github.com> Date: Mon, 27 Apr 2026 03:40:52 -0400 Subject: [PATCH] Fix azurite-table reporting configured port instead of bound port The standalone azurite-table entry point printed its "successfully started" banner using the configured port from `config.port`. When a caller passes `--tablePort 0` to request an OS-assigned port, this caused the banner to report port 0 instead of the actual bound port, breaking any tooling that parses the banner to discover where the service is listening (e.g. Storage Explorer, test harnesses that need to construct a connection string). The blob and queue entry points already use `server.getHttpServerAddress()` for this message; align table to match. The wording is also normalized from "successfully started on" to "successfully listens on" for consistency with blob and queue. --- ChangeLog.md | 4 ++++ src/table/main.ts | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 51cd48fd2..86841d9cb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,6 +10,10 @@ General: - Fix building failure on Node 22 platform. - Fix * IfMatch for non-existent resource not throwing 412 Precondition Failed +Table: + +- Fix `azurite-table` startup banner reporting the configured port (e.g. `0` when using OS-assigned ports) instead of the actual bound address. Now uses `server.getHttpServerAddress()` to match `azurite-blob` and `azurite-queue`. + ## 2025.07 Version 3.35.0 General: diff --git a/src/table/main.ts b/src/table/main.ts index c399d8ef9..e9a4eb3c8 100644 --- a/src/table/main.ts +++ b/src/table/main.ts @@ -59,15 +59,13 @@ async function main() { // Create server instance const server = new TableServer(config); - const beforeStartMessage = `Azurite Table service is starting on ${config.host}:${config.port}`; - const afterStartMessage = `Azurite Table service successfully started on ${config.host}:${config.port}`; const beforeCloseMessage = `Azurite Table service is closing...`; const afterCloseMessage = `Azurite Table service successfully closed`; // Start Server - console.log(beforeStartMessage); + console.log(`Azurite Table service is starting on ${config.host}:${config.port}`); await server.start(); - console.log(afterStartMessage); + console.log(`Azurite Table service successfully listens on ${server.getHttpServerAddress()}`); AzuriteTelemetryClient.init(location, !env.disableTelemetry(), env); await AzuriteTelemetryClient.TraceStartEvent("Table");