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

    XO5 breaks after defaulting to XO6 (from source)

    Scheduled Pinned Locked Moved Xen Orchestra
    9 Posts 3 Posters 60 Views 3 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.
    • P Offline
      probain
      last edited by

      XO from source
      Problem: XO5 is disconnected and stuck on "Still Loading" (see picture below)
      When trying later commits after XO6 became default. XO5 has broken entirely. And I have not been able to solve this yet.

      Troubleshooting steps are the following:

      git reset --hard <commit hash>
      rm node_modules/ -rf
      yarn
      yarn build
      

      Whilst XO6 is working as expected. There are lots of functions that need XO5. Which is why I haven't noticed this until just now (today).

      Last known good Commit: 4b4c9b91f3722401a7d3eb2eaf549980fd2f3e5b
      This is also where I had XO6 in preview mode and XO5 working perfectly fine next to each other.

      Screenshots:

      • Still Loading
        3c3292a1-a326-4cab-b69c-6016868bceeb-image.png
      P 1 Reply Last reply Reply Quote 0
      • P Online
        ph7 @probain
        last edited by

        @probain Well I’ve been running commit 035ee for a few days now and haven't had any problems. But haven't done a lot of work with it.

        When I update, I always run some kind of full/complicated update since I've had some problems before and with this type of update I've never had any issues.

        sudo su
        nvm install 22 && npm install --global yarn && cd ~/xen-orchestra/ && git checkout . && git pull --ff-only && yarn && yarn build --force && yarn run turbo run build --filter @xen-orchestra/web && systemctl restart xo-server.service && cd && systemctl daemon-reload
        

        Or maybe just a simple CTRL F5 in Your browser will work 🙂

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

          Same problem for me to.
          The configuration file is like below, now. If I click on v6 from v5 it works but not the other way around.
          And the links always go to /v5, but if v5 is the default what's the point?
          I think that's the problem, instead of taking into account the config for the base they are explicitly passed in the links.

          The config

          [http]
          
          [http.cookies]
          
          [[http.listen]]
          port = 443
          cert = '/opt/ssl-local/fullchain.pem'
          key = '/opt/ssl-local/privkey.pem'
          
          [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'
          
          [redis]
          
          [remoteOptions]
          
          [plugins]
          

          The problem with /v5

          b97eb845-a70b-43fb-8f7b-2ece31de7b4e-image.png

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

            I fired up my 2nd XO wich is a ronivay script version.
            Ran the update to latest commit 9f387
            When I logged in, It start in the XO5 page
            In my 1st XO "from docs", It start in the XO6

            Maybe ronivay is not up to date with the new #release" of XO6
            If You are running this type script, maybe that is the culprit

            GheppyG 1 Reply Last reply Reply Quote 0
            • 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 Online
                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 Online
                  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]
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post