Cobbler部署之FAQ处理

Cobbler报错处理

 

通过cobbler check检查出现的报错

红色标注为报错关键信息

 

9.1 报错一

  1. # cobbler check 
  2. httpd does not appear to be running and proxying cobbler, or SELinux is in the way. Original traceback:  
  3. Traceback (most recent call last):  
  4.   File "/usr/lib/python2.4/site-packages/cobbler/cli.py", line 184, in check_setup  
  5.     s.ping()  
  6.   File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__  
  7.     return self.__send(self.__name, args)  
  8.   File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request  
  9.     verbose=self.__verbose  
  10.   File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request  
  11.     self.send_content(h, request_body)  
  12.   File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content  
  13.     connection.endheaders()  
  14.   File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders  
  15.     self._send_output()  
  16.   File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output  
  17.     self.send(msg)  
  18.   File "/usr/lib64/python2.4/httplib.py", line 652, in send  
  19.     self.connect()  
  20.   File "/usr/lib64/python2.4/httplib.py", line 636, in connect 
  21.     raise socket.error, msg  
  22. error: (111, 'Connection refused') 

解决启动httpd服务

  1. service httpd start   
  2. Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf:  
  3. Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration  
  4.                                                            [FAILED]#启动httpd时的报错,解决方法如下 

解决

  1. vim /etc/httpd/conf.d/wsgi.conf   
  2. 去掉注释  
  3. LoadModule wsgi_module modules/mod_wsgi.so  
  4. 再启动httpd服务  
  5. service httpd start                  
  6. Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName  
  7.                                                            [  OK  ] 

再进行一些针对apache ServerName参数配置的处理

  1. egrep "ServerName|Listen" /etc/httpd/conf/httpd.conf |grep -v '#' 
  2. Listen 172.17.10.14:80  
  3. ServerName 80 

官方相关资料https://github.com/cobbler/cobbler/wiki/Cobbler web interface

9.2 报错二

此步共修复七个需要处理的提示,一个一个解决

 

  1. # cobbler check 
  2. The following are potential configuration items that you may want to fix:  
  3. 1 : service dhcpd is not running  
  4. 解决:DHCP先不处理  
  5. 2 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.  
  6. 解决:执行 cobbler get-loaders,系统将自动下载loader程序,完成提示2的修复工作。  
  7. # cobbler get-loaders  
  8. task started: 2013-03-10_103017_get_loaders  
  9. task started (id=Download Bootloader Content, time=Sun Mar 10 10:30:17 2013)  
  10. downloading http://dgoodwin.fedorapeople.org/loaders/README to /var/lib/cobbler/loaders/README  
  11. downloading http://dgoodwin.fedorapeople.org/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo  
  12. downloading http://dgoodwin.fedorapeople.org/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot  
  13. downloading http://dgoodwin.fedorapeople.org/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux  
  14. downloading http://dgoodwin.fedorapeople.org/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi  
  15. downloading http://dgoodwin.fedorapeople.org/loaders/yaboot-1.3.14-12 to /var/lib/cobbler/loaders/yaboot  
  16. downloading http://dgoodwin.fedorapeople.org/loaders/pxelinux.0-3.61 to /var/lib/cobbler/loaders/pxelinux.0  
  17. downloading http://dgoodwin.fedorapeople.org/loaders/menu.c32-3.61 to /var/lib/cobbler/loaders/menu.c32  
  18. downloading http://dgoodwin.fedorapeople.org/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi  
  19. downloading http://dgoodwin.fedorapeople.org/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi  
  20. *** TASK COMPLETE ***  
  21. 3 : debmirror package is not installed, it will be required to manage debian deployments and repositories  
  22. 解决:提示说debmirror没安装。如果不是安装 debian之类的系统,此提示可以忽略,如果需要安装,  
  23. 安装 debmirror  
  24. yum -y install debmirror  
  25.  
  26. 编辑注释  
  27. 修改 /etc/debmirror.conf 配置文件,注释掉 @dists 和 @arches 两行  
  28. sed -i  's|@dists=.*|#@dists=|'  /etc/debmirror.conf  
  29. sed -i  's|@arches=.*|#@arches=|'  /etc/debmirror.conf  
  30. 4 : ksvalidator was not found, install pykickstart  
  31. 解决:安装ksvalidator  
  32.  yum install pykickstart -y  
  33.  
  34. 5 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one  
  35. 解决:修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码替换/etc/cobbler/settings中 default_password_crypted 的密码。  
  36. 生成密码命令:   
  37. #openssl passwd -1 -salt 'random-phrase-here' '[任意密码]'    
  38. openssl passwd -1 -salt 'random-phrase-here' 'hexun' 
  39. $1$random-p$Q1IN9LaNg7yhRKJuY50fV1  
  40.  
  41. 6 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them  
  42.  
  43. 解决:安装cman工具用于电源管理  
  44. yum  -y install cman  
  45.  
  46. Restart cobblerd and then run 'cobbler sync' to apply changes.  
  47. 修复完毕重启cobbler服务,然后运行cobbler sync  
  48. 7:修复完成以上问题后,同步信息再检查  
  49. /etc/init.d/cobblerd restart  
  50. Stopping cobbler daemon:                                   [  OK  ]  
  51. Starting cobbler daemon:                                   [  OK  ]  
  52. 再次检查,又报错  
  53. cobbler check 
  54. The following are potential configuration items that you may want to fix:  
  55.  
  56. 1 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one  
  57. Restart cobblerd and then run 'cobbler sync' to apply changes.
  58. 报错原因是上面的第五个问题没完全解决,仅仅生成了密钥,没有放入cobbler主配置文件  
  59. vim  /etc/cobbler/settings  
  60. default_password_crypted: "$1$random-p$Q1IN9LaNg7yhRKJuY50fV1" 
  61. 再重启服务  
  62. /etc/init.d/cobblerd restart  
  63. Stopping cobbler daemon:                                   [  OK  ]  
  64. Starting cobbler daemon:                                   [  OK  ]  
  65. cobbler check 
  66. No configuration problems found.  All systems go.  
  67. 执行cobbler sync  
  68. cobbler sync  
  69. task started: 2013-03-10_105055_sync  
  70. task started (id=Sync, time=Sun Mar 10 10:50:55 2013)  
  71. running pre-sync triggers  
  72. cleaning trees  
  73. removing: /tftpboot/pxelinux.cfg/default 
  74. 略  
  75. received on stdout: Shutting down dhcpd: [  OK  ]  
  76. Starting dhcpd: [  OK  ]  
  77.  
  78. received on stderr:   
  79. running shell triggers from /var/lib/cobbler/triggers/sync/post/*  
  80. running python triggers from /var/lib/cobbler/triggers/change/*  
  81. running python trigger cobbler.modules.scm_track  
  82. running shell triggers from /var/lib/cobbler/triggers/change/*  
  83. *** TASK COMPLETE ***  
  84. 执行cobbler sync会重启相关服务,DHCP服务也会启动了,第一个提示也就解决了,下面也有说明 

9.3 报错三

  1. [root@cobbler-1014 x86_64]# /etc/init.d/cobblerd restart  
  2. Stopping cobbler daemon:                                   [FAILED]  
  3. Starting cobbler daemon:                                   [  OK  ]  
  4. [root@cobbler-1014 x86_64]# cobbler check 
  5. The following are potential configuration items that you may want to fix:  
  6. 1 : service dhcpd is not running  
  7.  
  8. Restart cobblerd and then run 'cobbler sync' to apply changes. 

执行cobbler sync即可启动dhcp服务

  1. cobbler sync 

9.4 报错四

使用koan重装系统时报错

  1. koan --server=172.17.10.14 --list=profiles  
  2. Traceback (most recent call last):  
  3.   File "/usr/bin/koan", line 18, in ?  
  4.     import koan.app as app  
  5.   File "/usr/lib/python2.4/site-packages/koan/app.py", line 64, in ?  
  6.     import configurator  
  7.   File "/usr/lib/python2.4/site-packages/koan/configurator.py", line 36, in ?  
  8.     import simplejson as json  
  9. ImportError: No module named simplejson 

解决:需要安装simplejson软件包,
最新版下载地址:http://pypi.python.org/pypi/simplejson/
最新版的simplejson要求python 2.6+以上的,CntOS5.8是Python 2.4.3,所以下载的simplejson-2.0.9.tar.gz版本
https://pypi.python.org/packages/source/s/simplejson/simplejson-2.0.9.tar.gz
安装步骤:
访问外网下载文件setuptools-0.6c7-py2.4.egg
如没有外网可以通过其他机器下载https://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c7-py2.4.egg
然后上传至客户机再继续安装

  1. tar zxf simplejson-2.0.9.tar.gz   
  2. cd simplejson-2.0.9  
  3. python setup.py install  

建议CentOS5.8 安装此版本的koan使用可以避免此问题
ftp://rpmfind.net/linux/epel/5/i386/koan-1.6.6-1.el5.noarch.rpm

9.5 报错五

  1. koan --server=172.17.10.14 --virt-name=testvm   --virt --profile=centos5.8-xen-x86_64  
  2. - looking for Cobbler at http://172.17.10.14:80/cobbler_api  
  3. - reading URL: http://172.17.10.14/cblr/svc/op/ks/profile/centos5.8-xen-x86_64  
  4. install_tree: http://172.17.10.14/cblr/links/centos5.8-xen-x86_64  
  5. xen package needs to be installed 

Xen 宿主机安装虚拟机时提示没有安装xen软件包
解决:

  1. yum install xen -y 

执行此命令会安装一共9个软件包,如下

  1. Running Transaction 
  2.   Installing     : bridge-utils                                             1/9   
  3.   Installing     : cyrus-sasl-md5                                           2/9   
  4.   Installing     : ebtables                                                 3/9   
  5.   Installing     : e4fsprogs-libs                                           4/9   
  6.   Installing     : xen-libs                                                 5/9   
  7.   Installing     : libvirt                                                  6/9   
  8.   Installing     : libvirt-python                                           7/9   
  9.   Installing     : python-virtinst                                          8/9   
  10.   Installing     : xen                                                      9/9 

9.6 报错六

  1. koan --server=172.17.10.14 --virt-name=testvm   --virt --profile=centos5.8-xen-x86_64  
  2. - looking for Cobbler at http://172.17.10.14:80/cobbler_api  
  3. - reading URL: http://172.17.10.14/cblr/svc/op/ks/profile/centos5.8-xen-x86_64  
  4. install_tree: http://172.17.10.14/cblr/links/centos5.8-xen-x86_64  
  5. xend needs to be started 

解决:
报错原因是xend服务没有启动,执行以下命令处理

  1. chkconfig xend on 
  2. /etc/init.d/xend start  
  3. #注意此过程会自动桥接网卡,可能出现短暂断网 

9.7 报错七

  1. koan --server=172.17.10.14 --virt-name=testvm   --virt --profile=centos5.8-xen-x86_64  
  2. - looking for Cobbler at http://172.17.10.14:80/cobbler_api  
  3. - reading URL: http://172.17.10.14/cblr/svc/op/ks/profile/centos5.8-xen-x86_64  
  4. install_tree: http://172.17.10.14/cblr/links/centos5.8-xen-x86_64  
  5. libvirtd is stopped  
  6. libvirtd needs to be running 

解决:

  1. chkconfig libvirtd on 
  2. /etc/init.d/libvirtd  start 

9.8 报错八

  1. koan --server=172.17.10.14 --virt-name=testvm   --virt --profile=centos5.8-xen-x86_64  
  2. - looking for Cobbler at http://172.17.10.14:80/cobbler_api  
  3. - reading URL: http://172.17.10.14/cblr/svc/op/ks/profile/centos5.8-xen-x86_64  
  4. install_tree: http://172.17.10.14/cblr/links/centos5.8-xen-x86_64  
  5. libvirtd (pid  3772) is running...  
  6. downloading initrd initrd.img to /var/lib/xen/initrd.img_koan  
  7. url=http://172.17.10.14/cobbler/images/centos5.8-xen-x86_64/initrd.img  
  8. - reading URL: http://172.17.10.14/cobbler/images/centos5.8-xen-x86_64/initrd.img  
  9. downloading kernel vmlinuz to /var/lib/xen/vmlinuz_koan  
  10. url=http://172.17.10.14/cobbler/images/centos5.8-xen-x86_64/vmlinuz  
  11. - reading URL: http://172.17.10.14/cobbler/images/centos5.8-xen-x86_64/vmlinuz  
  12. - warning: old python-virtinst detected, a lot of features will be disabled  
  13. - adding disk: /var/lib/xen/images//testvm-disk0 of size 5 (driver type=raw)  
  14. - ['virt-install', '--connect', 'xen:///', '--name', 'testvm', '--ram', '512', '--vcpus', '1', '--uuid', '42559fd2-385f-2435-80f1-9f5005a02a81', '--autostart', '--vnc', '--paravirt', '--boot', 'kernel=/var/lib/xen/vmlinuz_koan,initrd=/var/lib/xen/initrd.img_koan,kernel_args=ks=http://172.17.10.14/cblr/svc/op/ks/profile/centos5.8-xen-x86_64 ksdevice=link kssendmac lang= text ', '--os-variant', 'rhel5', '--disk', 'path=/var/lib/xen/images//testvm-disk0,size=5', '--network', 'bridge=xenbr0', '--wait', '0', '--noautoconsole']  
  15. usage: virt-install --name NAME --ram RAM STORAGE INSTALL [options]  
  16.  
  17. virt-install: error: no such option: --autostart 

解决

  1. 我安装的  
  2. 系统版本:CentOS5.8 64bit  
  3. koan版本:koan-2.2.3-2.el5  
  4. xen版本:xen-3.0.3-142.el5_9.2  
  5. 通过EPEL安装的koan版本为koan-2.2.3-2.el5,使用中报错较多,后更换为koan-1.6.6-1.el5此版本比较稳定,下载链接:ftp://rpmfind.net/linux/epel/5/i386/koan-1.6.6-1.el5.noarch.rpm 

9.9 报错九

  1. cobbler check 
  2. The following are potential configuration items that you may want to fix:  
  3.  
  4. 1 : comment 'dists' on /etc/debmirror.conf for proper debian support 
  5. 2 : comment 'arches' on /etc/debmirror.conf for proper debian support  
  6.  
  7. Restart cobblerd and then run 'cobbler sync' to apply changes. 

解决
关于debmirror编辑注释
修改 /etc/debmirror.conf 配置文件,注释掉 @dists 和 @arches 两行

  1. sed -i  's|@dists=.*|#@dists=|'  /etc/debmirror.conf  
  2. sed -i  's|@arches=.*|#@arches=|'  /etc/debmirror.conf 

9.10 报错十

  1. /usr/bin/ipmitool power status  
  2. Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory  
  3. Unable to get Chassis Power Status 

解决

  1. /etc/init.d/ipmi start   
  2. Starting ipmi drivers:                                     [  OK  ]  
  3. /etc/rc.d/init.d/ipmievd start    
  4. Starting ipmievd:  
  5. ipmievd: using pidfile /var/run/ipmievd.pid0  
  6.  
  7. chkconfig  ipmi on               
  8. chkconfig  ipmievd on 

再执行查看电源状态

  1. /usr/bin/ipmitool power status            
  2. Chassis Power is on 

9.11 报错十一

  1. obbler system edit --name=host-188116  --power-address=172.17.11.20  --power-type='ipmitool'  --power-user=root  --power-pass=djxxxx  
  2. usage: cobbler [options]  
  3.  
  4. cobbler: error: option --power-type: invalid choice: 'ipmitool' (choose from 'ack_manual', 'apc', 'apc_snmp', 'bladecenter', 'brocade', 'bullpap', 'cisco_mds', 'cisco_ucs', 'drac', 'drac5', 'egenera', 'ifmib', 'ilo', 'ilo_mp', 'ipdu', 'ipmilan', 'lpar', 'manual', 'mcdata', 'node', 'rhevm', 'rps10', 'rsa', 'rsb', 'sanbox2', 'scsi', 'scsi_test', 'tool', 'virsh', 'vixel', 'vmware', 'vmware_helper', 'vmware_soap', 'wti', 'xvm', 'xvmd') 

解决
选择合适的power类型,报错后面已经列出可选参数,我这里使用的DELL PE1950应该选择ipmilan

  1. cobbler system edit --name=host-188116  --power-address=172.17.11.20  --power-type='ipmilan'  --power-user=root  --power-pass=djxxxx 

9.12 报错十二

电源管理相关的报错

 

  1. cobbler system edit --name host-xxx --power-address=172.17.11.20 --power-type="ipmitool" --power-user=root --power-pass=passwd  
  2. power management type must be one of: 

 

  1. cobbler system powerstatus --name=host-xx  
  2. task started: 2013-03-28_115206_power  
  3. task started (id=Power management (status), time=Thu Mar 28 11:52:06 2013)  
  4. Exception occured: cobbler.cexceptions.CX  
  5. Exception value: 'no power type set for system' 
  6. Exception Info:  
  7. File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 126, in die  
  8. raise CX(msg)  
  9. Exception occured: cobbler.cexceptions.CX  
  10. Exception value: 'no power type set for system' 
  11. Exception Info:  
  12. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 89, in run  
  13. rc = self._run(self) 
  14.  
  15. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 259, in runner  
  16. self.remote.power_system(object_id,self.options.get("power",""),token,logger=self.logger)  
  17. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1919, in power_system  
  18. rc=self.api.power_status(obj, user=None, password=None, logger=logger)  
  19. File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 1041, in power_status  
  20. return action_power.PowerTool(self._config, system, self, user, password, logger = logger).power("status")  
  21. File "/usr/lib/python2.4/site-packages/cobbler/action_power.py", line 74, in power  
  22. utils.die(self.logger,"no power type set for system")  
  23. File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 134, in die  
  24. raise CX(msg)  
  25. !!! TASK FAILED !!! 

 

  1. cobbler system powerstatus --name=host-188116  
  2. task started: 2013-03-28_124153_power  
  3. task started (id=Power management (status), time=Thu Mar 28 12:41:53 2013)  
  4. cobbler power configuration is:  
  5. type : ipmilan  
  6. address: 172.17.11.20  
  7. user : root  
  8. id :   
  9. running: /usr/sbin/fence_ipmilan  
  10. received on stdout: Getting status of IPMI:172.17.11.20...Chassis power = On 
  11. Done  
  12. received on stderr:   
  13. Exception occured: cobbler.cexceptions.CX  
  14. Exception value: "command succeeded (rc=0), but output ('Getting status of IPMI:172.17.11.20...Chassis power = On\nDone\n') was not understood" 
  15. Exception Info:  
  16. File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 126, in die  
  17. raise CX(msg)  
  18. Exception occured: cobbler.cexceptions.CX  
  19. Exception value: "command succeeded (rc=0), but output ('Getting status of IPMI:172.17.11.20...Chassis power = On\nDone\n') was not understood" 
  20. Exception Info:  
  21. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 89, in run  
  22. rc = self._run(self)  
  23. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 259, in runner  
  24. self.remote.power_system(object_id,self.options.get("power",""),token,logger=self.logger)  
  25. File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1919, in power_system  
  26. rc=self.api.power_status(obj, user=None, password=None, logger=logger)  
  27. File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 1041, in power_status  
  28. return action_power.PowerTool(self._config, system, self, user, password, logger = logger).power("status")  
  29. File "/usr/lib/python2.4/site-packages/cobbler/action_power.py", line 116, in power  
  30. utils.die(self.logger,"command succeeded (rc=%s), but output ('%s') was not understood" % (rc, output))  
  31. File "/usr/lib/python2.4/site-packages/cobbler/utils.py", line 134, in die  
  32. raise CX(msg)  
  33. !!! TASK FAILED !!! 

解决方法详见步骤8.2、8.3,详细如下:

8.2 安装电源管理工具cman

yum install cman -y

Cobbler代码维护者jimi告知:某些系统版本将执行程序安装在/sbin/目录下,通过rpm -ql cman查看,CentOS5.8下如此解决即可

ln -s /sbin/fence_* /usr/sbin/

8.3 修改电源管理python脚本

备份

cp  /usr/lib/python2.4/site-packages/cobbler/action_power.py /usr/lib/python2.4/site-packages/cobbler/action_power.py.$(date +%F)

编辑

vim /usr/lib/python2.4/site-packages/cobbler/action_power.py 

删除或注释此文件如下代码

utils.die(self.logger,"command succeeded (rc=%s), but output ('%s') was not understood" % (rc, output))

删除文件action_power.pyo 、 action_power.pyc

这两个文件在目录/usr/lib/python2.4/site-packages/cobbler/下

重启cobbler,注意一定是重启cobbler

cobbler reboot

步骤8.2、8.3是我在使用电源管理中发现的问题,后通过github与Cobbler代码维护者jimi沟通解决的,非常感谢他的帮助,详见

https://github.com/cobbler/cobbler/issues/426

 

 《Cobbler部署指南》参考资料:

https://github.com/cobbler/cobbler/wiki

cobbler、koan man手册及help命令帮助

 

 

转自: http://blog.sina.com.cn/s/blog_61c07ac50101d0b7.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/284251.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于.NetCore开发博客项目 StarBlog - (16) 一些新功能 (监控/统计/配置/初始化)

系列文章基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客?基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目基于.NetCore开发博客项目 StarBlog - (3) 模型设计基于.NetCore开发博客项目 StarBlog - (4) markdown博客批量导入基于.N…

堪比JMeter的.Net压测工具 - Crank 入门篇

1. 前言 Crank 是.NET 团队用来运行基准测试的基准测试基础架构,包括(但不限于)来自TechEmpower Web 框架基准测试的场景,是2021年.NET Conf 大会上介绍的一项新的项目,其前身是Benchmarks。 Crank目标之一是为开发人员提供一种工…

【GlobalMapper精品教程】016:按照指定字段批量生成不同用地类型的矢量图层

Globalmapper中可以很方便的根据指定的字段,对矢量数据进行批量提取,生成不同类型的多个矢量数据,本文以土地利用现状数据为例,基于DLMC,提取出不同用地类型的矢量图层。 参考阅读:【ArcGIS遇上Python】ArcGIS Python按照指定字段批量筛选不同类型的图斑(以土地利用数据…

javascript闭包—围观大神如何解释闭包

闭包的概念已经出来很长时间了,网上资源一大把,本着拿来主意的方法来看看。 这一篇文章 学习Javascript闭包(Closure) 是大神阮一峰的博文,作者循序渐进,讲的很透彻。下面一一剖析。 1.变量的作用域 变量的…

298. Binary Tree Longest Consecutive Sequence

题目:Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The longest consecutive path need to…

Educational Codeforces Round 37 (Rated for Div. 2)

Educational Codeforces Round 37 (Rated for Div. 2) A.Water The Garden 题意&#xff1a;Max想给花园浇水。花园可被视为长度为n的花园床&#xff0c;花园内共有k个水龙头&#xff0c;分别在花园的xi&#xff08;0≤xi<n&#xff09;处&#xff0c;在j秒内花园的[xi-(j-1…

详解 .Net6 Minimal API 的使用方式

随着 .Net6 的发布&#xff0c;微软也改进了对之前 ASP.NET Core 构建方式&#xff0c;使用了新的 Minimal API 模式。以前默认的方式是需要在 Startup 中注册 IOC 和中间件相关&#xff0c;但是在 Minimal API 模式下你只需要简单的写几行代码就可以构建一个 ASP.NET Core的We…

.NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的

点击蓝字关注我们今年是 .NET 发布20周年&#xff0c;值此20周年之际&#xff0c;微软 Reactor 特别策划了 .NET 20周年系列主题专访。我们邀请了数位中国 .NET 领域的技术专家以及社区名人&#xff0c;来聊聊他们与 .NET 的情缘、认识 .NET 的契机、选择 .NET 的理由&#xff…

【ArcGIS错误异常100问】之005:ArcGIS字段计算器python中文编码问题解决

问题描述&#xff1a; 现因工作的需要&#xff0c;对照2017最新版&#xff1a;《土地利用现状分类》&#xff08;GBT 21010-2017&#xff09;&#xff0c;需根据DLMC对DLBM进行批量修改&#xff0c;如旱地是0103&#xff0c;其他林地是0307等&#xff0c;共计19种用地类型。 问…

【ArcGIS微课1000例】0055:根据图层创建自定义图例符号案例教程

在利用ArcGIS作图时,有时候需要根据线状或面状图层自己的矢量形状去创建图例项目符号,本文讲解根据图层创建自定义图例符号。 本实验使用的数据为配套案例数据包中的0055.rar中的水库数据。 文章目录 1. 添加“新建图例图面形状”工具2. 根据图层形状创建符号3. 绘制形状符号…

jQuery 3.3.1已经发布,开发团队正在准备4.0版本

\看新闻很累&#xff1f;看技术新闻更累&#xff1f;试试下载InfoQ手机客户端&#xff0c;每天上下班路上听新闻&#xff0c;有趣还有料&#xff01;\\\jQuery 3.3.1已经发布&#xff0c;其中包含了许多新特性也提出要移除几个之前的特性&#xff0c;移除一些特性是为了jQuery …

C#.NET版本、Visual Studio版本对应关系

C#版本.NET版本Visual Studio版本发布日期特性C# 1.0.NET Framework 1.0Visual Studio .NET 20022002-02-13委托、事件C# 1.1.NET Framework 1.1Visual Studio .NET 20032003-04-24APM&#xff08;异步编程模型&#xff09;C# 2.0.NET Framework 2.0Visual Studio 20052005-11-…

真魔法!图形化管理 Kafka 超轻量的自动化工具

Kafka Magic[1] 是一个用于处理 Apache Kafka 集群的 GUI 工具。它可以查找和显示消息、在 Topic 之间转换和移动消息、查看和更新模式、管理 Topic 以及自动化复杂任务。Kafka Magic 通过方便的用户界面促进 Topic 管理、QA 和集成测试。Kafka Magic Community Edition 可免费…

前端工程构建工具——Yeoman

一、Yeoman 简介 通常在开发新项目时我们都需要配置工程环境&#xff0c;开发目录&#xff0c;需要下载一些库、框架文件&#xff08;如 jQuery、Backbone 等&#xff09;&#xff0c;配置编译环境&#xff08;Less、Sass、Coffeescript等&#xff09;&#xff0c;甚至还要配置…

【FME实战教程】001:FME2020中文安装图文教程(附安装包下载)

文章目录1. 安装license2. 安装FME Desktop3. 安装中文语言4. FME软件下载地址1. 安装license 打开软件安装包中的fme-flexnet-win-x64.msi&#xff0c;如下图所示&#xff1a; 点击Next。 点击Next。 单击install。 点击finish&#xff0c;完成。 &#xff08;1&#xff09;修…

算法导论 第三部分——基本数据结构——第14章:数据结构的扩张

本章通过扩张红黑树构造出两种数据结构&#xff1a;动态顺序统计和区间树。 1、动态顺序统计&#xff1a;查找倒数第i小的数据 复杂度为 lg(n) 为什么是扩张红黑树而不是搜索二叉树或者二叉树&#xff1f; 相对于搜索二叉树&#xff0c;红黑树的平衡性更好&#xff0c;高度在l…

/hgfs下无共享文件夹?/mnt下没有hgfs文件夹?vmhgfs-fuse:找不到命令?

前言&#xff1a;最近在使用linux的过程中&#xff0c;需要在宿主操作系统与客户操作系统间建立共享文件夹&#xff0c;遇到了些许问题&#xff0c;在网上参考了许多文章与各种尝试后&#xff0c;现得以解决&#xff0c;分享如下。1、系统环境&#xff1a;宿主操作系统&#xf…

GraphQL入门有

本文将从GraphQL是什么&#xff0c;为什么要使用GraphQL&#xff0c;使用GraphQL创建简单例子&#xff0c;以及GraphQL实战&#xff0c;四个方面对GraphQL进行阐述。说得不对的地方&#xff0c;希望大家指出斧正。 github项目地址&#xff1a;https://github.com/Charming2015/…

对话庄表伟:开源第一课

庄表伟目前就职于华为的开源管理中心。自2014年开源社成立之初&#xff0c;他便友情参与了开源社的筹办工作。2017年&#xff0c;开源社转型为完全由个人成员组成的组织&#xff0c;庄表伟就以个人身份加入了开源社。作为开源社理事&#xff0c;当被问到“为什么要参选”时&…

【FME实战教程】002:FME完美实现CAD数据转shp案例教程(以三调土地利用现状数据为例)

FME完美实现CAD数据转shp案例教程&#xff08;以三调土地利用数据为例&#xff09; 文章目录1. cad数据预览2. 转换过程3. shp数据预览1. cad数据预览 2. 转换过程 &#xff08;1&#xff09;打开FME Desktop2020中文软件&#xff0c;点击【新建】。 &#xff08;2&#xff09…