After new install from source, unable to log in

After cloning the latest code from source, compiling, installing and setting up, can get the Sunstone UI, but when I try to log in, I get the following in the sunstone logs.

indent preformatted text by 4 spaces
==> /var/log/one/sunstone.log <==
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET / HTTP/1.1" 200 - 0.0085
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /css/login.css HTTP/1.1" 200 - 0.0049
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /dist/login.js HTTP/1.1" 401 - 0.0039
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /images/ajax-loader.gif HTTP/1.1" 200 - 0.0027
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /images/opennebula-sunstone-v4.0.png HTTP/1.1" 200 - 0.0572
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /images/panel.png HTTP/1.1" 200 - 0.0559
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /images/login.png HTTP/1.1" 200 - 0.0542
Mon Jul 20 00:17:06 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:06 -0700] "GET /images/favicon.ico HTTP/1.1" 200 - 0.0012
Mon Jul 20 00:17:14 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:14 -0700] "GET /images/login_over.png HTTP/1.1" 200 - 0.0047
Mon Jul 20 00:17:15 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:15 -0700] "GET /?username=oneadmin&password=oneadmin HTTP/1.1" 200 - 0.0111
Mon Jul 20 00:17:15 2015 [I]: 10.0.0.14 - - [20/Jul/2015:00:17:15 -0700] "GET /dist/login.js HTTP/1.1" 401 - 0.0016

I’m never able to log into the UI as it never passes the login screen. My time is synced and it is up to date, just in case you think the issue may be the difference between the time on my client and the server.

Moving the login.js file from app in /usr/lib/one/sunstone/public to dist does not fix the issue. Though I would no longer see a 401 for login.js. Here is the version of the code I’m using:

heads/master-0-gecb8d5d

I’m running this on a CentOS 6.6 x86_64 server.

Thanks for your help in advance.

Hello Jesus Malena,

Do command line tools works? like onedatastore list returning the datastores.

If it work try logging in with the pasword written in file ~oneadmin/.one/one_auth.
IMHO on fresh install the password for oneadmin is autogenerated.

I hope this helps.

Anton Todorov

Hi Jesus,

Did you follow the steps explained in the following readme?

The sunstone dependencies have to be downloaded using bower and after that you have to minifiy the js files (scons sunstone=yes).

Hope this helps

Hi Daniel,

I guess this was something new introduced just recently? Never had to do this before. I have a build from June which works without these steps. I’ll try these and see if everything works.

Anton, thanks for the reply. I always create the one_auth file for the one admin user before installation and DB initialization. This would afford me the definite ability to set the one admin password before. Does the install no longer post attention to the one_auth file created in the .one directory for the oneadmin user?

Jesus

Honestly I do not know. There are a lot of changes in the upcoming 4.14 and a lot of work is in progress. So anything can be changed or broken from time to time…

Cheers
Anton

Hi Daniel,

Thanks for the information. This worked.

Will this be required in future builds, or should I go with RPMs from Epel for now? I only ask because, I’ve had issues in the past with RPMs and it seemed to me at the time when I first installed OpenNebula from source, the install was more straight forward and stable. It seems with this minified (I think this fixed was introduced due to an issue in Debian) process dependency, the installation is more complex and prone to errors. Is this something the Devs are in the process of cleaning up to make the install simpler, or this is just the norm if you are building from source from now and into the future?

Also for those of you who want to also do this please install nodejs and npm on CentOS by running the following:

curl -sL https://rpm.nodesource.com/setup | bash -

yum install -y nodejs

Thanks

These steps will be required if you are running Sunstone from source. The packages will include the minified files and dependencies.