描述:
[oneadmin@opennebula ~]$ sunstone-server start
Error executing sunstone-server.
Check /srv/cloud/one/var/sunstone.error and /srv/cloud/one/var/sunstone.log for more information
[oneadmin@opennebula ~]$ more /srv/cloud/one/var/sunstone.log
--------------------------------------
Server configuration
--------------------------------------
{:lang=>"en_US",
:vnc_proxy_cert=>nil,
:auth=>"sunstone",
:vnc_proxy_key=>nil,
:vnc_proxy_path=>"/srv/cloud/one/share/websockify/websocketproxy.py",
:vnc_proxy_support_wss=>false,
:marketplace_url=>"https://marketplace.c12g.com/appliance",
:tmpdir=>"/var/tmp",
:vnc_proxy_port=>29876,
:one_xmlrpc=>"http://localhost:2633/RPC2",
:host=>"0.0.0.0",
:core_auth=>"cipher",
:debug_level=>3,
:port=>9869}
Thu Sep 26 15:06:30 2013 [E]: Error initializing authentication system
Thu Sep 26 15:06:30 2013 [E]: No such file or directory - /srv/cloud/one/var/.one/sunstone_auth
Solution:
原因是mysql opennebula里面记录了sunstone的验证信息,删除opennebula数据库,并重建数据库即可;
#mysql -uroot -ppassword
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| opennebula |
+--------------------+
3 rows in set (0.00 sec)
mysql> drop database opennebula;
Query OK, 17 rows affected (0.06 sec)
mysql> drop user 'oneadmin'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE USER 'oneadmin'@'localhost' IDENTIFIED BY 'oneadmin';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE DATABASE opennebula;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON opennebula.* TO 'oneadmin' IDENTIFIED BY 'oneadmin';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;