XCP-ng

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    "Cannot GET /" Error after update

    Xen Orchestra
    4
    11
    882
    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
      Pechkin000 last edited by

      Hi,

      I am wondering if there is anything I can do to fix this issue. After latest update I am having some sort of permission issue.
      My login screen looks like this:
      Annotation 2019-06-07 093316.jpg
      (no no graphics or theme) and once i login i just get a "Cannot GET /" in my browser.

      I would appreciate any guidance.

      Cheers

      1 Reply Last reply Reply Quote 0
      • Danp
        Danp Top contributor 💪 last edited by

        More details please. I'm assuming that you are building from source. What method did you use to update your XO VM? What OS? Node version?

        1 Reply Last reply Reply Quote 0
        • Danp
          Danp Top contributor 💪 last edited by

          FWIW, I just tried updating and did run into an issue. However, I suspect yours is caused by an incorrect Node version.

          If node -v returns something other than 8.16.0, then you should try switching to that version with the command n 8.16

          In my case, I get a spinning cursor after logging in. Checked the logs and found the following --

          Jun 07 20:26:58 ubuntutest xo-server[3780]: 2019-06-07T20:26:58.702Z - xo:api - [WARN] dan@mydomain.com | xo.getAllObjects(...) [4ms] =!> XoError: invalid parameters
          
          1 Reply Last reply Reply Quote 0
          • P
            Pechkin000 last edited by

            @Danp Thanks you for your reply
            I am sorry for not providing more info.
            My node version is indeed 8.16.0
            I am on debian stretch (9)
            I did update by building from source, essentially is this:

            cd /opt/xen-orchestra/
            sudo git pull --ff-only
            sudo yarn
            sudo yarn build
            

            I would appreciate any insight...

            1 Reply Last reply Reply Quote 0
            • Danp
              Danp Top contributor 💪 last edited by

              Did you happen to take a snapshot before performing the update? If so, restoring from that is probably your safest bet.

              1 Reply Last reply Reply Quote 0
              • P
                Pechkin000 last edited by

                Yeah I was hoping to avoid that, but just may have to do that. I have daily snapshots but they are taken and managed my the XOA, so gonna have to import it manually since i dont have access to the web interface.
                I know that i had similar issue a while back when i built it fro sources for the first time and the issue was slightly misformated config.yaml file. But that file is only there when you build for the first time, so I am not sure what can cause this now...

                1 Reply Last reply Reply Quote 0
                • P
                  peder last edited by

                  Did you remember to restart xo-server after the build had finished?

                  If you're compiling the new version in the same directory as the old one it's good practice to save a copy of the old one first, before doing the git pull.

                  borzel 1 Reply Last reply Reply Quote 0
                  • borzel
                    borzel XCP-ng Center Team 🏚️ @peder last edited by

                    @peder @Pechkin000 and stop xo-server before git/building.. with that I never had issues

                    1 Reply Last reply Reply Quote 0
                    • P
                      peder last edited by

                      Stopping xo-server before compiling shouldn't be necessary unless someone tries to use XO while it's building.

                      That said, I would recommend building the source under /usr/src or ~/src or something and then moving the files ( mv * ) to something like /opt/xen-orchestra-DATE (or git revision)

                      Then use "stow" to create symlinks in /usr/local, like this
                        stow -d   /opt/   -t   /usr/local   xen-orchestra-DATE

                      The stow command is in the CentOS repository or can be downloaded and compiled separately from any GNU mirror.

                      Make sure the /etc/xo-server/ config points to the relevant symlinks in /usr/local and restart xo-server

                      This way you can keep a number of different XO versions available in /opt and if there's a problem with any one of them you simply run
                        stow -D  -d  /opt  -t    /usr/local    xen-orchestra-BADVERSION
                      to delete the symlinks to the bad version and
                         stow -d   /opt   -t  /usr/local   xen-orchestra-GOODVERSION
                      to create links to the old, good one and then restart xo-server

                      When it's time to update the XO build go to the, now seemingly empty, source folder and run
                        git reset HEAD --hard
                      to repopulate the working directory and then
                        git pull && yarn && yarn build

                      borzel 1 Reply Last reply Reply Quote 1
                      • borzel
                        borzel XCP-ng Center Team 🏚️ @peder last edited by

                        @peder interessting way to do it, cool 🙂

                        1 Reply Last reply Reply Quote 0
                        • P
                          Pechkin000 last edited by

                          In case someone ran into the same problem here is how I solved it.
                          I had a feeling this was http mounts issue. I checked and looks like during update process the .xo-server.toml got deleted. I copied the sample one from the /opt/xen-orchestra/packages/xo-server/sample.config.toml , edited the http.mount and bob's your uncle.

                          I have a feeling this has something to do with the format of that file change. When I originally built from source the file has a slightly different syntax and it was called .xo-server.yaml. At least according tot he directions I used to build. In any case its all back to normal now.
                          Thanks you everyone for your help.

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