XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    XO5 breaks after defaulting to XO6 (from source)

    Scheduled Pinned Locked Moved Xen Orchestra
    53 Posts 7 Posters 1.5k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MathieuRAM Offline
      MathieuRA Vates 🪐 XO Team @probain
      last edited by

      @probain If you can, it will help a lot. Thanks

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        probain @MathieuRA
        last edited by

        @MathieuRA said in XO5 breaks after defaulting to XO6 (from source):

        @probain If you can, it will help a lot. Thanks

        I remember why I chose to use 8443. It is because the xo-user running the service isn't running with root privileges. So doing it with an ordinary user was way more difficult to setup than just use 8443.

        But...
        Switching over so that service-user runs as root. 443 becomes possible. And things work again as expected. However, I really did like not running xo-server as root.

        MathieuRAM 1 Reply Last reply Reply Quote 0
        • MathieuRAM Offline
          MathieuRA Vates 🪐 XO Team @probain
          last edited by

          @probain I will prepare a branch for a potential fix, so you can still use the 8443 port

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            probain @MathieuRA
            last edited by

            @MathieuRA said in XO5 breaks after defaulting to XO6 (from source):

            @probain I will prepare a branch for a potential fix, so you can still use the 8443 port

            Absolutely fantastic. I will test it as soon as possible to help out however I can.

            Cheers!

            MathieuRAM 1 Reply Last reply Reply Quote 0
            • MathieuRAM Offline
              MathieuRA Vates 🪐 XO Team @probain
              last edited by

              @probain branch mra-fix-secure-port 🤞

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                probain @MathieuRA
                last edited by

                @MathieuRA said in XO5 breaks after defaulting to XO6 (from source):

                @probain branch mra-fix-secure-port 🤞

                Success!! Amazing. Thank you so much

                1 Reply Last reply Reply Quote 1
                • A Offline
                  acebmxer
                  last edited by acebmxer

                  @mathieura

                  Maybe this has something to do with the script i used to install xo but i can not get v6 to be the default. The links going from v6 to v5 work but just defaults to v5 and accessing. i use port 443 for xo and i do use a proxy.

                  from the config.toml file

                  [http.mounts]
                  164 # Uncomment to setup a default version.
                  165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                  166 # '/' = '../xo-web/dist/'
                  167 
                  168 '/' = '../xo-web/dist/'
                  169 '/v6' = '../../@xen-orchestra/web/dist/'
                  170 
                  171 [http.proxies]
                  172 # [port] is used to reuse the same port declared in [http.listen.0]
                  173 '/v5/api' = '[protocol]//localhost:[port]/api'
                  174 '/v5/api/updater' = 'ws://localhost:9001'
                  175 '/v5/rest' = 'http://localhost:[port]/rest'
                  

                  Screenshot 2025-12-16 183125.png

                  this config breaks everything. Nothing works.

                  [http.mounts]
                  164 # Uncomment to setup a default version.
                  165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                  166 # '/' = '../xo-web/dist/'
                  167 
                  168 '/v6' = '../xo-web/dist/'
                  169 '/' = '../../@xen-orchestra/web/dist/'
                  170 
                  171 [http.proxies]
                  172 # [port] is used to reuse the same port declared in [http.listen.0]
                  173 '/v5/api' = '[protocol]//localhost:[port]/api'
                  174 '/v5/api/updater' = 'ws://localhost:9001'
                  175 '/v5/rest' = 'http://localhost:[port]/rest'
                  

                  Original config

                  [http.mounts]
                  164 # Uncomment to setup a default version.
                  165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                  166 # '/' = '../xo-web/dist/'
                  167 
                  168 '/v5' = '../xo-web/dist/'
                  169 '/v6' = '../../@xen-orchestra/web/dist/'
                  170 
                  171 [http.proxies]
                  172 # [port] is used to reuse the same port declared in [http.listen.0]
                  173 '/v5/api' = '[protocol]//localhost:[port]/api'
                  174 '/v5/api/updater' = 'ws://localhost:9001'
                  175 '/v5/rest' = 'http://localhost:[port]/rest'
                  
                  MathieuRAM 2 Replies Last reply Reply Quote 0
                  • MathieuRAM Offline
                    MathieuRA Vates 🪐 XO Team @acebmxer
                    last edited by

                    @probain Thanks for your test

                    @acebmxer Can you try with the original config please?

                    1 Reply Last reply Reply Quote 0
                    • MathieuRAM Offline
                      MathieuRA Vates 🪐 XO Team @acebmxer
                      last edited by

                      @acebmxer
                      The first configuration file you show exposes XO5 by default and exposes XO6 on the v6 endpoint
                      The second configuration file doesn't work because you expose XO5 on the v6 endpoint, but your proxies still point to v5 (changing your proxies to /v6/api, /v6/api/updater and /v6/rest should work, but it seems weird to expose XO5 on a v6 endpoint)
                      The original config exposes XO5 on v5, XO6 on v6 and /

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        acebmxer @MathieuRA
                        last edited by

                        @MathieuRA

                        Yeah i dont understand why this is not working or why it is working the way it is.

                        With this config below. Still defaults to v5 but links going to v6 and back to v5 work but defaults to v5. I do get a different login screen. I have also tried accessing via ip versus via proxy, same difference. I have tried to reach out to the creator of the script but waiting for their reply back.

                        [http.mounts]
                        164 # Uncomment to setup a default version.
                        165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                        166 # '/' = '../xo-web/dist/'
                        167 
                        168 '/' = '../xo-web/dist/'  
                        169 '/v6' = '../../@xen-orchestra/web/dist/'
                        170 
                        171 [http.proxies]
                        172 # [port] is used to reuse the same port declared in [http.listen.0]
                        173 '/v6/api' = '[protocol]//localhost:[port]/api'
                        174 '/v6/api/updater' = 'ws://localhost:9001'
                        175 '/v6/rest' = 'http://localhost:[port]/rest'
                        

                        Screenshot 2025-12-17 054633.png

                        Screenshot 2025-12-17 054918.png
                        Screenshot 2025-12-17 055003.png

                        Screenshot 2025-12-17 055036.png

                        MathieuRAM 1 Reply Last reply Reply Quote 0
                        • MathieuRAM Offline
                          MathieuRA Vates 🪐 XO Team @acebmxer
                          last edited by

                          @acebmxer
                          Just update your config as bellow

                          [http.mounts]
                          164 # Uncomment to setup a default version.
                          165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                          166 # '/' = '../xo-web/dist/'
                          167 
                          168 '/v5' = '../xo-web/dist/'  
                          169 '/' = '../../@xen-orchestra/web/dist/'
                          170 
                          171 [http.proxies]
                          172 # [port] is used to reuse the same port declared in [http.listen.0]
                          173 '/v5/api' = '[protocol]//localhost:[port]/api'
                          174 '/v5/api/updater' = 'ws://localhost:9001'
                          175 '/v5/rest' = 'http://localhost:[port]/rest'
                          
                          
                          A 1 Reply Last reply Reply Quote 0
                          • A Offline
                            acebmxer @MathieuRA
                            last edited by acebmxer

                            @MathieuRA

                            I appriciate your assistance with this but broke everything.... no /v5 or /v6 responce.

                            Anyone using this script - https://github.com/ronivay/XenOrchestraInstallerUpdater able to get this working with v6 as default?

                            Screenshot 2025-12-17 111851.png

                            [http.mounts]
                            164 # Uncomment to setup a default version.
                            165 # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                            166 # '/' = '../xo-web/dist/'
                            167                                                                                                                                                          
                            168 '/v5' = '../xo-web/dist/'                                                                                                                                
                            169 '/' = '../../@xen-orchestra/web/dist/'
                            170 
                            171 [http.proxies]
                            172 # [port] is used to reuse the same port declared in [http.listen.0]
                            173 '/v5/api' = '[protocol]//localhost:[port]/api'
                            174 '/v5/api/updater' = 'ws://localhost:9001'
                            175 '/v5/rest' = 'http://localhost:[port]/rest'
                            
                            M 1 Reply Last reply Reply Quote 0
                            • M Offline
                              MajorP93 @acebmxer
                              last edited by MajorP93

                              Hey,

                              I am not using the XenOrchestraInstallerUpdater script by ronivay but the XO docker container made by the same author: https://github.com/ronivay/xen-orchestra-docker

                              When using a XO commit after XO 6 became the default all the links to XO 5 do not work anymore.
                              XO 6 is the default and appears to be working (at least the pages that have been ported to XO 6 already) but when trying to access XO 5 via url/v5 I get infinite loading / spinning wheel.

                              When following the official documentation steps for making XO 5 default (https://docs.xen-orchestra.com/configuration#making-xo-5-the-default-ui) I get the same issue that was already mentioned in this thread (error "Cannot get /").

                              By following the official documentation I mean applying the following:

                              [http.mounts]
                              '/v6' = '../../@xen-orchestra/web/dist/'
                              '/' = '../xo-web/dist/'
                              
                              [http.proxies]
                              '/v5/api' = 'ws://localhost:9000/api'
                              '/v5/api/updater' = 'ws://localhost:9001'
                              '/v5/rest' = 'http://localhost:9000/rest'
                              

                              I tried this using latest commit (d9fe9b603fa9c8d668fa90486ae12fe7ad49b257).

                              For now I had to revert to the commit before XO 6 was made the default.

                              P.S. (in case this is related): I enabled SSL encryption by setting the following in XO configuration:

                              [http]
                              redirectToHttps = true
                              
                              [[http.listen]]
                              port = 443
                              autoCert = true
                              cert = '/cert.pem'
                              key = '/cert.key'
                              
                              MathieuRAM 2 Replies Last reply Reply Quote 0
                              • MathieuRAM Offline
                                MathieuRA Vates 🪐 XO Team @MajorP93
                                last edited by

                                @acebmxer Can you provide me with the logs from xo-server at its launch?

                                A 1 Reply Last reply Reply Quote 0
                                • MathieuRAM Offline
                                  MathieuRA Vates 🪐 XO Team @MajorP93
                                  last edited by MathieuRA

                                  @MajorP93 various fixes have been performed on master.

                                  Your config file should look like this

                                  [http.mounts]
                                  # Uncomment to setup a default version.
                                  # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                                  # '/' = '../xo-web/dist/'
                                  
                                  '/v5' = '../xo-web/dist/'
                                  '/v6' = '../../@xen-orchestra/web/dist/'
                                  
                                  [http.proxies]
                                  # [port] is used to reuse the same port declared in [http.listen.0]
                                  '/v5/api' = '[protocol]//localhost:[port]/api'
                                  '/v5/api/updater' = 'ws://localhost:9001'
                                  '/v5/rest' = 'http://localhost:[port]/rest'
                                  

                                  If you are using a different configuration file that overrides the default configuration, please verify that the paths to xo-5 and xo-6 are correct. You can use absolute paths if necessary.

                                  M 1 Reply Last reply Reply Quote 1
                                  • A Offline
                                    acebmxer @MathieuRA
                                    last edited by

                                    @MathieuRA said in XO5 breaks after defaulting to XO6 (from source):

                                    @acebmxer Can you provide me with the logs from xo-server at its launch?

                                    Here you go. I made the changes you last suggested to me then I did a restart - sudo systemctl restart xo-server

                                    before change-log.txt
                                    after change-log.txt

                                    Let me know if i did that correctly or if you need more information.

                                    MathieuRAM 1 Reply Last reply Reply Quote 0
                                    • MathieuRAM Offline
                                      MathieuRA Vates 🪐 XO Team @acebmxer
                                      last edited by MathieuRA

                                      @acebmxer I want logs from the journalctl.
                                      sudo systemctl restart xo-server
                                      sudo journalctl -fu xo-server

                                      A 1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        acebmxer @MathieuRA
                                        last edited by

                                        @MathieuRA

                                        Again thank you so much for you time trying to assist with this. The script OP has responded and updated the script to work correctly now.

                                        Again thank to all Vates staff for all the hard work you do that goes unnoticed.

                                        MathieuRAM 1 Reply Last reply Reply Quote 2
                                        • MathieuRAM Offline
                                          MathieuRA Vates 🪐 XO Team @acebmxer
                                          last edited by

                                          @acebmxer
                                          Perfect.
                                          Thank you all as well! Early testing and feedback are very precious to us.

                                          1 Reply Last reply Reply Quote 1
                                          • M Offline
                                            MajorP93 @MathieuRA
                                            last edited by

                                            @MathieuRA said in XO5 breaks after defaulting to XO6 (from source):

                                            @MajorP93 various fixes have been performed on master.

                                            Your config file should look like this

                                            [http.mounts]
                                            # Uncomment to setup a default version.
                                            # Otherwise, XO5 will be the default for stable channel and XO6 for latest and source
                                            # '/' = '../xo-web/dist/'
                                            
                                            '/v5' = '../xo-web/dist/'
                                            '/v6' = '../../@xen-orchestra/web/dist/'
                                            
                                            [http.proxies]
                                            # [port] is used to reuse the same port declared in [http.listen.0]
                                            '/v5/api' = '[protocol]//localhost:[port]/api'
                                            '/v5/api/updater' = 'ws://localhost:9001'
                                            '/v5/rest' = 'http://localhost:[port]/rest'
                                            

                                            If you are using a different configuration file that overrides the default configuration, please verify that the paths to xo-5 and xo-6 are correct. You can use absolute paths if necessary.

                                            Thanks!
                                            I tried your approach but it did not fix the issue.
                                            The maintainer of the Docker container (ronivay) was able to narrow the issue down to users that let XO handle http to https redirection and SSL encryption.

                                            For now I made Xen Orchestra listen on port 80 only and disabled http to https redirection.
                                            I use Traefik as reverse proxy now and let it handle those parts.

                                            With that setup it works without any issues.

                                            Maybe at some point somebody could further investigate wether or not http to https redirection in combination with SSL encryption is broken after XO 6 became the default.

                                            Would be interesting to see if this issue occurs for non-docker users aswell.

                                            A MathieuRAM 3 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post