sciapp / nojava-ipmi-kvm

nojava-ipmi-kvm is a utility to access Java based ipmi kvm consoles without a local java installation.
MIT License
78 stars 26 forks source link

install error #4

Closed haiwan-xm closed 4 years ago

haiwan-xm commented 4 years ago

we have repair [root@localhost ~]# python3 -m pip install nojava-ipmi-kvm Collecting nojava-ipmi-kvm Using cached nojava_ipmi_kvm-0.1.6-py2.py3-none-any.whl (12 kB) Collecting future Using cached future-0.18.2.tar.gz (829 kB) Collecting requests Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB) Requirement already satisfied: PyQtWebEngine>=5.12 in /usr/local/lib64/python3.6/site-packages (from nojava-ipmi-kvm) (5.14.0) Requirement already satisfied: PyQt5>=5.12 in /usr/local/lib64/python3.6/site-packages (from nojava-ipmi-kvm) (5.14.1) Collecting certifi>=2017.4.17 Downloading certifi-2019.11.28-py2.py3-none-any.whl (156 kB) |████████████████████████████████| 156 kB 887 kB/s Collecting idna<2.9,>=2.5 Downloading idna-2.8-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 1.8 MB/s Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB) |████████████████████████████████| 125 kB 15.9 MB/s Collecting chardet<3.1.0,>=3.0.2 Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB) |████████████████████████████████| 133 kB 3.0 MB/s Requirement already satisfied: PyQt5-sip<13,>=12.7 in /usr/local/lib64/python3.6/site-packages (from PyQtWebEngine>=5.12->nojava-ipmi-kvm) (12.7.1) Installing collected packages: future, certifi, idna, urllib3, chardet, requests, nojava-ipmi-kvm Running setup.py install for future ... done Successfully installed certifi-2019.11.28 chardet-3.0.4 future-0.18.2 idna-2.8 nojava-ipmi-kvm-0.1.6 requests-2.22.0 urllib3-1.25.8 [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE [root@localhost ~]# ls anaconda-ks.cfg get-pip.py so we need running docker pull sciapp/nojava-ipmi-kvm ? wish get point guide. tks

haiwan-xm commented 4 years ago

vi .nojava-ipmi-kvmrc [192.168.3.126] full_hostname = 192.168.3.126 login_user = ADMIN login_endpoint = rpc/WEBSES/create.asp download_endpoint = Java/jviewer.jnlp allow_insecure_ssl = False user_login_attribute_name = WEBVAR_USERNAME password_login_attribute_name = WEBVAR_PASSWORD java_version = 7u51 session_cookie_key = SessionCookie [general] run_docker_with_sudo = False x_resolution = 1600x1200

[root@localhost ~]# nojava-ipmi-kvm 192.168.3.126 Traceback (most recent call last): File "/usr/local/bin/nojava-ipmi-kvm", line 5, in from nojava_ipmi_kvm.cli import main File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/init.py", line 6, in from .kvm import view_kvm_console File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/kvm.py", line 30, in from .browser import run_vnc_browser File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/browser.py", line 22, in from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets ImportError: libGL.so.1: cannot open shared object file: No such file or directory

IngoMeyer441 commented 4 years ago

so we need running docker pull sciapp/nojava-ipmi-kvm ?

No, the image is pulled automatically by the application.

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

It looks like the PyQt5 package from PyPI does not install Qt5 completely. Do you use Ubuntu for your tests? In that case you can run:

apt install qt5-default

to get a complete Qt5 installation.

haiwan-xm commented 4 years ago

so we need running docker pull sciapp/nojava-ipmi-kvm ?

No, the image is pulled automatically by the application.

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

It looks like the PyQt5 package from PyPI does not install Qt5 completely. Do you use Ubuntu for your tests? In that case you can run:

apt install qt5-default

to get a complete Qt5 installation.

we test os is centos7 and we no understand this code First, create a file ~/.nojava-ipmi-kvmrc and create a configuration section for each kvm host you want to connect to, for example:

[myhostkvm] full_hostname = myhostkvm.org login_user = ADMIN login_endpoint = rpc/WEBSES/create.asp download_endpoint = Java/jviewer.jnlp allow_insecure_ssl = False user_login_attribute_name = WEBVAR_USERNAME password_login_attribute_name = WEBVAR_PASSWORD java_version = 7u51 session_cookie_key = SessionCookie

and nojava-ipmi-kvm myhostkvm if have time please give me demo really tks. i wish pay money study this.tks

IngoMeyer441 commented 4 years ago

On CentOS 8 you can install

dnf install qt5-qtdeclarative-devel

Please first try to get the application running. After that, I can try to help you with the configuration section. It is quite hard to give a general example because the configuration is very hardware / KVM dependent. I only tested this application with our hardware. Maybe it does not work with your hardware at all without further modifications.

haiwan-xm commented 4 years ago

Please first try to get the application running. After that, I can try to help you with the configuration section. It is quite hard to give a general example because the configuration is very hardware / KVM dependent. I only tested this application with our hardware. Maybe it does not work with your hardware at all without further modifications.

ok, tks, let me try . so centos 7 have install this? and you have telegram ? we wish get your guide. really tks.

IngoMeyer441 commented 4 years ago

It is the same on CentOS 7, but use yum instead:

yum install qt5-qtdeclarative-devel

Sorry, I am at work and cannot chat over Telegram.

haiwan-xm commented 4 years ago

It is the same on CentOS 7, but use yum instead:

yum install qt5-qtdeclarative-devel

Sorry, I am at work and cannot chat over Telegram.

ok.tks, let me test , waiting me we have running install complete Complete! [root@localhost ~]# nojava-ipmi-kvm 192.168.3.126 Traceback (most recent call last): File "/usr/local/bin/nojava-ipmi-kvm", line 5, in from nojava_ipmi_kvm.cli import main File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/init.py", line 6, in from .kvm import view_kvm_console File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/kvm.py", line 30, in from .browser import run_vnc_browser File "/usr/local/lib/python3.6/site-packages/nojava_ipmi_kvm/browser.py", line 22, in from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets ImportError: libXcomposite.so.1: cannot open shared object file: No such file or directory [root@localhost ~]#

IngoMeyer441 commented 4 years ago

By running

yum provides libXcomposite.so.1

you can find out which package provides the needed library. However, it is quite strange that you need to install libXcomposite. Are you testing on a headless server?

haiwan-xm commented 4 years ago

By running

yum provides libXcomposite.so.1

you can find out which package provides the needed library. However, it is quite strange that you need to install libXcomposite. Are you testing on a headless server?

[root@localhost ~]# yum provides libXcomposite.so.1 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

haiwan-xm commented 4 years ago

By running

yum provides libXcomposite.so.1

you can find out which package provides the needed library. However, it is quite strange that you need to install libXcomposite. Are you testing on a headless server?

Are you testing on a headless server? we use vmware vm test

IngoMeyer441 commented 4 years ago

Does this VM have a graphical desktop / a running X server?

haiwan-xm commented 4 years ago

Does this VM have a graphical desktop / a running X server?

[root@localhost ~]# python Python 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

o we no use x server or desktop. we install base version

haiwan-xm commented 4 years ago

Does this VM have a graphical desktop / a running X server?

we giev you my server test ssh?

IngoMeyer441 commented 4 years ago

This application needs a X server for running because it opens a window with an embedded browser. You need to install a desktop environment (GNOME, KDE, Xfce, ...) or a window manager (openbox for example). Then run a graphical session and try again to run the application from a terminal.

haiwan-xm commented 4 years ago

let me try change X server

IngoMeyer441 commented 4 years ago

If X is already installed, you can also try to use X forwarding with ssh -Y.

haiwan-xm commented 4 years ago

If X is already installed, you can also try to use X forwarding with ssh -Y.

ing install X package

haiwan-xm commented 4 years ago

If X is already installed, you can also try to use X forwarding with ssh -Y.

so windows install python have wish test this ?

IngoMeyer441 commented 4 years ago

so windows install python have wish test this ?

This project does not work on Windows, only Linux and macOS. If you would like to connect from Windows to your Linux VM, you can try using Xming for X forwarding.

haiwan-xm commented 4 years ago

so windows install python have wish test this ?

This project does not work on Windows, only Linux and macOS. If you would like to connect from Windows to your Linux VM, you can try using Xming for X forwarding.

we install X now install yum groupinstall "GNOME Desktop" waiting a moment

haiwan-xm commented 4 years ago

so windows install python have wish test this ?

This project does not work on Windows, only Linux and macOS. If you would like to connect from Windows to your Linux VM, you can try using Xming for X forwarding.

we have X test
INFO: Check if 'http://myhostkvm.org/' is reachable... ERROR: The url 'http://myhostkvm.org/' is not reachable. Is the host down?

haiwan-xm commented 4 years ago

ERROR: myhhostkvm is not present in the configuration. Please insert a host entry in '/root/.nojava-ipmi-kvmrc'.

haiwan-xm commented 4 years ago

so windows install python have wish test this ?

This project does not work on Windows, only Linux and macOS. If you would like to connect from Windows to your Linux VM, you can try using Xming for X forwarding.

[root@localhost ~]# cat .nojava-ipmi-kvmrc [myhostkvm] full_hostname = myhostkvm.org login_user = ADMIN login_endpoint = rpc/WEBSES/create.asp download_endpoint = Java/jviewer.jnlp allow_insecure_ssl = False user_login_attribute_name = WEBVAR_USERNAME password_login_attribute_name = WEBVAR_PASSWORD java_version = 7u51 session_cookie_key = SessionCookie [root@localhost ~]#

haiwan-xm commented 4 years ago

so windows install python have wish test this ?

This project does not work on Windows, only Linux and macOS. If you would like to connect from Windows to your Linux VM, you can try using Xming for X forwarding.

my server ipmi account and password all admin
so how to config .

haiwan-xm commented 4 years ago

[root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 3. Maybe you entered a wrong password?

IngoMeyer441 commented 4 years ago

A list with error codes of the application within Docker:

haiwan-xm commented 4 years ago

A list with error codes of the application within Docker:

  • LoginFailedError (error code 3)
  • DownloadFailedError (error code 4) So in your case, the login did not work and your configuration file must be adjusted. For the login the following entries are important:
full_hostname = myhostkvm.org
login_user = ADMIN
login_endpoint = rpc/WEBSES/create.asp
allow_insecure_ssl = False
user_login_attribute_name = WEBVAR_USERNAME
password_login_attribute_name = WEBVAR_PASSWORD

Probably, login_endpoint, user_login_attribute_name and / or password_login_attribute_name are wrong. login_endpoint is the URL of the login page (without a hostname). user_login_attribute_name and password_login_attribute_name are the names of the form fields of the login form (on the login page). You can find out these names by opening the web inspector of your web browser (the names are hard coded in the HTML page source code).

[root@localhost ~]# cat .nojava-ipmi-kvmrc [myhostkvm] full_hostname = 192.168.3.126 login_user = ADMIN login_endpoint = rpc/WEBSES/create.asp download_endpoint = Java/jviewer.jnlp allow_insecure_ssl = False user_login_attribute_name = ADMIN password_login_attribute_name = ADMIN java_version = 7u51 session_cookie_key = SessionCookie

my server IPMI account and password all is ADMIN and we running this code notice [root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 3. Maybe you entered a wrong password?

haiwan-xm commented 4 years ago
  • LoginFailedError (error code 3)

LoginFailedError (error code 3) we have try use ADMIN ADMIN test have login in successfull. or my write error about this code
user_login_attribute_name = WEBVAR_USERNAME password_login_attribute_name = WEBVAR_PASSWORD right style is user_login_attribute_name = WEBVAR_ADMIN password_login_attribute_name = WEBVAR_ADMIN you think right ? tks

haiwan-xm commented 4 years ago

A list with error codes of the application within Docker:

  • LoginFailedError (error code 3)
  • DownloadFailedError (error code 4) So in your case, the login did not work and your configuration file must be adjusted. For the login the following entries are important:
full_hostname = myhostkvm.org
login_user = ADMIN
login_endpoint = rpc/WEBSES/create.asp
allow_insecure_ssl = False
user_login_attribute_name = WEBVAR_USERNAME
password_login_attribute_name = WEBVAR_PASSWORD

Probably, login_endpoint, user_login_attribute_name and / or password_login_attribute_name are wrong. login_endpoint is the URL of the login page (without a hostname). user_login_attribute_name and password_login_attribute_name are the names of the form fields of the login form (on the login page). You can find out these names by opening the web inspector of your web browser (the names are hard coded in the HTML page source code).

haiwan-xm commented 4 years ago

i click error

haiwan-xm commented 4 years ago

A list with error codes of the application within Docker:

  • LoginFailedError (error code 3)
  • DownloadFailedError (error code 4) So in your case, the login did not work and your configuration file must be adjusted. For the login the following entries are important:
full_hostname = myhostkvm.org
login_user = ADMIN
login_endpoint = rpc/WEBSES/create.asp
allow_insecure_ssl = False
user_login_attribute_name = WEBVAR_USERNAME
password_login_attribute_name = WEBVAR_PASSWORD

Probably, login_endpoint, user_login_attribute_name and / or password_login_attribute_name are wrong. login_endpoint is the URL of the login page (without a hostname). user_login_attribute_name and password_login_attribute_name are the names of the form fields of the login form (on the login page). You can find out these names by opening the web inspector of your web browser (the names are hard coded in the HTML page source code).

[root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 3. Maybe you entered a wrong password? [root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 3. Maybe you entered a wrong password? [root@localhost ~]# cat .nojava-ipmi-kvmrc [myhostkvm] full_hostname = 192.168.3.126 login_user = ADMIN login_endpoint = rpc/WEBSES/create.asp download_endpoint = Java/jviewer.jnlp allow_insecure_ssl = False user_login_attribute_name = WEBVAR_ADMIN password_login_attribute_name = WEBVAR_ADMIN java_version = 7u51 session_cookie_key = SessionCookie

omg test same failed. please give me guide. tks

IngoMeyer441 commented 4 years ago

You can follow the following steps:

  1. Open your web browser (I use Chrome) and go to the login page of your kvm node
  2. Open the web inspector (right click -> Inspect), switch to the network Tab and check Preserve log
  3. Login
  4. Find the login POST call, click on it and go to Headers
  5. Search for form data. This section will contain the attributes which must be put into user_login_attribute_name and password_login_attribute_name.

image

haiwan-xm commented 4 years ago

You can follow the following steps:

  1. Open your web browser (I use Chrome) and go to the login page of your kvm node
  2. Open the web inspector (right click -> Inspect), switch to the network Tab and check Preserve log
  3. Login
  4. Find the login POST call, click on it and go to Headers
  5. Search for form data. This section will contain the attributes which must be put into user_login_attribute_name and password_login_attribute_name. tks, IngoHeimbach if we found right account and pw next how to use browser see vnc ?
haiwan-xm commented 4 years ago

You can follow the following steps:

  1. Open your web browser (I use Chrome) and go to the login page of your kvm node
  2. Open the web inspector (right click -> Inspect), switch to the network Tab and check Preserve log
  3. Login
  4. Find the login POST call, click on it and go to Headers
  5. Search for form data. This section will contain the attributes which must be put into user_login_attribute_name and password_login_attribute_name.

image

hi have online we have check no see data

haiwan-xm commented 4 years ago

sorry we found name: ADMIN pwd: ADMIN

haiwan-xm commented 4 years ago

Request URL: http://192.168.3.126/cgi/login.cgi

IngoMeyer441 commented 4 years ago

OK, great, then you can set:

user_login_attribute_name = name
password_login_attribute_name = pwd
login_endpoint = cgi/login.cgi
haiwan-xm commented 4 years ago

OK, great, then you can set:

user_login_attribute_name = name
password_login_attribute_name = pwd
login_endpoint = cgi/login.cgi

[root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 4. Maybe you entered a wrong password? LoginFailedError (error code 3) DownloadFailedError (error code 4) how to check dowmload url download_endpoint = Java/jviewer.jnlp

IngoMeyer441 commented 4 years ago

On your kvm page, there will be a button or link to start the kvm console which should point to a *.jnlp file. download_endpoint must point to this file.

haiwan-xm commented 4 years ago

On your kvm page, there will be a button or link to start the kvm console which should point to a *.jnlp file. download_endpoint must point to this file.

http://192.168.3.126/cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk download file name is launch (1).jnlp so i no get this url download_endpoint = Java/jviewer.jnlp

haiwan-xm commented 4 years ago

On your kvm page, there will be a button or link to start the kvm console which should point to a *.jnlp file. download_endpoint must point to this file.

My server is SUPERMICRO

IngoMeyer441 commented 4 years ago

Could you try to replace Java/jviewer.jnlp with your download url? We also have Super Micro but download locations vary between different firmware versions.

haiwan-xm commented 4 years ago

Could you try to replace Java/jviewer.jnlp with your download url? We also have Super Micro but download locations vary between different firmware versions.

Hi , happy day ,see you happy we have try replace so jnlp download url is http://192.168.3.126/cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk we hot to replace? please give me guide. and my version very old

Firmware Revision : 03.52 IP address : 192.168.003.126

Firmware Build Time : 2016-11-10

haiwan-xm commented 4 years ago

and we have old server DELL C6220 R620 so i wish get your point. how to see really down url.

haiwan-xm commented 4 years ago

Could you try to replace Java/jviewer.jnlp with your download url? We also have Super Micro but download locations vary between different firmware versions.

[root@localhost ~]# nojava-ipmi-kvm myhostkvm Password: INFO: Check if 'http://192.168.3.126/' is reachable... INFO: The url 'http://192.168.3.126/' is reachable. INFO: Starting the Docker container... INFO: Waiting for the Docker container to be up and ready... ERROR: Docker terminated with return code 4. Maybe you entered a wrong password? full_hostname = 192.168.3.126 login_user = ADMIN login_endpoint = cgi/login.cgi download_endpoint = cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk allow_insecure_ssl = False user_login_attribute_name = name password_login_attribute_name = pwd java_version = 7u51 session_cookie_key = SID

IngoMeyer441 commented 4 years ago

Could you try to set

allow_insecure_ssl = True

This can help if the SSL certificate of the server is invalid because of its age.

haiwan-xm commented 4 years ago

Could you try to set

allow_insecure_ssl = True

This can help if the SSL certificate of the server is invalid because of its age.

we have change True but still error ERROR: Docker terminated with return code 4. Maybe you entered a wrong password?

IngoMeyer441 commented 4 years ago

Are you sure that the url http://192.168.3.126/cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk is correct? Could you remove the line

session_cookie_key = SID

for a test?

TheSeubert commented 4 years ago

thanks for the troubleshooting on this, it helps getting my head around the solution.

What I did for the last step was changed:

download_endpoint = cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk

This got it launching and worked.