# Projects not listed after on-premises Enterprise server migration and version upgrade

**URL:** <https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [November 13, 2023, 4:17pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258 "2023-11-13T16:17:32Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 13, 2023, 4:17pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/1 "2023-11-13T16:17:32Z")

</div>

# Current State

Recently due to company divestiture activities, we have had to migrate data from our existing SonarQube Enterprise server (`9.2.4`) to a newly stood-up Enterprise server (`9.9 LTS`). During the migration, the new server was setup first with `9.9 LTS` before the data was moved over from the existing server.

Now, on the new server, we cannot see the projects listed under the `Projects` tab, even after running a new baseline pipeline build. If I as user with Administrator privileges goes to the `Projects Management` list (Administration/Projects/Management), I can see all of the projects listed.

# What we have tried

1. Clearing search results as recommended [here - Stack Overflow](https://stackoverflow.com/questions/44398240/sonarqube-6-2-upgrade-to-6-4-missing-projects-and-users), [here - SQ Community](https://community.sonarsource.com/t/project-list-empty/55725), and [here - SQ Community](https://community.sonarsource.com/t/project-list-is-empty-until-a-filter-is-selected/80945).
2. Building baseline and pull request builds within our Azure DevOps (on-prem) pipelines. The builds go off fine and upload results fine, and I can see the updates happening in the `Projects Management` list, but they do not show up on the `Projects` list.
3. Deleting a project fully and re-scanning. _This does allow for the project to show up, but then loses all of the history and issue resolution and therefore is **not** a desirable outcome._

# Relevant Version Information

> **Existing Server**
>
> Server version: `9.2.4.50792`
> 
> | System | |
> | --- | --- |
> | Docker | No |
> | External User Authentication | `LDAP` |
> | High Availability | No |
> | Official Distribution | Yes |
> | Force authentication | No |
> | Home Dir | `C:\Program Files\SonarQube\sonarqube-9.2.4.50792` |
> | Data Dir | `D:/SonarData` |
> | Temp Dir | `D:/SonarTemp` |
> | Processors | `4` |
> 
> | Database | |
> | --- | --- |
> | Database | `Microsoft SQL Server` |
> | Database Version | `13.00.6419` |
> | Driver | `Microsoft JDBC Driver 9.2 for SQL Server` |
> | Driver Version | `9.2.0.0` |

> **New Server**
>
> Server version: `9.9.0.65466`
> 
> | System | |
> | --- | --- |
> | Edition | `Enterprise` |
> | Docker | No |
> | High Availability | No |
> | Official Distribution | Yes |
> | Force authentication | Yes |
> | Home Dir | `E:\SonarQube` |
> | Data Dir | `E:\SonarQube\var\sonarqube\data` |
> | Temp Dir | `E:\SonarQube\var\sonarqube\temp` |
> | Processors | `4` |
> 
> | Database | |
> | --- | --- |
> | Database | `Microsoft SQL Server` |
> | Database Version | `16.00.1000` |
> | Driver | `Microsoft JDBC Driver 11.2 for SQL Server` |
> | Driver Version | `11.2.2.0` |
> | Default transaction isolation | `TRANSACTION_READ_COMMITTED` |

# Path forward?

Any further recommendations would be very much appreciated. I’d really prefer to not have to delete all the projects, re-scan, and then have to re-do all of the previously resolved issues.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 15, 2023, 1:50pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/2 "2023-11-15T13:50:09Z")

</div>

Hi,

> [@mikeschlag](#):
>
> we have had to migrate data from our existing SonarQube Enterprise server (`9.2.4`) to a newly stood-up Enterprise server (`9.9 LTS`). During the migration, the new server was setup first with `9.9 LTS` before the data was moved over from the existing server.

_How_ did you migrate those projects?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 15, 2023, 2:11pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/3 "2023-11-15T14:11:06Z")

</div>

Fair question, I have that back to the person that did the migration and will update here once he gets in and gets that answered. I do know that the server was stood up first with v9.9 before the data was brought over, rather than copying the installation over and then doing upgrade processes (which is the mechanism that I recommended).

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 15, 2023, 6:23pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/4 "2023-11-15T18:23:15Z")

</div>

@ganncamp

Process was that the new server was stood up fresh with 9.9 and the other attendant software (MS SQL, etc.). Once it was created, the database from the original server was essentially copy/pasted to the new server.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 15, 2023, 6:30pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/5 "2023-11-15T18:30:30Z")

</div>

Hi,

So by copy/pasted, I’m going to read that as basically being a DB backup restore. And that’s a decent way to do it.

Nothing obvious is jumping out at me, so it’s time to see what your [server logs](https://docs.sonarqube.org/latest/setup/troubleshooting/) say.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 15, 2023, 9:05pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/6 "2023-11-15T21:05:38Z")

</div>

I got a copy of the logs and took an initial look through. Nothing super obvious is jumping out at me beyond some expired access tokens that I have now fixed, but were definitely not the cause (fixing the PATs didn’t change the project listing).

One other odd behavior that I’m seeing is that on the original server prior to migration, I had made a Portfolio to group together one program’s projects. On that one, I am able to see all the projects and everything looks happy.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/1/8167446dc4d2384d9b25e66384c605e19e0010f5.png)

On the new server, I see the same portfolio, but the last one tells me I don’t have permission and shows me a yellow triangle warning icon. If I try to click that project in the `Projects Management` view, SonarQube takes me to the login page and tells me I don’t have permissions, even if I try logging in again. On both server, I am part of the `sonar-administrators` group.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/1/4/1483cf7528c0847e2f3d7b293e636b5946152008.png)

In the `access.log` I see the following: `{IP REDACTED} - - [14/Nov/2023:07:35:44 -0800] "GET /api/views/projects_status?portfolio=PROJNAME&status=ERROR&ps=3 HTTP/1.1" 200 - "http://149.145.159.55:9000/portfolio?id=PROJNAME" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0" "AYvIo1Nybym6+iudAAGd"`

That is the only error I see there that’s not related to the PAT (which, again, is now resolved and should no longer show up).

This feels like some funky permissions issue, and I have tried including other folks into a newly-made group to see those projects, but no additional projects are seen even by them.

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 15, 2023, 9:18pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/7 "2023-11-15T21:18:18Z")

</div>

Following up on the previous post, as a test I tried unchecking the last project from the portfolio, and when I did that and clicked ‘Reload’ on that pane, it was no longer in the list. When I went to the ‘All’ view, that project was not visible to me. When I went back to `Projects Management` and clicked on the ‘gear’ icon, it gave me an option for `Restore Access`. When I clicked that, I was able to see the project in the portfolio view again to add, and when I added it, there’s no longer the yellow warning icon. When I go to the `Projects` page, _just that project is now also visible_, but none of the rest that had not displayed are showing.

In my mind this is further leaning in the direction of a funky permissions error, but the other projects in `Projects Management` do not give me the `Restore Access` option, only `Edit Permissions` or `Apply Permissions Template`. I have tried multiple things with permissions, including or excluding myself from groups other than `sonar-administrators` and `sonar-users`, but no changes have effect.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 16, 2023, 12:52pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/8 "2023-11-16T12:52:38Z")

</div>

Hi,

First, is there anything in your browser console when you’re looking at a page that is missing projects you should be able to see?

Second, did your method of authentication change from the old server to the new one?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 16, 2023, 1:11pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/9 "2023-11-16T13:11:50Z")

</div>

Ann,

I will check again, but after having seen something in another thread about that, I looked but didn’t see any errors.

Authentication-wise, the domain controller did change, though (visible) user IDs stayed the same and both domain controllers are Active Directory.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 16, 2023, 1:30pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/10 "2023-11-16T13:30:49Z")

</div>

Hi,

Barring errors in your browser console, I’m out of ideas. Let’s just cross that off, though, before I call for help.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 16, 2023, 3:33pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/11 "2023-11-16T15:33:08Z")

</div>

Ann,

I’m going to try a quick experiment this morning with another user who was on the original server. I’m going to remove them from the new server, log in “fresh” and assign them one of our groups, and see if that lets them see those projects. I will update here once I’ve gotten that complete, and at least rule in/out a AD permissions issue.

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 16, 2023, 5:45pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/12 "2023-11-16T17:45:37Z")

</div>

@ganncamp

Here’s the things I’ve now tried, with no success:

1. Remove an existing user, have them log in with their Active Directory credentials, assign them to various groups. No change.
2. Swap visibility on projects from private to public, disassociate with groups. No change.
3. Create a non-AD user, log in with separate browser (Edge instead of Chrome), assign to groups, cannot see public projects or private projects associated with groups. No change.

I also went back and looked at Chrome’s `Inspect` function, refreshed the page while at the base `Projects` view, and all the `GET` commands come back with a `200 OK`. I tested this in both Edge and Chrome, same behavior both ways with my admin (AD) and regular (non-AD) users.

Definitely stumped here.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 16, 2023, 6:17pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/14 "2023-11-16T18:17:14Z")

</div>

Hi,

Yeah, me too. I’ve flagged this for more expert eyes.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Matteo\_Mara](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/matteo_mara/32/63147_2.png) [@Matteo\_Mara](https://community.sonarsource.com/u/Matteo_Mara)\
**Post date:** [November 17, 2023, 2:12pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/16 "2023-11-17T14:12:03Z")

</div>

Hello @mikeschlag, I would like to gather more details on how the migration of the database was performed.

My understanding is that a 9.9LTS instance was made completely operational with no projects in it. Then the content of the original database (Related to a 9.2.4) got “copy/pasted” to the database already attached to the new 9.9 instance. Is that correct?

At which stage the database schema was migrated from 9.2.4 to 9.9? There are differences in the structures of the tables between these two versions, SonarQube performs the upgrade of the Database Schema at startup when it notices that it is based on an older version, was that the case even with this instance?

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 17, 2023, 2:25pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/17 "2023-11-17T14:25:52Z")

</div>

@Matteo_Mara @ganncamp

Woke up this morning to a nice surprise, and the server admin (who did the server standup and migration) figured out the issue. I’m waiting to hear back from him on what he did to get things working, and once I have that I will post here so that the solution is visible to all.

---

<div class="post-metadata">

**Author:** ![Matteo\_Mara](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/matteo_mara/32/63147_2.png) [@Matteo\_Mara](https://community.sonarsource.com/u/Matteo_Mara)\
**Post date:** [November 17, 2023, 2:29pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/18 "2023-11-17T14:29:11Z")

</div>

Thank you very much @mikeschlag for this news.  
Really looking forward to reading the solution.

---

<div class="post-metadata">

**Author:** ![mikeschlag](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mikeschlag](https://community.sonarsource.com/u/mikeschlag)\
**Post date:** [November 17, 2023, 2:56pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/19 "2023-11-17T14:56:38Z")

</div>

So it turns out that it apparently was related to ElasticSearch and whatever caching it had done. When he originally went to try to fix to clear out the directory (`%SONAR_HOME%\data`) there was nothing but a single folder that itself was empty (probably should have been a clue to us). This morning he dug in more to the configuration and found that the data folder was actually located for our install at `%SONAR_HOME%\var\sonarqube\data`. He stopped the server, cleared that out, started back up, and now everything displays as expected.

Glad it was a simple fix, and hopefully others in the future can use this as a reminder to go look in their configuration to see where that data is actually residing.

Appreciate your help and responsiveness @ganncamp and @Matteo_Mara!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [November 24, 2023, 2:58pm UTC](https://community.sonarsource.com/t/projects-not-listed-after-on-premises-enterprise-server-migration-and-version-upgrade/104258/21 "2023-11-24T14:58:49Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
