Open T-Sinjon opened 2 years ago
戴尔服务器从 idrac 6.00.02.00 开始,不再支持java方式访问控制台了,只支持ehtml5方式了,相关声明如下:
https://www.dell.com/support/manuals/en-us/poweredge-t350/idrac9_6.xx_ug/configuring-and-using-virtual-console?guid=guid-1607d2bc-0ed1-4487-84e1-272357a474ae&lang=en-us https://www.dell.com/support/manuals/en-us/idrac9-lifecycle-controller-v6.x-series/idrac9_6.xx_ug/using-virtual-console?guid=guid-b2c8b41d-080d-4b00-9bf2-286ff8694889&lang=en-us
新版戴尔服务器打开控制台可以参考如下 python 源码实现方式:
也就是调用如下url
https://ip/console?username=%s&tempUsername=%s&tempPassword=%s
关于 tempUsername
和tempPassword
的获取看以上python代码
最新的DELL和H3C的服务器无法使用webkvm成功创建docker容器
问题描述
大家好: 在使用代码测试过程中发现最新的DELL和H3C均无法成功创建docker容器,请帮忙看看,或者是否有解决方案,谢谢。
问题分析过程
H3C服务器测试:
运行docker:
The VNC desktop is: 9af5e572d2aa:0 PORT=5900
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster retrieval. It should work with any VNC viewer. Try it by running:
One can also add -ncache_cr for smooth 'copyrect' window motion. More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
100 73 0 11 100 62 56 317 --:--:-- --:--:-- --:--:-- 319 cannot get sesion_cookie from response : [services.d] stopping services [services.d] stopping app... [services.d] stopping x11vnc... caught signal: 15 15/08/2022 09:36:24 deleted 40 tile_row polling images. [services.d] stopping statusmonitor... [services.d] stopping openbox... [services.d] stopping logmonitor... [services.d] stopping xvfb... [services.d] stopping nginx... [services.d] stopping certsmonitor... [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.
{ "cc": 1 }'
{ "cc": 1 }' ']' ++ echo 'HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000; includeSubdomains Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Content-Type: application/json Transfer-Encoding: chunked Date: Mon, 15 Aug 2022 01:39:07 GMT Server: web server
++ grep -e 'QSESSIONID=[^;]+' { "cc": 1 }' ++ awk -F ' ' '{print $2}'
{ "cc": 1 }' ++ awk -F CSRFToken '{print $2}' ++ awk -F ' ' '{print $2}' ++ awk -F '"' '{printf $2}'
CSRF=
'[' -z ']'
echo 'cannot get sesion_cookie from response : ' cannot get sesion_cookie from response :
exit 1
可以看到因为结果里面没有QSESSIONID,所以报错了
curl -i -k -X POST -d 'username=xxxxxxxx&password=xxxxxxxxx==&log_type=1' https://H3C_server_ipmi_ip/api/session
HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000; includeSubdomains Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Content-Type: application/json Transfer-Encoding: chunked Date: Mon, 15 Aug 2022 01:42:00 GMT Server: web server
{ "cc": 1 }
docker run -itd -p 5800:5800 -e VENDOR=DELL -e HOST=xxxxxx -e USER=xxxxxx -e PASSWD=xxxxxx -e APP_NAME=IDRAC9 registry.cn-qingdao.aliyuncs.com/x-lab/kvm:v1.0.0 | xargs docker logs -f
[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-app-niceness.sh: executing... [cont-init.d] 00-app-niceness.sh: exited 0. [cont-init.d] 00-app-script.sh: executing... [cont-init.d] 00-app-script.sh: exited 0. [cont-init.d] 00-app-user-map.sh: executing... [cont-init.d] 00-app-user-map.sh: exited 0. [cont-init.d] 00-clean-logmonitor-states.sh: executing... [cont-init.d] 00-clean-logmonitor-states.sh: exited 0. [cont-init.d] 00-clean-tmp-dir.sh: executing... [cont-init.d] 00-clean-tmp-dir.sh: exited 0. [cont-init.d] 00-set-app-deps.sh: executing... [cont-init.d] 00-set-app-deps.sh: exited 0. [cont-init.d] 00-set-home.sh: executing... [cont-init.d] 00-set-home.sh: exited 0. [cont-init.d] 00-take-config-ownership.sh: executing... [cont-init.d] 00-take-config-ownership.sh: exited 0. [cont-init.d] 00-xdg-runtime-dir.sh: executing... [cont-init.d] 00-xdg-runtime-dir.sh: exited 0. [cont-init.d] 10-certs.sh: executing... [cont-init.d] 10-certs.sh: exited 0. [cont-init.d] 10-cjk-font.sh: executing... [cont-init.d] 10-cjk-font.sh: exited 0. [cont-init.d] 10-nginx.sh: executing... [cont-init.d] 10-nginx.sh: exited 0. [cont-init.d] 10-vnc-password.sh: executing... [cont-init.d] 10-vnc-password.sh: exited 0. [cont-init.d] 10-web-index.sh: executing... [cont-init.d] 10-web-index.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] starting s6-fdholderd... [services.d] starting certsmonitor... [services.d] starting nginx... [services.d] starting xvfb... [nginx] starting... [certsmonitor] disabling service: secure connection not enabled. [xvfb] starting... [services.d] starting logmonitor... [services.d] starting openbox... [logmonitor] no file to monitor: disabling service... [openbox] starting... [services.d] starting statusmonitor... [services.d] starting x11vnc... [statusmonitor] no file to monitor: disabling service... [services.d] starting app... [x11vnc] starting... [app] starting IDRAC8... 15/08/2022 09:47:51 passing arg to libvncserver: -rfbport 15/08/2022 09:47:51 passing arg to libvncserver: 5900 15/08/2022 09:47:51 passing arg to libvncserver: -rfbportv6 15/08/2022 09:47:51 passing arg to libvncserver: -1 15/08/2022 09:47:51 passing arg to libvncserver: -httpportv6 15/08/2022 09:47:51 passing arg to libvncserver: -1 15/08/2022 09:47:51 passing arg to libvncserver: -desktop 15/08/2022 09:47:51 passing arg to libvncserver: IDRAC8 15/08/2022 09:47:51 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 849 [services.d] done. 15/08/2022 09:47:51 Using X display :0 15/08/2022 09:47:51 xxxxxxwin: 0x25c reswin: 0x400001 dpy: 0x13334f0 15/08/2022 09:47:51 15/08/2022 09:47:51 ------------------ USEFUL INFORMATION ------------------ 15/08/2022 09:47:51 X DAMAGE available on display, using it for polling hints. 15/08/2022 09:47:51 To disable this behavior use: '-noxdamage' 15/08/2022 09:47:51 15/08/2022 09:47:51 Most compositing window managers like 'compiz' or 'beryl' 15/08/2022 09:47:51 cause X DAMAGE to fail, and so you may not see any screen 15/08/2022 09:47:51 updates via VNC. Either disable 'compiz' (recommended) or 15/08/2022 09:47:51 supply the x11vnc '-noxdamage' command line option. 15/08/2022 09:47:51 X COMPOSITE available on display, using it for window polling. 15/08/2022 09:47:51 To disable this behavior use: '-noxcomposite' 15/08/2022 09:47:51 15/08/2022 09:47:51 Wireframing: -wireframe mode is in effect for window moves. 15/08/2022 09:47:51 If this yields undesired behavior (poor response, painting 15/08/2022 09:47:51 errors, etc) it may be disabled: 15/08/2022 09:47:51 - use '-nowf' to disable wireframing completely. 15/08/2022 09:47:51 - use '-nowcr' to disable the Copy Rectangle after the 15/08/2022 09:47:51 moved window is released in the new position. 15/08/2022 09:47:51 Also see the -help entry for tuning parameters. 15/08/2022 09:47:51 You can press 3 Alt_L's (Left "Alt" key) in a row to 15/08/2022 09:47:51 repaint the screen, also see the -fixscreen option for 15/08/2022 09:47:51 periodic repaints. 15/08/2022 09:47:51 GrabServer control via XTEST. 15/08/2022 09:47:51 15/08/2022 09:47:51 Scroll Detection: -scrollcopyrect mode is in effect to 15/08/2022 09:47:51 use RECORD extension to try to detect scrolling windows 15/08/2022 09:47:51 (induced by either user keystroke or mouse input). 15/08/2022 09:47:51 If this yields undesired behavior (poor response, painting 15/08/2022 09:47:51 errors, etc) it may be disabled via: '-noscr' 15/08/2022 09:47:51 Also see the -help entry for tuning parameters. 15/08/2022 09:47:51 You can press 3 Alt_L's (Left "Alt" key) in a row to 15/08/2022 09:47:51 repaint the screen, also see the -fixscreen option for 15/08/2022 09:47:51 periodic repaints. 15/08/2022 09:47:51 15/08/2022 09:47:51 XKEYBOARD: number of keysyms per keycode 7 is greater 15/08/2022 09:47:51 than 4 and 51 keysyms are mapped above 4. 15/08/2022 09:47:51 Automatically switching to -xkb mode. 15/08/2022 09:47:51 If this makes the key mapping worse you can 15/08/2022 09:47:51 disable it with the "-noxkb" option. 15/08/2022 09:47:51 Also, remember "-remap DEAD" for accenting characters. 15/08/2022 09:47:51 15/08/2022 09:47:51 X FBPM extension not supported. 15/08/2022 09:47:51 X display is not capable of DPMS. 15/08/2022 09:47:51 -------------------------------------------------------- 15/08/2022 09:47:51 15/08/2022 09:47:51 Default visual ID: 0x21 15/08/2022 09:47:51 Read initial data from X display into framebuffer. 15/08/2022 09:47:51 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120 15/08/2022 09:47:51 15/08/2022 09:47:51 X display :0 is 32bpp depth=24 true color 15/08/2022 09:47:51 15/08/2022 09:47:51 Listening for VNC connections on TCP port 5900 15/08/2022 09:47:51 15/08/2022 09:47:51 Xinerama is present and active (e.g. multi-head). 15/08/2022 09:47:51 Xinerama: number of sub-screens: 1 15/08/2022 09:47:51 Xinerama: no blackouts needed (only one sub-screen) 15/08/2022 09:47:51 15/08/2022 09:47:51 fb read rate: 2197 MB/sec 15/08/2022 09:47:51 fast read: reset -wait ms to: 10 15/08/2022 09:47:51 fast read: reset -defer ms to: 10 15/08/2022 09:47:51 The X server says there are 10 mouse buttons. 15/08/2022 09:47:51 screen setup finished. 15/08/2022 09:47:51
The VNC desktop is: dc0965630110:0 PORT=5900
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster retrieval. It should work with any VNC viewer. Try it by running:
One can also add -ncache_cr for smooth 'copyrect' window motion. More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
idrac9 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 221 100 196 100 25 1174 149 --:--:-- --:--:-- --:--:-- 1180 cannot get sesion_cookie from response : [services.d] stopping services [services.d] stopping app... [services.d] stopping x11vnc... caught signal: 15 15/08/2022 09:47:51 deleted 40 tile_row polling images. [services.d] stopping statusmonitor... [services.d] stopping openbox... [services.d] stopping logmonitor... [services.d] stopping xvfb... [services.d] stopping nginx... [services.d] stopping certsmonitor... [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting.
idrac9 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 221 100 196 100 25 1063 135 --:--:-- --:--:-- --:--:-- 1059 cannot get sesion_cookie from response :
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Not Found
The requested URL was not found on this server.
' + '[' -z 'HTTP/1.1 404 Not Found Date: Mon, 15 Aug 2022 06:49:50 GMT Server: Apache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 196 Content-Type: text/html; charset=iso-8859-1Not Found
The requested URL was not found on this server.
' ']' ++ echo 'HTTP/1.1 404 Not Found Date: Mon, 15 Aug 2022 06:49:50 GMT Server: Apache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 196 Content-Type: text/html; charset=iso-8859-1Not Found
The requested URL was not found on this server.
++ grep -e 'Cookie:[^;]\+' ' ++ awk -F ' ' '{print $2}' + SESSION= ++ echo 'HTTP/1.1 404 Not Found Date: Mon, 15 Aug 2022 06:49:50 GMT Server: Apache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 196 Content-Type: text/html; charset=iso-8859-1Not Found
The requested URL was not found on this server.
++ grep ST1 ' ++ awk -F ST1= '{print $2}' ++ awk -F ,ST2 '{print $1}' ++ xargs + ST1= ++ echo 'HTTP/1.1 404 Not Found Date: Mon, 15 Aug 2022 06:49:50 GMT Server: Apache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 196 Content-Type: text/html; charset=iso-8859-1Not Found
The requested URL was not found on this server.
++ grep ST2 ' ++ awk -F ST2= '{print $2}' ++ awk -F '' '{printf $1}' ++ xargs + ST2= + '[' -z ']' + echo 'cannot get sesion_cookie from response : ' cannot get sesion_cookie from response : + exit 1 ``` - 可以看到curl -i -k -X POST -d 'user=xxxxxxx&password=xxxxxx' https://DELL_server_ipmi_ip/data/login这里就报错了 ``` HTTP/1.1 404 Not Found Date: Mon, 15 Aug 2022 06:56:53 GMT Server: Apache X-Frame-Options: DENY Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Content-Length: 196 Content-Type: text/html; charset=iso-8859-1Not Found
The requested URL was not found on this server.
```