# Upgrade Rocky Linux 8 to Rocky Linux 9 fails with The repository mapping file is invalid

**URL:** <https://forums.rockylinux.org/t/upgrade-rocky-linux-8-to-rocky-linux-9-fails-with-the-repository-mapping-file-is-invalid/14280>\
**Category:** Rocky Linux Help & Support\
**Tags:** unsupported\
**Created:** [May 28, 2024, 1:35am UTC](https://forums.rockylinux.org/t/upgrade-rocky-linux-8-to-rocky-linux-9-fails-with-the-repository-mapping-file-is-invalid/14280 "2024-05-28T01:35:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpora007](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@mpora007](https://forums.rockylinux.org/u/mpora007)\
**Post date:** [May 28, 2024, 1:35am UTC](https://forums.rockylinux.org/t/upgrade-rocky-linux-8-to-rocky-linux-9-fails-with-the-repository-mapping-file-is-invalid/14280/1 "2024-05-28T01:35:46Z")

</div>

Trying to follow instructions from [CentOS 7 End of Life - Migrate to Rocky Linux 9](https://www.tecmint.com/migrate-centos-to-rocky-linux/). Upgrade from Centos 7 to Rocky 8 was successful but then from 8 to 9, after leapp preupgrade, I get:

Actor: repository\_mapping  
Message: The repository mapping file is invalid: the JSON does not match required schema (wrong field type/value): The value of “mapping” field is None, but this is not allowed  
Summary:  
Hint: Read documentation at the following link for more information about how to retrieve the valid file: [Leapp utility metadata in-place upgrades of RHEL for disconnected upgrades (including Satellite) - Red Hat Customer Portal](https://access.redhat.com/articles/3664871)

I don´t have access to the mentioned URL.

log:  
2024-05-27 14:07:05.746 DEBUG PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: File /etc/leapp/files/pes-events.json successfully read (1917066 bytes)  
2024-05-27 14:07:05.781 DEBUG PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: The following target system packages will not be installed:

2024-05-27 14:07:05.784 WARNING PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Cannot determine the representative target base repository.  
2024-05-27 14:07:05.785 INFO PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping  
2024-05-27 14:07:05.787 WARNING PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Cannot determine the representative target base repository.  
2024-05-27 14:07:05.788 INFO PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping  
2024-05-27 14:07:05.790 WARNING PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Cannot determine the representative target base repository.  
2024-05-27 14:07:05.792 INFO PID: 44113 leapp.workflow.FactsCollection.pes\_events\_scanner: Fallback: Create an artificial representative PESIDRepositoryEntry for the repository mapping  
2024-05-27 14:07:05.803 INFO PID: 41285 leapp.workflow.FactsCollection: Executing actor setuptargetrepos  
2024-05-27 14:07:05.894 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Custom repos: [‘rocky9-baseos’, ‘rocky9-appstream’, ‘rocky9-crb’, ‘rocky9-ha’, ‘rocky9-resilient-storage’, ‘rocky9-extras’]  
2024-05-27 14:07:05.896 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Vendor repos:   
2024-05-27 14:07:05.896 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Used repos: dict\_keys()  
2024-05-27 14:07:05.898 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Enabled repos: [‘extras’, ‘elevate’, ‘baseos’, ‘appstream’]  
2024-05-27 14:07:05.899 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Mapped repos: set()  
2024-05-27 14:07:05.900 DEBUG PID: 44162 leapp.workflow.FactsCollection.setuptargetrepos: Expected repos: dict\_keys()  
2024-05-27 14:07:05.911 INFO PID: 41285 leapp.workflow.FactsCollection: Starting stage After of phase FactsCollection  
2024-05-27 14:07:05.914 INFO PID: 41285 leapp.workflow: Workflow interrupted due to the FailPhase error policy

Thanks.

---

<div class="post-metadata">

**Author:** ![Aas](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/aas/32/4579_2.png) [@Aas](https://forums.rockylinux.org/u/Aas)\
**Post date:** [July 24, 2024, 12:33pm UTC](https://forums.rockylinux.org/t/upgrade-rocky-linux-8-to-rocky-linux-9-fails-with-the-repository-mapping-file-is-invalid/14280/2 "2024-07-24T12:33:21Z")

</div>

I’ve tried to replace the files from the RedHat access source, but to no avail.  
But, this helped me in the same situation:

```auto
dnf remove leapp-data-rockylinux
rm /etc/leapp/files/*.json
dnf install leapp-data-rockylinux

```

May help you too.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [September 22, 2024, 12:34pm UTC](https://forums.rockylinux.org/t/upgrade-rocky-linux-8-to-rocky-linux-9-fails-with-the-repository-mapping-file-is-invalid/14280/3 "2024-09-22T12:34:01Z")

</div>

Closed on September 22, 2024, 12:34pm UTC

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