mdzidic / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
Other
0 stars 0 forks source link

Installation on Debian 6 (Squeeze): Empty hw-daemon.rb #385

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It appears that installation on Debian 6 works successfully except that the 
hw-daemon.rb file is empty, this causes a plethora of issues and complications 
including failure to download OS templates. I have listed the steps to 
reproduce and fix below. (Note: It appears that this does not affect ALL 
installs on Debian.)

Steps to reproduce:
1. Run the auto install on a fresh copy of Debian 6 (Squeeze)
2. Check '/root/ovz-web-panel/utils/hw-daemon/hw-daemon.rb' if it is empty. If 
so, proceed below. (I do not have access to create a Wiki post for Debian 
install)

To Successfully Install On Debian Follow These Steps, I am assuming that you 
have a fresh install of Debian 6 (Squeeze) on your system and have OpenVZ 
installed and are actively in the OpenVZ kernel.

-- Check for OpenVZ kernel
`uname -r | grep openvz`

If you see output, you can proceed to '-- Install OWP', if you already 
installed OWP and have the same issue proceed to '-- Fix Empty hw-daemon.rb'. 
If you see no output, you most likely do NOT have OpenVZ installed. Before 
proceeding please look up how to install OpenVZ on your system or consult your 
server provider. The best place to start is 
http://wiki.openvz.org/Installation_on_Debian

-- Install OWP
1. Make sure you are logged into root and have full root privileges before 
continuing.

2. Run `apt-get update`

3. Run `apt-get upgrade`

4. Run `wget -O - http://ovz-web-panel.googlecode.com/svn/installer/ai.sh | sh` 
(OWP will attempt to dowload and install the required packages using Aptitude)

5. Assuming there was no errors, OWP is now installed and available using the 
URL outputted from the OWP installation (Ex. http://my.hostname:3000). Go to 
this URL and ensure you are able to login with the default credentials 
admin/admin.

-- Fix Empty hw-daemon.rb

6. If you were able to login and everything appears to be working, back in 
shell run `find /opt/ovz-web-panel/ | grep hw-daemon.rb`. The output you should 
see is `/opt/ovz-web-panel/utils/hw-daemon/hw-daemon.rb`.

7. Run `cat /opt/ovz-web-panel/utils/hw-daemon/hw-daemon.rb`, if no output 
shows, the file is empty. You should assume this file should not be empty.

8. Ensure you are in `/root` or your preffered temporary directory for 
extraction and run `wget 
http://ovz-web-panel.googlecode.com/files/ovz-web-panel-2.0.tgz`.

9. Assuming the download was successful and you now have a file named 
'ovz-web-panel-2.0.tgz' in your current directory (You can check with `ls 
-lai`), run `tar -xzf ovz-web-panel-2.0.tgz`.

10. We need to now copy the extracted 'hw-daemon.rb' file located in 
'ovz-web-panel/utils/hw-daemon'. Cross your fingers and run `cp 
ovz-web-panel/utils/hw-daemon/hw-daemon.rb 
/opt/ovz-web-panel/utils/hw-daemon/hw-daemon.rb`

11. Now we need to restart OWP, run `service owp restart`. Assuming there was 
no errors, Success!

At the time of writing this, the latest version was 2.0, this problem will most 
likely be fixed with the next update. If there is a newer version please feel 
free to modify the URL & path's to that version in my example.

Thank You! So far I LOVE OWP kudos to the creators. I would love to contribute 
time, experience, money anything I can to support this cause. ++Karma

Original issue reported on code.google.com by anth...@cliklabs.com on 29 Dec 2011 at 4:16

GoogleCodeExporter commented 9 years ago
The file  ovz-web-panel/utils/hw-daemon/hw-daemon.rb is non executable In the 
default tarball install. Not sure if this needs a separate bug.

Original comment by penguinh...@gmail.com on 29 Dec 2011 at 4:56

GoogleCodeExporter commented 9 years ago
When I followed the steps laid out on the guide in my most recent test using 
OVH's default debian 6 install and moved hw-daemon.rb from the extracted 
download it fixed all my issues. When you say it is not executable what do you 
mean? File permissions are not set properly?

Original comment by anth...@cliklabs.com on 29 Dec 2011 at 5:07

GoogleCodeExporter commented 9 years ago
I can confirm this bug. hw-daemon.rb must be manually extracted, otherwise it 
is empty. Once copied from the targz file, it works.

Original comment by fag...@gmail.com on 5 Jan 2012 at 12:40

GoogleCodeExporter commented 9 years ago
Very strange problem. Have a lot of Debian boxes and never see it.

Can anybody who have the issue, provide me /tmp/ovz-web-panel.log?

Original comment by sibprogrammer on 30 Jan 2012 at 3:31

GoogleCodeExporter commented 9 years ago
Same issue here.
The output of cat /tmp/ovz-web-panel.log:

Sat Feb 18 12:42:36 CET 2012 -----------------------------------
Sat Feb 18 12:42:36 CET 2012 OpenVZ Web Panel Installer.
Sat Feb 18 12:42:36 CET 2012 -----------------------------------
Sat Feb 18 12:42:36 CET 2012 Checking environment...
Sat Feb 18 12:42:36 CET 2012 System info: Linux debian6-eee 2.6.32-5-openvz-686 
#1 SMP Mon Jan 16 17:54:17 UTC 2012 i686 GNU/Linux
Sat Feb 18 12:42:36 CET 2012 Detecting distrib ID...
Sat Feb 18 12:42:36 CET 2012 Checking presence of the command: lsb_release
Sat Feb 18 12:42:36 CET 2012 Detected distrib ID: Debian
Sat Feb 18 12:42:36 CET 2012 OpenVZ hardware node detected.
Sat Feb 18 12:42:36 CET 2012 Resolving dependencies...
Sat Feb 18 12:42:48 CET 2012 Checking presence of the command: ruby
Sat Feb 18 12:42:48 CET 2012 Ruby version: 1.8.7
Sat Feb 18 12:42:48 CET 2012 Checking presence of the command: gem
Sat Feb 18 12:42:49 CET 2012 RubyGems version: 1.3.7
Sat Feb 18 12:42:49 CET 2012 Checking Ruby SQLite3 support: ruby -e "require 
'rubygems'" -e "require 'sqlite3/database'"
Sat Feb 18 12:42:49 CET 2012
Sat Feb 18 12:42:49 CET 2012 Installation...
Sat Feb 18 12:42:49 CET 2012 Downloading: wget -nc -P /opt/ovz-web-panel/ 
http://ovz-web-panel.googlecode.com/files/ovz-web-panel-2.0.tgz
Sat Feb 18 12:42:49 CET 2012 Unpacking: tar --strip 2 -C /opt/ovz-web-panel/ 
-xzf /opt/ovz-web-panel//ovz-web-panel-2.0.tgz --exclude=*.log 
--exclude=config/database.yml --exclude=db/*.sqlite3 --exclude=config/certs/* 
--exclude=hw-daemon/certs/*
Sat Feb 18 12:42:51 CET 2012 Removing downloaded archive: rm -f 
/opt/ovz-web-panel//ovz-web-panel-2.0.tgz
Sat Feb 18 12:42:51 CET 2012 Removing deprecated files...
Sat Feb 18 12:42:51 CET 2012 Upgrading database...
Sat Feb 18 12:42:58 CET 2012 Syncing physical servers state...
Sat Feb 18 12:43:04 CET 2012 Installation finished.
Sat Feb 18 12:43:04 CET 2012 Product was installed into: /opt/ovz-web-panel/
Sat Feb 18 12:43:04 CET 2012
Sat Feb 18 12:43:04 CET 2012 Stopping services...
Sat Feb 18 12:43:05 CET 2012 Starting services...
Sat Feb 18 12:43:23 CET 2012 Panel should be available at:
Sat Feb 18 12:43:23 CET 2012 http://debian6-eee.local:3000
Sat Feb 18 12:43:23 CET 2012 Default credentials: admin/admin
Sat Feb 18 12:43:23 CET 2012 -----------------------------------

Original comment by vto1010...@gmail.com on 18 Feb 2012 at 12:00

GoogleCodeExporter commented 9 years ago
Correction. Did another installation just now, without any problems. 
Differences: 
1st try was with a 32bit debian squeeze, WITHOUT first installing the openvz 
kernel and rebooting. 
2nd try was with a 64bit debian squeeze, after installing the openvz kernel and 
rebooting.

Original comment by vto1010...@gmail.com on 19 Feb 2012 at 3:46

GoogleCodeExporter commented 9 years ago
Your install log says that your're trying to upgrade the panel. Probably first 
attempt to install the panel have failed?

If anyone else see such problem and want to get investigation, please don't 
touch the server and send me temporary ssh access by email 
sibprogrammer@gmail.com I'll try to check and find root cause.

Original comment by sibprogrammer on 20 Feb 2012 at 2:38

GoogleCodeExporter commented 9 years ago
Issue 395 has been merged into this issue.

Original comment by sibprogrammer on 13 Mar 2012 at 12:49

GoogleCodeExporter commented 9 years ago
Issue 324 has been merged into this issue.

Original comment by sibprogrammer on 1 May 2012 at 9:03

GoogleCodeExporter commented 9 years ago

Original comment by sibprogrammer on 1 May 2012 at 9:26

GoogleCodeExporter commented 9 years ago
On fresh install of CentOS 6.3 the files:  

/opt/ovz-web-panel/utils/hw-daemon/hw-daemon.rb
/opt/ovz-web-panel/utils/hw-daemon/certs/server.crt
/opt/ovz-web-panel/utils/hw-daemon/certs/server.key

were empty, which caused failure when trying to install os templates.
I copied the files from 
https://github.com/sibprogrammer/owp/tree/master/utils/hw-daemon and now 
everything is working fine.

Original comment by jw8...@gmail.com on 22 Jul 2012 at 11:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had this problem with fresh CentOS 6.4 and OWP 2.4 installation with my first 
two attempts (empty hw-daemon.rb and no localhost physical server). Note that i 
launched vz service (#service vz start) after OWP installation.

On my third attempt, the only difference is that i started the vz service 
BEFORE launching ai.sh. After ai.sh was finished, hw-daemon.rb was correct (not 
empty), i downloaded my first template and all working great now.

to sibprogrammer:
« Very strange problem. Have a lot of Debian boxes and never see it. [...] »

I think it's because Debian start services immediately after installation. 
"apt-get install apache2" will start apache2 service but "yum install httpd" 
will not start httpd service, you will have to do it manually on Red Hat 
distros.

On Debian, after installing vzctl, it would be interesting to see if vz service 
is started automatically. If yes, i think this is the solution.

Original comment by micha...@gmail.com on 13 Jun 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Hi all!
I can confirm that this is still an issue with OpenVZ using OpenVZ Web Panel 
2.4.
After the initial installation using the quick install located here 
http://openvz.org/Quick_installation  
I had some initial issues. Following commands issued, to get to work.

iptables stop  
chkconfig iptables off

At this point I realized that I needed to login to the OpenVZ kernel. 
you can make OpenVZ kernel default in the /boot/grub/grub.conf
place OpenVZ kernel first in boot priority.
reboot.

After this I was able to get to http://ipaddress:3000 
login using admin/admin no issues.  
After logging in I was not able to download a OS template although I used wget 
to pull down a few templates to the server and put them in to the 
/vz/template/cache the web UI would not auto populate the templates that were 
manually downloaded. 
Physical server statistics were not showing up either.

which brings me to the hw-daemon.rb  
cd /tmp 
wget http://ovz-web-panel.googlecode.com/files/ovz-web-panel-2.0.tgz
tar -zxvf ovz-web-panel-2.0.tgz
cp ovz-web-panel/utils/hw-daemon/hw-daemon.rb 
/opt/ovz-web-panel/utils/hw-daemon/hw-daemon.rb
service owp restart

or reboot

At this point everything should be working.

Many think to karma for the instructions for extracting and installing the 
hw-daemon.rb

Good luck all.
DZ  

Original comment by myeyesar...@gmail.com on 18 Aug 2014 at 10:05