Cannot create Container Instance using External Udp Port
See original GitHub issueI’m running the following code to create a container instance with an external Udp port.
IContainerGroup containerGroup = await azure.ContainerGroups.Define(aciName)
.WithRegion(region)
.WithNewResourceGroup("myrg")
.WithLinux()
.WithPrivateImageRegistry("myserver", "myuser", "mypassword")
.WithoutVolume()
.DefineContainerInstance(aciName)
.WithImage("myImage")
.WithExternalUdpPort(4900)
.WithCpuCoreCount(1)
.WithMemorySizeInGB(1.5)
.Attach()
.CreateAsync(CancellationToken.None)
I’m getting the following exception:
Following ports ‘4900’ in the ‘ipAddress’ are not used by any container in container group ‘acis11amplef3033472’.
Please note that if change the code to use WithExternalTcpPort
it creates the container group and instance as expected.
StackTrace
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: CreateContainer —> Microsoft.Rest.Azure.CloudException : Following ports ‘4900’ in the ‘ipAddress’ are not used by any container in container group ‘acis11amplef3033472’. at async Microsoft.Azure.Management.ContainerInstance.Fluent.ContainerGroupsOperations.CreateOrUpdateWithHttpMessagesAsync(String resourceGroupName,String containerGroupName,ContainerGroupInner containerGroup,Dictionary
2 customHeaders,CancellationToken cancellationToken) at async Microsoft.Azure.Management.ContainerInstance.Fluent.ContainerGroupsOperationsExtensions.CreateOrUpdateAsync(IContainerGroupsOperations operations,String resourceGroupName,String containerGroupName,ContainerGroupInner containerGroup,CancellationToken cancellationToken) at async Microsoft.Azure.Management.ContainerInstance.Fluent.ContainerGroupImpl.CreateResourceAsync(CancellationToken cancellationToken) at async Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.Creatable
4.<Microsoft-Azure-Management-ResourceManager-Fluent-Core-ResourceActions-IResourceCreatorIResourceT>-CreateResourceAsyncIFluentResourceT,InnerResourceT,FluentResourceT,IResourceT at async Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.CreatorTaskItem1.ExecuteAsync[IResourceT](CancellationToken cancellationToken) at async Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.TaskGroupBase
1.ExecuteNodeTaskAsync[TaskResultT](DAGNode1 node,CancellationToken cancellationToken) at async AciFunction.Aci.RunAsync(HttpRequestMessage req,TraceWriter log) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker
2.InvokeAsync[TReflected,TReturnValue](Object instance,Object[] arguments) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker,ParameterHelper parameterHelper,CancellationTokenSource timeoutTokenSource,CancellationTokenSource functionCancellationTokenSource,Boolean throwOnTimeout,TimeSpan timerInterval,IFunctionInstance instance) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) End of inner exception at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken) at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw() at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??) at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary2 arguments,CancellationToken cancellationToken) at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken) at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager) at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??) at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func
3 processRequestHandler,CancellationToken cancellationToken) at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken) at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken) at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The fix was shipped in v1.8. Please upgrade.
@ejadib the current plan is to release it early next week