Author Archives: Robins

[Solved] Docker error: “unknown runtime specified NVIDIA” using GPU“

Question 1 recurrence

System: Ubuntu 18.04 docker version: 20.10.7
when I start a container, run the following command:

docker run -itd \
   --runtime=nvidia --gpus=all \
   -e NVIDIA_DRIVER_CAPABILITIES=compute,utility,video,graphics \
   image_name
   

report errors:

docker: Error response from daemon: Unknown runtime specified nvidia.
See 'docker run --help'.

Solution 1

This is because the user did not join the docker group and added his own user to the docker user group.

sudo usermod -a -G docker $USER

Question 2 recurrence

docker: Error response from daemon: Unknown runtime specified nvidia.
See 'docker run --help'.

Solution 2

NVIDIA docker2 needs to be installed

sudo apt-get install -y nvidia-docker2

Restart docker

sudo systemctl daemon-reload
sudo systemctl restart docker

How to Solve VScode 2022 error: msvcp110d.dll not found

Recently, I’m using vs 2022 for development. Record the solutions that msvcp110d.dll can’t find.

Method 1: in the project -> Attribute -> c/c++ -> Code generation -> Modify to multithreaded debugging (MDD) at runtime

The reason for the error is that the msvcp110d.dll library is missing when compiling the dynamic library. The VC library used by the incompatible version of VS is different

Method 2: Download vcredist from the official website_X64.exe and vcredist_ X86.exe installation (valid for release only)

Method 3: Download msvcp110d.dllmsvcp110d.dll

Save the downloaded DLL file in the system directory: C: Windows\system32 C:Windows\syswow64 (my system is win10) and restart the computer

[Solved] Vscode connect virtual machine error: can’t be established

Record a problem with the vscode connection virtual machine

There is no problem when using vscode to connect the virtual machine for the first time
when returning to school to use campus network connection, set the virtual machine network to bridge mode

after obtaining IP, an error is reported when using vscode to connect:

The authenticity of host '192.168.1.106 (192.168.1.106)' can't be established.

Tried to use the command and modify the sshconfig file
SSH – O stricthostkeychecking = no 192.168.0.xxx

Stricthostkeychecking no
userknownhostsfile/dev/null
results are not allowed
the final solution is


Add “remote.SSH.Uselocalserver” on the last side: true

[Solved] JavaErrors_mybatis collection column Pass Value Error

Error instantiating class java.lang.Integer with invalid types () or values (). Cause: java.lang.NoSuchMethodException: java.lang.Integer.()

1. Background: when multiple parameter values are passed into the column of collection in mybatis, an error is reported
2. Solution:
an entity class in your one to many relationship. In the corresponding mapper.xml, the parametertype of SQL method must be in the form of map

<select id="getMaskRuleByMaskStrategyId" parameterType="java.util.Map" resultMap="MaskRuleResultWithMaskTypeMap">
        select * from t_capaa_maskstrategy_mask_strategy_conf a left join t_capaa_maskstrategy_mask_rule b on a.mask_rule_id = b.id
        where mask_strategy_id = #{maskStrategyId,jdbcType=INTEGER}
</select>

Solution:

Be sure to type parametertype as map, otherwise, in the column of the collection tag, you cannot use the format of {K1 = V1, K2 = V2} .

[Solved] Springboot project introduces Font library error: java.awt.fontformatexception: bad table, tag = XXXXXX

What scenario will encounter this problem?

In general, it can be said that in most cases, if the synthesis of images with text is not involved, the font file may not be used. When this file is needed, we will put our static resource file in the resource directory, and then use the program to read the static resources. This is a normal practice. This is no problem, However, you may find that it is normal to run unit tests without error, and the effect is in line with your expectations. However, when you package and compile and run locally through Java – jar xxx.jar, an error will be reported:

java.awt.FontFormatException: bad table, tag=1111577413
        at sun.font.TrueTypeFont.init(TrueTypeFont.java:576)
        at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:208)
        at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:188)
        at sun.font.CFontManager.createFont2D(CFontManager.java:155)
        at java.awt.Font.<init>(Font.java:615)
        at java.awt.Font.createFont0(Font.java:969)
        at java.awt.Font.createFont(Font.java:877)
        at utils.PosterUtil.<clinit>(PosterUtil.java:35)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1312)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1304)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1224)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1304)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1224)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1304)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1224)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:893)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
        at com.vdong.scrm.plugins.PluginsApplication.main(PluginsApplication.java:25)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)

reason

The font library font referenced by the Maven project of the springboot project passes through the Maven filter, which will destroy the binary file format of the font file

Solution:

Add the following configuration in pom.xml file:

<build>
  <plugins> 
    <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-resources-plugin</artifactId>
     <configuration>
          <nonFilteredFileExtensions>
               <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
               <nonFilteredFileExtension>woff</nonFilteredFileExtension>
               <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
          </nonFilteredFileExtensions>
     </configuration>
    </plugin>
  </plugins>
</build>

Then use MVN clean install to package and compile again, and then use Java – jar xxx.jar to avoid errors.

How to Solve MAC electronic installation dependent startup error

file: https://github.com/electron/electron/issues/8466

Error message:

Solution:

Switch to node_ The index file used for the electron pair in modules, then enter the terminal and execute it in the current directory with node install.js before completing the electron dependent installation

Then go to the project again and start the project

[Solved] WSUS client access server exception error – 0x8024401f

Background: the customer reported that the Windows Server reported an error during automatic update and could not update

Server version: Windows Server 2012 R2 standard

IIS version: 8

WSUS version: 6.3.9600

Error message:

2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      Warning: and at“ http://xxxx.xxxx.xxx.xxx:8530/ClientWebService/client.asmx ”An error occurred while communicating with the endpoint of
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      Warning: the server has returned the HTTP status code "500 (0x1f4)" and the text "internal server error"
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      Warning: the server cannot process the request
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      WARNING: MapToSusHResult mapped Nws error 0x803d000f to 0x8024401f
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      WARNING: Web service call failed with hr = 8024401f.
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      WARNING: Current service auth scheme='None'.
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      WARNING: Proxy List used: '(null)', Bypass List used: '(null)', Last Proxy used: '(null)', Last auth Schemes used: 'None'.
2021-11-29      22:15:10:401      eight hundred and four      cd8      WS      FATAL: OnCallFailure failed with hr=0X8024401F

Troubleshooting steps:

1. Access the URL on the client according to the log   http://xxxx.xxxx.xxx.xxx:8530/ClientWebService/client.asmx

The following occurs:

You can see the specific reason why the client cannot troubleshoot

2. Use the server to directly access the URL   http://xxxx.xxxx.xxx.xxx:8530/ClientWebService/client.asmx

There is an error in which the type cannot be converted

Because I have contacted the code before and thought that some program files of WSUS had problems, I tried to copy files from other WSUS servers for backup and replacement, but it didn’t work

3. Search problem, and finally compare the hosting mode of WSUS service application resource pool in IIS server from “classic” to “integration”

4. When the client accesses the URL again, the following page appears and returns to normal

JAVA Code Start Exception Error View Does Not Exsit [Solved]

Foreword: the Java code startup exception and error report view does not exist, but the view can still be seen in Navicat, but it does not exist when you double-click to open the view

Remedy: (all the following operations are performed in Navicat’s SQL command line)
1. Look for the view in the previous database backup
2. The use command allows us to use the database, the use command format: use ;
3. show create view ;
4. Copy the code shown in the previous step how to create
5. Then use the new database;
6. Clean up the code for creating a view copied in 4, and replace the original database name with the new database name
7. Just run

MySQL 8.0.12 runs SQL error #1055 [How to Solve]

1. Error:

An error is reported when opening the database through phpstudy;

2. This error is due to the MySQL version problem

3. Solution

(1) Close the error box and view the SQL used by the current database_ mode:

Enter select in the SQL editor  @@ sql_Mode operation

(2) Modify the MySQL configuration file. The configuration file under windows is my.ini. Find out SQL_Mode, copy this value, and add a configuration item in my.in (delete the option only_full_group_by for the queried value, and copy everything else)

In my.in file, Modify SQL after [mysqld]_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_ DATE,ERROR_ FOR_ DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

If the row is not added directly

(3) Restart Mysql to take effect