Why do Captain Aldis' men attack me on sight?

I am not quite sure which quest or which action might have started this, but this is what happens right now:
I enter Solitude (through the door at the foot of the cliff) and walk towards the slope leading up to the Fletcher and the Blacksmith. I can interact with the regular Solitude Guards without any problems, but as soon as I walk through the arch between the Fletcher and the Blacksmith and enter the courtyard, the "special" Solitude Guards standing in front of the big door on the left spot me and attack me. After that, all the regular Guards also attack me.
I have no bounty on me in any of the holds, and the Guards do not even give me an option to surrender.
Why do the Guards in the Solitude Courtyard attack me on sight, and how can I stop it (preferably without violence)?
Pictures about "Why do Captain Aldis' men attack me on sight?"



How do I stop guards from attacking me Skyrim?
Here are the standard approaches.Why is everyone attacking me in Skyrim?
This is said to be due to a thief being in town when you arrive. Surrendering to a guard should fix this. To surrender, sheath your weapon and try talking to them. Holding block should help if they won't talk normally.Why am I being attacked in Understone keep?
It's a glitch. if you do the conspiracy quest you will have a bounty that you are unable to get rid of or serve time for and makes every visit to markarth a bloody battle.Is Captain Aldis important?
Captain Aldis however is marked as essential unless the Dragonborn comes onto the execution platform. Therefore, it is possible for Captain Aldis to go into the bleed out position without a head, and eventually act as a headless NPC.Captain Aldis: What do you think you're doing?.. Skyrim Special Edition
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Joe Ambrogio, cottonbro, Pixabay, @joagbriel