Skip to content

SocketException: Address already in use #1578

@MT-Switch

Description

@MT-Switch

What happened?

Completely new installation.

  1. Download StabilityMatrix Linux app image zip and unzip to folder
  2. Set execute permissions and run first time installer from terminal with ./
  3. Accept license agreement and choose portable option and accept default data path
  4. Error occurs

I have no other program running that could possibly use the same port, confirmed by running ps aux & lsof showing no other python programs.
Restarting the pc and running the program again instantly goes to error and skips the setup data folder dialog box.
Deleting everything related to StabilityMatrix, including folders in .cache and .local, and then downloading a new copy (with restarting and without restarting) results in the same issue outlined in the above numbered steps.

Exception Details

2026-03-14 12:10:58.5893|INFO|StabilityMatrix.Core.Services.ModelIndexService|Loading models from database...
2026-03-14 12:10:58.6000|INFO|StabilityMatrix.Core.Services.ModelIndexService|Loaded 0 models from database in 8.10ms
2026-03-14 12:10:58.6028|INFO|StabilityMatrix.Core.Services.ModelIndexService|Refreshing model index...
2026-03-14 12:10:58.6083|INFO|StabilityMatrix.Core.Services.ModelIndexService|Model index refreshed with 0 entries, took 2.78ms (2.72ms db)
2026-03-14 12:10:58.6083|INFO|StabilityMatrix.Core.Services.ModelIndexService|Loading safetensor metadata...
2026-03-14 12:10:58.6089|INFO|StabilityMatrix.Core.Services.ModelIndexService|Loaded safetensor metadata for 0 models, failed to load for 0 models in 0.34ms
2026-03-14 12:11:02.8330|DEBUG|StabilityMatrix.Core.Python.UvManager|UvManager initialized with uv executable path: /home/UserName/Data/StabilityMatrix-linux-x64/Data/Assets/uv/uv
2026-03-14 12:11:03.8357|WARN|StabilityMatrix.Avalonia.Program|Unhandled "SocketException": "Address already in use"|System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.IO.Pipes.NamedPipeServerStream.SharedServer..ctor(String path, Int32 maxCount, Boolean isFirstPipeInstance)
at System.IO.Pipes.NamedPipeServerStream.SharedServer.Get(String path, Int32 maxCount, PipeOptions pipeOptions)
at System.IO.Pipes.NamedPipeServerStream.Create(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, Int32 inBufferSize, Int32 outBufferSize, HandleInheritability inheritability)
at MessagePipe.Interprocess.Workers.NamedPipeWorker.b__13_0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at MessagePipe.Interprocess.Workers.NamedPipeWorker.StartReceiver() at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue()
at StabilityMatrix.Avalonia.ViewModels.MainWindowViewModel.OnInitialLoadedAsync()
at AsyncAwaitBestPractices.SafeFireAndForgetExtensions.HandleSafeFireAndForget[TException](Task task, Boolean continueOnCapturedContext, Action`1 onException)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)
2026-03-14 12:11:06.7471|DEBUG|StabilityMatrix.Avalonia.App|OnExit: Disposing App Services
2026-03-14 12:11:06.7482|FATAL|StabilityMatrix.Avalonia.Program|Unhandled "InvalidOperationException": "'StabilityMatrix.Core.Helper.SharedFolders' type only implements IAsyncDisposable. Use DisposeAsync to dispose the container."|System.InvalidOperationException: 'StabilityMatrix.Core.Helper.SharedFolders' type only implements IAsyncDisposable. Use DisposeAsync to dispose the container.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.Dispose()
at StabilityMatrix.Avalonia.App.OnExit(Object sender, EventArgs _)

Version

v2.15.6 && v2.15.5

What Operating System are you using?

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrashBugs involving the app crashing to desktop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions