SSAS Development How to fix "Cannot open BIM Model. Localhost server unreachable" ?

D2d3d4d5 120 Reputation points

Hello everyone !

I've had a weird problem during the last couple of days.

I downloaded a SSAS project from Azure to work on it with some people. I set it up to use "Integrated workspace", and I left everything else as default. The first time I opened it, it was fine, but when I changed the format of a measure and reopened the project, It gave me an error.

It says that the database "localhost" cannot be reached, and I need to verify if an instance is running in VertiPaq mode.

I created the SSAS project with "Integrated workspace", so I assumed the localhost instance would be working correcty.

The temporary fix is to delete the temporary files. More specificaly the "bin/Data/db.X.db" folder and the "bin/Data/db.X.db.xml" file.

Once this is done, I can reopen the project, but if I change any measure, the problem comes back.

Maybe Visual studio tries to load them into the local database, but it fails ?

How can I check that this database is running ?

I use Visual Studio 2019 16.11.40 with the "Microsoft Analysis Projects Services" addon version 2.9.18, and my OS is Windows 11 build 132.0.2957.140 (However I don't think it matters, as there was the same problem before).

My project is pretty small compared to most SSAS projects.

It uses the Integrated workspace, and everything else is default settings.

Do you know a fix for this ?

It's really wasting a lot of time to delete all the temporary files every time I need to work on the project.

I'll try to create the smallest reproducable example to give an idea of what is happening.

PS :

I also found that my problem is very similar to this one :

https://learn.microsoft.com/en-us/answers/questions/1462540/problems-opening-a-tabular-model-file-in-different

However, modifying the Model.bim_XXX.settings doesn't really help.
Visual studio automatically creates one for every user that opens the project, and everyone else that opens the project has the same problem.

  1. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

    @D2d3d4d5 We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others. Otherwise, will respond with more details and we will try to help.

  2. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

    @D2d3d4d5 Following up to see if the below suggestion was helpful. And, if you have any further query do let us know.


Sign in to comment

Answer accepted by question author

Longoria Joseph 80 Reputation points

👁 Capture

Had the same problem, happened upon this solution. Even if yuou have server set in deploy the workspace server can be different. Click little wrench, look for Workspace Server, change to the same as deploy.

  1. D2d3d4d5 120 Reputation points

    That ended up being my semi-permanent solution.

    From what I gathered it has 2 drawbacks :

    • When you open a model it creates a temporary model in the server which can take a substential amount of space if you forget to delete it.
    • Maybe it's just my version of the DataTools addon, but sometimes the connection seems to drop, and all my measures get into an error state. It only happens with big models though.

Sign in to comment

Answer accepted by question author

Kaniel Wang 76 Reputation points

Please try to delete the bin folder under your tabular project . Then restart Visual Studio.

👁 User's image

From my experience, if you save your tabular project in a OneDrive folder, you will probably have this kind of issue.

Please move your project from OneDrive to a local folder.

  1. D2d3d4d5 120 Reputation points

    Sorry for the long wait.
    Yep, that's the solution.

    Maybe that will convince my colleagues that OneDrive is not the right tool for project sharing and version control.


Sign in to comment

2 additional answers

  1. D2d3d4d5 120 Reputation points

    Hello,

    Thank you for your answers.

    I'm very sorry for the late reply.
    It seems that I don't get notification even when folowing a topic.
    Anyways, here is what I tried :

    • Check if SSAS is running in VertiPaq mode - Open Task Manager and look for the msmdsrv.exe process. If it’s not running, the workspace server might not be starting properly.

    It seems that the server runs, however, it seems that doesn't open any ports to connect to it.

    When I do :

    netstat -a -n -p tcp -o | FINDSTR <PID OF PROCESS>

    It doesn't find anything.

    • Restart the Integrated Workspace Server - In Visual Studio, go to Tools > Options > Analysis Services Tabular Projects and check if you can restart the workspace database from there.

    It doesn't seem like I can restart it from here

    • Manually Start the Local SSAS Instance - Open SQL Server Management Studio (SSMS) and try connecting to localhost:51334 (the default SSAS Tabular workspace port). If it doesn’t connect, the workspace may not be starting correctly.

    Sadly it doesn't seem to use the default port... Or any port for that matter

    • Clear and Rebuild the Workspace - Instead of deleting files every time, try clearing the workspace database from Visual Studio > Tabular Model Explorer and then rebuild the model.

    I tried to do that, but sadly it didn't work

    • Check for Conflicts in the Model.bim File - Since this issue happens when making changes, there could be a conflict in the metadata files. You can try creating a new Tabular project and importing the existing model.

    I tried to do that :

    1. I downloaded the Model.bim and the smproject file from my Azure Analysis instance,
    2. I recreated the project from these fileand set it as "localhost"
    3. I change the format of a measure
    4. I restart Visual Studio
    5. I get exactly the same error

    However, these tried did teach us something :

    The server does start running, but no port is ever assigned to it, so Visual Studio can't access it.

    Do you know any tool that can help troubleshooting this ?

    0 comments No comments

    Sign in to comment
  2. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

    Hi @D2d3d4d5

    Welcome to Microsoft Q&A platform and thanks for posting your query here.
    It looks like your SSAS project is not able to connect to the local integrated workspace in Visual Studio. Since deleting the temporary files helps temporarily, the issue might be with how the workspace database is being managed.

    Here are a few things you can try:

    • Check if SSAS is running in VertiPaq mode - Open Task Manager and look for the msmdsrv.exe process. If it’s not running, the workspace server might not be starting properly.
    • Restart the Integrated Workspace Server - In Visual Studio, go to Tools > Options > Analysis Services Tabular Projects and check if you can restart the workspace database from there.
    • Manually Start the Local SSAS Instance - Open SQL Server Management Studio (SSMS) and try connecting to localhost:51334 (the default SSAS Tabular workspace port). If it doesn’t connect, the workspace may not be starting correctly.
    • Clear and Rebuild the Workspace - Instead of deleting files every time, try clearing the workspace database from Visual Studio > Tabular Model Explorer and then rebuild the model.
    • Check for Conflicts in the Model.bim File - Since this issue happens when making changes, there could be a conflict in the metadata files. You can try creating a new Tabular project and importing the existing model.

    If the problem keeps coming back, you might want to reinstall the Microsoft Analysis Services Projects extension in Visual Studio or try using a different version of Visual Studio 2019.

    Hope this helps! Let me know if you need more details.


    Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.

    1. D2d3d4d5 120 Reputation points

      Hello,

      Thank you for your answers.

      I'm very sorry for the late reply. It seems that I don't get notification even when folowing a topic. Anyways, here is what I tried :

      • Check if SSAS is running in VertiPaq mode - Open Task Manager and look for the msmdsrv.exe process. If it’s not running, the workspace server might not be starting properly.

      It seems that the server runs, however, it seems that doesn't open any ports to connect to it.

      When I do :

      netstat -a -n -p tcp -o | FINDSTR <PID OF PROCESS>

      It doesn't find anything.

      • Restart the Integrated Workspace Server - In Visual Studio, go to Tools > Options > Analysis Services Tabular Projects and check if you can restart the workspace database from there.

      It doesn't seem like I can restart it from here

      • Manually Start the Local SSAS Instance - Open SQL Server Management Studio (SSMS) and try connecting to localhost:51334 (the default SSAS Tabular workspace port). If it doesn’t connect, the workspace may not be starting correctly.

      Sadly it doesn't seem to use the default port... Or any port for that matter

      • Clear and Rebuild the Workspace - Instead of deleting files every time, try clearing the workspace database from Visual Studio > Tabular Model Explorer and then rebuild the model.

      I tried to do that, but sadly it didn't work

      • Check for Conflicts in the Model.bim File - Since this issue happens when making changes, there could be a conflict in the metadata files. You can try creating a new Tabular project and importing the existing model.

      I tried to do that :

      1. I downloaded the Model.bim and the smproject file from my Azure Analysis instance,
      2. I recreated the project from these fileand set it as "localhost"
      3. I change the format of a measure
      4. I restart Visual Studio
      5. I get exactly the same error

      However, these tried did teach us something :

      The server does start running, but no port is ever assigned to it, so Visual Studio can't access it.

      Do you know any tool that can help troubleshooting this ?

      Hello,

      Thank you for your answers.

      I'm very sorry for the late reply.
      It seems that I don't get notification even when folowing a topic.
      Anyways, here is what I tried :

      • Check if SSAS is running in VertiPaq mode - Open Task Manager and look for the msmdsrv.exe process. If it’s not running, the workspace server might not be starting properly.

      It seems that the server runs, however, it seems that doesn't open any ports to connect to it.

      When I do :

      netstat -a -n -p tcp -o | FINDSTR <PID OF PROCESS>

      It doesn't find anything.

      • Restart the Integrated Workspace Server - In Visual Studio, go to Tools > Options > Analysis Services Tabular Projects and check if you can restart the workspace database from there.

      It doesn't seem like I can restart it from here

      • Manually Start the Local SSAS Instance - Open SQL Server Management Studio (SSMS) and try connecting to localhost:51334 (the default SSAS Tabular workspace port). If it doesn’t connect, the workspace may not be starting correctly.

      Sadly it doesn't seem to use the default port... Or any port for that matter

      • Clear and Rebuild the Workspace - Instead of deleting files every time, try clearing the workspace database from Visual Studio > Tabular Model Explorer and then rebuild the model.

      I tried to do that, but sadly it didn't work

      • Check for Conflicts in the Model.bim File - Since this issue happens when making changes, there could be a conflict in the metadata files. You can try creating a new Tabular project and importing the existing model.

      I tried to do that :

      1. I downloaded the Model.bim and the smproject file from my Azure Analysis instance,
      2. I recreated the project from these fileand set it as "localhost"
      3. I change the format of a measure
      4. I restart Visual Studio
      5. I get exactly the same error

      However, these tried did teach us something :

      The server does start running, but no port is ever assigned to it, so Visual Studio can't access it.

      Do you know any tool that can help troubleshooting this ?

    2. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

      Hi @D2d3d4d5

      Thank you for your detailed response and for trying out the steps I suggested earlier. Based on your findings, it appears that the integrated workspace server starts but does not open any ports, preventing Visual Studio from connecting to it. Let me share some additional troubleshooting steps and tools to help narrow down and resolve this issue:

      Additional Troubleshooting Steps

      1. Ensure there are no local firewall rules or policies blocking the SSAS process (msmdsrv.exe) from opening ports. Temporarily disable the firewall (if possible) to confirm whether it’s a firewall-related issue.
      2. Since no port is assigned, you can explicitly configure the integrated workspace server to bind to a specific port.
      3. Open the msmdsrv.ini file for the workspace server (usually located in the bin\Data folder of your project) and add or update the <Port> element with a specific port number (e.g., <Port>51334</Port>). Restart Visual Studio after saving the changes.
      4. You can enable detailed logs for the integrated workspace server to check why it fails to bind to a port. Modify the msmdsrv.ini file to enable logging: Add <Log> elements such as <FlightRecorder>, <QueryLog>, and <LogEnabled> and set them to true.
      5. If the integrated workspace consistently fails to operate correctly, uninstall and reinstall the Microsoft Analysis Services Projects extension for Visual Studio. This ensures that no corrupted files are causing the problem.
      6. Instead of relying on the integrated workspace, configure the project to use an external SSAS Tabular instance. This avoids local workspace server issues and provides a more reliable environment for development and testing. Install SQL Server Analysis Services (SSAS) Tabular on your local machine or set up a virtual machine to act as the workspace server. Update your project settings to point to the external server.
      7. Ensure that Visual Studio, .NET Framework, and the Microsoft Analysis Services Projects extension are all up to date. Sometimes outdated or missing dependencies can cause unpredictable behavior.

      Tools for Debugging

      1. Process Monitor (Sysinternals): Use this tool to monitor the msmdsrv.exe process and its interactions with the system (e.g., registry keys, file access, network connections). This might reveal why ports are not being opened.
      2. Event Viewer: Check the Windows Event Viewer for any warnings or errors related to SSAS or Visual Studio when the issue occurs.
      3. PowerShell: Use PowerShell to query SSAS instances on your machine:
         Get-Process -Name msmdsrv | Select-Object Id, Path
         
        
      4. Network Diagnostics Tools: Tools like Wireshark or Fiddler can help confirm whether there are any attempted connections to localhost that fail or are blocked.

      From your description, the issue seems tied to how the integrated workspace is initializing and binding to a port. If none of these steps resolves the issue, I recommend escalating this to the Visual Studio development team or creating a support ticket with Microsoft.

      Hope this helps! Let me know if you have any questions.

    3. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

      @D2d3d4d5 Following up to see if the above suggestion was helpful. And, if you have any further query do let us know.

    4. D2d3d4d5 120 Reputation points

      Hello again !
      Sadly, these solutions didn't work.
      There is no firewall rule that causes this problem.

      There is no "msmdsrv.ini" file in the Data folder.

      I tried uninstalling and reinstalling, but it didn't work.

      Relying on SSAS instance in the cloud is a solution, but that comes with its set of problems as well. I'd rather not rely on it.

      I'm going to try escalating this to Microsoft.

    5. Smaran Thoomu 35,375 Reputation points Microsoft External Staff Moderator

      @D2d3d4d5 I agree that this issue looks strange, and I wasn't able to reproduce this issue. If you have a support plan, could you please file a support ticket for deeper investigation and do share the SR# with us? In case if you don't have a support plan, please let us know here.


    Sign in to comment
Sign in to answer

Your answer