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

    XO5 breaks after defaulting to XO6 (from source)

    Scheduled Pinned Locked Moved Xen Orchestra
    36 Posts 6 Posters 337 Views 5 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.
    • GheppyG Offline
      Gheppy @ph7
      last edited by Gheppy

      @ph7

      I don't run any scripts, I install according to the documentation.

      nodejs 22

      npm install -g npm
      git clone -b master https://github.com/vatesfr/xen-orchestra
      cp xo-server.toml  /opt/xen-orchestra/packages/xo-server/.xo-server.toml
      cd /opt/xen-orchestra
      yarn
      yarn build
      # XO6
      yarn run turbo run build --filter @xen-orchestra/web
      yarn cache clean
      systemctl restart xo-server
      

      The last compilation (b667bc8) works perfectly, this version is fine too, except for the links from v6 to v5 which are many.
      In my opinion, v6 is not yet ready to be the default, too many links to v5..

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        ph7 @Gheppy
        last edited by

        @Gheppy
        My links from 6 to 5 works fine
        Haven’t tested all of them of course, but quit a few and none of them have faild

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

          I'm not running https and still on node v22

          GheppyG 1 Reply Last reply Reply Quote 0
          • GheppyG Offline
            Gheppy @ph7
            last edited by Gheppy

            @ph7
            On http it works, but without the lines below (those with /v5) in the config. On https it is the problem and it shouldn't be.

            ...
            # List of files/directories which will be served.
            [http.mounts]
            '/v6' = '../../@xen-orchestra/web/dist/'
            '/' = '../xo-web/dist/'
            
            # List of proxied URLs (HTTP & WebSockets).
            [http.proxies]
            #'/v5/api' = 'ws://localhost:9000/api'
            #'/v5/api/updater' = 'ws://localhost:9001'
            #'/v5/rest' = 'http://localhost:9000/rest'
            ...
            
            GheppyG 1 Reply Last reply Reply Quote 0
            • GheppyG Offline
              Gheppy @Gheppy
              last edited by

              I managed to get it working, although the solution is not exactly to my liking.
              I enabled both 80 and 443

              [http]
              
              [[http.listen]]
              port = 80
              
              [[http.listen]]
              port = 443
              cert = '/opt/ssl-local/fullchain.pem'
              key = '/opt/ssl-local/privkey.pem'
              
              # CRITICAL WEBSOCKET CONFIGURATION
              [http.upgrade]
              '/v5/api' = true
              '/v5/api/updater' = true
              
              # Make sure these routes are allowed for WebSocket upgrade
              [http.routes]
              '/v5/api' = { upgrade = true }
              '/v5/api/updater' = { upgrade = true }
              
              # List of files/directories which will be served.
              [http.mounts]
              '/v6' = '../../@xen-orchestra/web/dist/'
              '/' = '../xo-web/dist/'
              
              [redis]
              
              [remoteOptions]
              
              [plugins]
              
              
              MathieuRAM 2 Replies Last reply Reply Quote 0
              • MathieuRAM Offline
                MathieuRA Vates 🪐 XO Team @Gheppy
                last edited by

                @Gheppy If I understand correctly, when you click the XO5 link from XO6, you are redirected to <url>/v5?

                If so, this appears to be a bug, because according to your configuration file, your XO5 instance is located at the root (/).

                can you fetch this endpoint please? /rest/v0/gui-routes

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

                  I've identified various issues with proxied URLs. I'm on it

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

                    @probain @Gheppy Can you please try this branch mra-fix-proxies?

                    D GheppyG 2 Replies Last reply Reply Quote 0
                    • D Offline
                      dpanegassi @MathieuRA
                      last edited by

                      @MathieuRA I was with the same problem, the branch mra-fix-proxies fixed it for me, now i can acess the V5 correctly

                      1 Reply Last reply Reply Quote 1
                      • GheppyG Offline
                        Gheppy @MathieuRA
                        last edited by

                        @MathieuRA
                        I also confirm that it works. Thank you

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

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

                          mra-fix-proxies

                          Confirm test branch works... This is with Ronivay's script. Include_V6 option is set to false in config file. Maybe that is why it still defaults to v5. At least all links work now...

                          Screenshot 2025-12-15 190921.png

                          Screenshot 2025-12-15 190657.png

                          Screenshot 2025-12-15 190719.png

                          Screenshot 2025-12-15 190739.png

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

                            Thank you all for your feedback!

                            A 1 Reply Last reply Reply Quote 2
                            • A Online
                              acebmxer @MathieuRA
                              last edited by

                              @MathieuRA

                              Just updated to the current commit 7c176. And all is working as in test commit. Question what is needed now to make v6 the default? Still as previously or has anything changed this last commit?

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

                                @acebmxer the procedure remains the same

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

                                  @MathieuRA

                                  Unfortunately this didn't solve it for me.
                                  But I am behind a haproxy for this., yes. However I haven't been able to get this to work. Even when I did the same "fixes" that helped my second lab.

                                  Is there anything I could provide to maybe help out? Which logs would be helpfull?

                                  Thank you

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

                                    @probain Do you have a configuration file that overrides xo-server configuration for [http.mounts] and [http.proxies]?
                                    `

                                    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 Do you have a configuration file that overrides xo-server configuration for [http.mounts] and [http.proxies]?
                                      `

                                      Adding the following, breaks XO6 ("Cannot get /"). And XO5 still is stuck on "Still Loading.

                                      [http.upgrade]
                                      '/v5/api' = true
                                      '/v5/api/updater' = true
                                      
                                      [http.routes]
                                      '/v5/api' = { upgrade = true }
                                      '/v5/api/updater' = { upgrade = true }
                                      
                                      # List of files/directories which will be served.
                                      [http.mounts]
                                      #'/any/url' = '/path/to/directory'
                                      '/v6' = '../../@xen-orchestra/web/dist/'
                                      '/' = '../xo-web/dist/'
                                      

                                      If you're curious as to how I set everything up. I use my ansible-role (shared previously).
                                      Link for reference: https://github.com/cloudrootab/ansible_role_xoce/

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

                                        @probain Do you have any xo-server logs?

                                        can you fetch /rest/v0/gui-routes endpoint?

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

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

                                          @probain Do you have any xo-server logs?

                                          can you fetch /rest/v0/gui-routes endpoint?

                                          This is what results on the page

                                          {
                                            "xo5": "/v5",
                                            "xo6": "/v6"
                                          }
                                          
                                          MathieuRAM 1 Reply Last reply Reply Quote 0
                                          • MathieuRAM Offline
                                            MathieuRA Vates 🪐 XO Team @probain
                                            last edited by

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

                                            P 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post