I’m building 5.6-beta1 from sources, using the build scripts from the one/packages repo. I was doing this with 5.4.x and it was fine.
But with 5.6-beta1, sunstone daemon fails to start because it can’t find /usr/lib/one/sunstone/public/dist/main-dist.js:
Jul 10 08:27:57 node01.in.noisy.linuxed.net ruby[27633]: :session_expire_time=>3600}
Jul 10 08:27:57 node01.in.noisy.linuxed.net ruby[27633]: --------------------------------------
Jul 10 08:27:58 node01.in.noisy.linuxed.net ruby[27633]: /usr/lib/one/ruby/OpenNebulaAddons.rb:29:in `initialize': No such file or directory - /usr/lib/one/sunstone/public/dist/main-dist.js (Errno::ENOENT)
Jul 10 08:27:58 node01.in.noisy.linuxed.net ruby[27633]: from /usr/lib/one/ruby/OpenNebulaAddons.rb:29:in `new'
Jul 10 08:27:58 node01.in.noisy.linuxed.net ruby[27633]: from /usr/lib/one/ruby/OpenNebulaAddons.rb:29:in `initialize'
Jul 10 08:27:58 node01.in.noisy.linuxed.net ruby[27633]: from /usr/lib/one/sunstone/sunstone-server.rb:198:in `new'
Jul 10 08:27:58 node01.in.noisy.linuxed.net ruby[27633]: from /usr/lib/one/sunstone/sunstone-server.rb:198:in `<main>'
Jul 10 08:27:58 node01.in.noisy.linuxed.net systemd[1]: opennebula-sunstone.service: main process exited, code=exited, status=1/FAILURE
Jul 10 08:27:58 node01.in.noisy.linuxed.net systemd[1]: Unit opennebula-sunstone.service entered failed state.
Jul 10 08:27:58 node01.in.noisy.linuxed.net systemd[1]: opennebula-sunstone.service failed.
If I add a symlink from main-dist.js to main.js in the same directory sunstone starts. I can then access the login page, but when I log in, the dashboard endlessly loads. Can’t use sunstone. Firefox debug tools don’t show any error. I can see that main.js (and not main-dist.js) is used.
Do you have any idea ?
Best regards,
Edouard
Versions of the related components and OS (frontend, hypervisors, VMs):
CentOS 7, RPM build from sources, tag 5.6-beta1
Steps to reproduce:
Install RPM
run install_gems
start opennebula & opennebula-sunstone services
Current results:
Fails to start sunstone because main-dist.js is missing
Expected results:
Sunstone service should start. And sunstone UI should work.
Ok I will try to use the install.sh before or during the build of the RPMs. The /usr/lib/one/sunstone/public/dist/main.js is here but empty. But even with the right content, I’m still stuck on a loading page after loging in.
Well, I’ve just tried without nginx to be sure it’s not part of the problem. Direct access on sunstone via port 9869 does the same. I can log in, than just the loading gif on a blank page.
I think all of this might be related to issue 2238, and since 5.5.90 tag in the git seems to be anterior to the fix, I’m stuck. So I’m waiting for the next tag.
ReferenceError: require is not defined[Learn More] main.js:17:1
<anonymous> http://one.lan/dist/main.js:17:1
it seems that requireJS is not installed, but now in 5.6.*, if you install from source, the new sunstone scons install all the dependencies … it’s strange because I can’t reproduce it.
I tried to build RPMs from source(tag 5.6.2 of one repo) following the instruction of the packages repo(tag 5.6.2), and encountered the same issue as you did:
You should replace the procedure for building sunstone following the guide in src/sunstone/public/README.md (well slightly modified though). The packages procedure should be changed to:
# sunstone
cd src/sunstone/public
./build.sh -d
export PATH=$PATH:$PWD/node_modules/.bin
./build.sh
rm -rf node_modules/
cd ../../../../