Author Archives: Robins

Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems

1) First, check the tftp-server installed on the server
        using the command: rpm -qa | grep tftp-server
        If there is an installed tftp, it will be listed here
2) Install tftp-server and xinetd
        using the following commands to perform corresponding services Installation:
        $yum -y install tftp-server
        $yum -y install xinetd
3) Modify the tftp configuration file
    using the following command:
        $vi /etc/xinetd.d/tftp Open the configuration file
        service tftp
        {
            socket_type = dgram
            protocol = udp
            wait = yes
            user = root
            server = /usr/sbin/in.tftpd
            server_args = -s /var/lib/tftpboot
            disable = no //The place that needs to be modified, the initial time is yes
            per_source = 11
            cps = 100 2
            flags = IPv4
        }
4) To restart the service,
        use the following command to restart the service
        $/bin/systemctl restart xinetd.service
        If it does not work, use the following command
        $/bin/systemctl enable xinetd.service / /Start the service
        $/bin/systemctl start xinetd.service //Start the service to
        view the service startup status
        $ps aux | grep xinetd or $ps -ef|grep xinetd or ps -a | grep tftp
5) Possible problems
        5.1) In When starting xinetd.service, it prompts
            Redirecting to /bin/systemctl restart xinetd.service
            Failed to issue method call: Unit xinetd.service failed to load: No such file or directory.
            Help system is not installed xinetd, the need to use yum -y instal xinetd.service serving install
        5.2) occurs when you start xinetd.service:
            Redirecting to / bin / systemctl restart xinetd.service
            command may be initiated systemctl restart xinetd.service
            more These are the steps I took to install tftp and some of the problems I encountered. Maybe the reader has other problems during the installation process, but the problem should not be big.

6) xinetd started successfully, you can check the running status of xinetd

         netstat -tnlp 

Mybatis Error: Result Maps collection already contains value

1.Problem description

An inexplicable error occurred when mybatis started under idea

org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\idea_work\2021-04-06\xxxx\test-web\target\classes\mapper\demo\ExampleAsyncTreeMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\idea_work\2021-04-06\xxxx\test-web\target\classes\mapper\demo\ExampleAsyncTreeMapper.xml]'. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.xxxx.web.test.mapper.ExampleAsyncTreeMapper.ExampleAsyncTreeResult
	at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.buildSqlSessionFactory(MybatisSqlSessionFactoryBean.java:595)
	at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.afterPropertiesSet(MybatisSqlSessionFactoryBean.java:431)
	at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.getObject(MybatisSqlSessionFactoryBean.java:628)
	at com.xxxx.common.db.collector.SqlSessionFactoryCreator.createSqlSessionFactory(SqlSessionFactoryCreator.java:274)
	at com.xxxx.common.core.config.SqlSessionFactoryConfig.sqlSessionFactoryPrimary(SqlSessionFactoryConfig.java:46)
	at com.xxxx.common.core.config.SqlSessionFactoryConfig$$EnhancerBySpringCGLIB$$916ae73.CGLIB$sqlSessionFactoryPrimary$0(<generated>)
	at com.xxxx.common.core.config.SqlSessionFactoryConfig$$EnhancerBySpringCGLIB$$916ae73$$testClassBySpringCGLIB$$e60ba3c6.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at com.xxxx.common.core.config.SqlSessionFactoryConfig$$EnhancerBySpringCGLIB$$916ae73.sqlSessionFactoryPrimary(<generated>)
	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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:635)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	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:1307)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1509)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	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:1307)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
	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:1420)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
	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:141)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at com.xxxx.testApplication.main(testApplication.java:38)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\idea_work\2021-04-06\xxxx\test-web\target\classes\mapper\demo\ExampleAsyncTreeMapper.xml]'. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.xxxx.web.test.mapper.ExampleAsyncTreeMapper.ExampleAsyncTreeResult
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:123)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:95)
	at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.buildSqlSessionFactory(MybatisSqlSessionFactoryBean.java:593)
	... 56 common frames omitted
Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.xxxx.web.test.mapper.ExampleAsyncTreeMapper.ExampleAsyncTreeResult
	at com.baomidou.mybatisplus.core.MybatisConfiguration$StrictMap.put(MybatisConfiguration.java:429)
	at com.baomidou.mybatisplus.core.MybatisConfiguration$StrictMap.put(MybatisConfiguration.java:399)
	at com.baomidou.mybatisplus.core.MybatisConfiguration.addResultMap(MybatisConfiguration.java:253)
	at org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:209)
	at org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:289)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElement(XMLMapperBuilder.java:254)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.resultMapElements(XMLMapperBuilder.java:246)
	at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:119)
	... 58 common frames omitted

The returned error message: caused by: Java. Lang. illegalargumentexception: result maps collection already contains value for has been explained, there are duplicate!

2.Solutions

Global search of this class, there are indeed two, delete the irrelevant one on the line! Or clear it and recompile it

</ div>

.NETproject compilation error. Type or namespace name could not be found. Visual studio automatically introduces dependency package (shortcut key)

Intro

Using visual studio to compile a. Net MVC project, many errors are reported in the following form:

CS0246	The type or namespace name 'xxx' could not be found (are you missing a using directive or an assembly reference?)
CS0246	Typ- oder Namespace-Name "xxx" nicht gefunden (fehlender Verwendungshinweis oder Assembly-Referenz?)

Screenshot:

Similar to in Java, if you directly use some class definitions without importing related packages, a similar error will be reported.

CS 0246 official document of error code: compiler error cs0246 | Microsoft docs

solve

In the above screenshot, the solution has been given:

is actually to add the correct class path using XXX .

However, in different versions of visual studio, does not introduce the same shortcut keys in the namespace where the class is located.

There are three ways to try:

Alt+Enter
Ctrl+.
Shift+Alt+F10

Of course, if you don’t know the shortcut key, but you know the full path (namespace, classname) of the class you are using, you should add using XXX at the beginning of the source code is OK.

When the database table field is set to self incrementing, use the entity class to insert or update the data to solve the error (Hibernate Framework)

Problem: there are self increasing columns in database table fields. When you add or update data using entity classes, you will report an error (Hibernate Framework)

[2021-05-06 15:12:04] [WARN] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:143] SQL Error: -2664, SQLState: 22000
[2021-05-06 15:12:04] [ERROR] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144] Fehler bei Zeile 1:
Versuch, die selbstinkrementierende Spalte [NUM] zu ändern
org.hibernate.exception.DataException: Fehler bei Zeile 1:
Versuch, die selbstinkrementierende Spalte [NUM] zu ändern
	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:134)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
	at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:146)
	at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
	at com.sun.proxy.$Proxy502.prepareStatement(Unknown Source)
	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.buildBatchStatement(AbstractBatchImpl.java:144)
	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.getBatchStatement(AbstractBatchImpl.java:127)
	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2964)
	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2915)
	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3244)
	at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:113)
	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276)
	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
	at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:59)
	at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1099)
	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1528)
	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
	at org.jeecgframework.core.common.dao.impl.GenericBaseCommonDao.findByPropertys(GenericBaseCommonDao.java:184)
	at org.jeecgframework.core.common.service.impl.CommonServiceImpl.findByPropertys(CommonServiceImpl.java:145)
	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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy80.findByPropertys(Unknown Source)
	at com.aisino.platform.lhjh.service.impl.FgwLhjhZbServiceImpl.doTzAudit(FgwLhjhZbServiceImpl.java:538)
	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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy208.doTzAudit(Unknown Source)
	at com.aisino.platform.lhjh.controller.FgwLhjhZbController.doAudit(FgwLhjhZbController.java:524)
	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.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at filter.FrameTao.doFilter(FrameTao.java:22)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:114)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1626)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: dm.jdbc.driver.DMException: Fehler bei Zeile 1:
Versuch, die selbstinkrementierende Spalte [NUM] zu ändern
	at dm.jdbc.driver.DBError.throwException(DBError.java:636)
	at dm.jdbc.c.b.p.S(MSG.java:225)
	at dm.jdbc.c.b.p.P(MSG.java:185)
	at dm.jdbc.c.b.p.O(MSG.java:166)
	at dm.jdbc.c.a.a(DBAccess.java:786)
	at dm.jdbc.c.a.a(DBAccess.java:206)
	at dm.jdbc.driver.DmdbPreparedStatement.prepareSql(DmdbPreparedStatement.java:198)
	at dm.jdbc.driver.DmdbPreparedStatement.allocateHandle(DmdbPreparedStatement.java:167)
	at dm.jdbc.driver.DmdbPreparedStatement.<init>(DmdbPreparedStatement.java:120)
	at dm.jdbc.driver.DmdbPreparedStatement.<init>(DmdbPreparedStatement.java:134)
	at dm.jdbc.driver.DmdbConnection.do_prepareStatement(DmdbConnection.java:791)
	at dm.jdbc.driver.DmdbConnection.do_prepareStatement(DmdbConnection.java:777)
	at dm.jdbc.driver.DmdbConnection.prepareStatement(DmdbConnection.java:1395)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:476)
	at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:929)
	at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:473)
	at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:349)
	at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:138)
	... 102 more

Solution: add the properties insertable = false and updatable = false to the @ column annotation with self increasing attribute fields.

@Column(name = "num", insertable = false, updatable = false)
    private Integer num;

Proguard Packaging Error: You have to specify ‘-keep‘ options if you want to write out kept elements with ‘-print

1.Problem description

Using Proguard to obfuscate the code and execute the package command, the following error is reported:

 [proguard] Error: You have to specify '-keep' options if you want to write out kept elements with '-printseeds'.
 [proguard] Note: you're ignoring all warnings!

2.Solutions

This is because when performing obfuscation in Proguard, you must specify a – keep. If you want to obfuscate all, fill in a nonexistent package name

<option>-keep public class com.aaaa.* {
  public protected *;
  }
</option>

Vue introduces ecarts, init initializes and reports an error

Vue introduces ecarts, init initializes and reports an error

1. Download ecarts

npm install echarts --save

2. I have only one page to refer to ecarts, so I directly introduce it into the page

import echarts from 'echarts'

3. Write corresponding examples in methods

myEcharts() {
      this.chart = echarts.init(document.getElementById('main'))

      this.chart.setOption({
        tooltip: {
          trigger: 'item',
          formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        legend: {
          bottom: 10,
          left: 'center',
          data: ['rented', 'not rented', 'booked']
        },
        series: [
          {
            name: 'Vehicle Rental Status',
            type: 'pie',
            radius: '55%',
            center: ['50%', '40%'],
            data: [
              { value: 40, name: 'rented' },
              { value: 30, name: 'not rented' },
              { value: 30, name: 'booked' }
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
      })
    }

4. Reference method in mounted

mounted() {
    this.myEcharts()
  }

Results an error was reported, init initialization error was reported

it took half an hour to find out the reason, because the import mode was wrong
the original import accessories from 'accessories' should be changed to Import * as accessories from' accessories' . The updated writing method in the official website. After modification, refresh the page

if ecarts is needed in many parts of the system, it can be introduced globally in main.js

import * as echarts from 'echarts'

Vue.prototype.$echarts = echarts

Declarative development tab in Vue

Tab case

First, CSS style

* {
      margin: 0;
      padding: 0;
    }

    .tab ul {
      overflow: hidden;
      padding: 0;
      margin: 0;
    }

    .tab ul li {
      box-sizing: border-box;
      padding: 0;
      float: left;
      width: 100px;
      height: 45px;
      line-height: 45px;
      list-style: none;
      text-align: center;
      border-top: 1px solid blue;
      border-right: 1px solid blue;
      cursor: default
    }

    .tab ul li:first-child {
      border-left: 1px solid blue;
    }

    .tab ul li.active {
      background-color: orange;
    }

    .tab div {
      width: 500px;
      height: 300px;
      display: none;
      text-align: center;
      font-size: 30px;
      line-height: 300px;
      border: 1px solid blue;
      border-top: 0px;
    }

    .tab div.current {
      display: block;
    }

Second, structure

<div id="app">
    <div class="tab">
      <ul>
        <li class="active">apple</li>
        <li>orange</li>
        <li>lemon</li>
      </ul>
      <div class="current">
        <img src="img/apple.png">
      </div>
      <div>
        <img src="img/orange.png">
      </div>
      <div>
        <img src="img/lemon.png">
      </div>
    </div>
  </div>

Third: JS logic

var vm = new Vue({
      el: '#app',
      data: {
      },
    methods: {
     }
)}

The following is the result of the HTML structure and JS code

1. HTML structure

<div id="app">
    <div class="tab">
      <!--  tab  -->
      <ul>
        <!-- dynamically bound class with active class name highlighted without active not highlighted-->
        <li @click="change(index)" :class='currentIndex==index?"active":""' v-for="(item, index) in list"
          :key="item.id">
          {{item.title}}</li>
      </ul>
      <!--  Corresponding displayed images -->
      <! -- dynamically bound class with current class name shown without current hidden-->
      <div :class="currentIndex==index?'current':''" v-for="(item, index) in list" :key="item.id"><img :src="item.path">
      </div>
    </div>
  </div>

2. JS logic

let vm = new Vue({
      el: '#app',
      data: {
        currentIndex: 0,// The current index of the tab defaults to 0  
        list: [{
          id: 1,
          title: 'apple',
          path: 'img/apple.png'
        },
        {
          id: 2,
          title: 'orange',
          path: 'img/orange.png'
        },
        {
          id: 3,
          title: 'lemon',
          path: 'img/lemon.png'
        }]
      },
      methods: {
        // The currentIndex is equal to the clicked index value by passing in the index 
        // thus controlling the class name    
        change(index) {
          this.currentIndex = index
        }
      }
    })

Tab view

Solution to some map files in JS folder after Vue packaging (remove the map. JS file)

Solution to some map files in JS folder after Vue packaging (remove map.js file)

1. Enter the directory under the project: project package/config/index. JS
find productionsourcemap

 /*
   Source Maps
   */
    productionSourceMap: true,  // Change true to false on this side
    // https://webpack.js.org/configuration/devtool/#production
    devtool: '#source-map',

Productionsourcemap: true,// change the true here to false

The solution to the crash loop back off error of coredns in k8s deployment

The solution to the crash loop back off error of coredns in k8s deployment

Problem description

Before doing the project, we need to use k8s to build a cluster. I’m a novice Xiaobai, and I’m going to do it step by step according to the online building steps (refer to the link website for the deployment process)
when I check the status of each pod in the cluster, I find that coredns has not been started successfully, and has been in the crashloopback off state, falling into the dead cycle of non-stop error restart

[root@k8s-master a1zMC2]# kubectl get pods -n kube-system
NAME                                 READY   STATUS             RESTARTS   AGE
coredns-bccdc95cf-9wd9n              0/1     CrashLoopBackOff   19         19h
coredns-bccdc95cf-qsf9f              0/1     CrashLoopBackOff   19         19h
etcd-k8s-master                      1/1     Running            3          19h
kube-apiserver-k8s-master            1/1     Running            3          19h
kube-controller-manager-k8s-master   1/1     Running            11         19h
kube-flannel-ds-amd64-sgqsm          1/1     Running            1          16h
kube-flannel-ds-amd64-swqhf          1/1     Running            1          16h
kube-flannel-ds-amd64-tnbmc          1/1     Running            1          16h
kube-proxy-259l8                     1/1     Running            0          16h
kube-proxy-qcnpt                     1/1     Running            0          16h
kube-proxy-rp7qx                     1/1     Running            3          19h
kube-scheduler-k8s-master            1/1     Running            11         19h

Solutions

Check the log file of coredns. The content is as follows

[root@k8s-master a1zMC2]# kubectl logs -f coredns-bccdc95cf-9wd9n -n kube-system
E0512 01:59:03.825489       1 reflector.go:134] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list *v1.Endpoints: Get https://10.96.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.96.0.1:443: connect: no route to host
E0512 01:59:03.825489       1 reflector.go:134] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list *v1.Endpoints: Get https://10.96.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.96.0.1:443: connect: no route to host
log: exiting because of error: log: cannot create log: open /tmp/coredns.coredns-bccdc95cf-9wd9n.unknownuser.log.ERROR.20210512-015903.1: no such file or directory

再通过kubectl describe pod coredns-bccdc95cf-9wd9n -n kube-system命令查看详情

Events:
  Type     Reason            Age                  From                 Message
  ----     ------            ----                 ----                 -------
  Warning  FailedScheduling  16h (x697 over 17h)  default-scheduler    0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.
  Warning  Unhealthy         15h (x5 over 15h)    kubelet, k8s-master  Readiness probe failed: Get http://10.244.0.2:8080/health: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
  Warning  Unhealthy         15h (x5 over 15h)    kubelet, k8s-master  Liveness probe failed: Get http://10.244.0.2:8080/health: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

I feel that there should be a problem connecting with the host, so I enter cat/etc/resolv. Conf to view the configuration file. It is found that the nameserver column is not the address of the host master.

With a try attitude, modify it to the IP address of the master node, and then restart docker and kubenet

[root@k8s-master a1zMC2]# systemctl stop kubelet
[root@k8s-master a1zMC2]# systemctl stop docker
[root@k8s-master a1zMC2]# iptables --flush
[root@k8s-master a1zMC2]# iptables -tnat --flush
[root@k8s-master a1zMC2]# systemctl start kubelet
[root@k8s-master a1zMC2]# systemctl start docker

Check the status and find that all pods can work normally!

[root@k8s-master a1zMC2]# kubectl get pods -n kube-system
NAME                                 READY   STATUS    RESTARTS   AGE
coredns-bccdc95cf-9wd9n              1/1     Running   21         20h
coredns-bccdc95cf-qsf9f              1/1     Running   21         20h
etcd-k8s-master                      1/1     Running   4          19h
kube-apiserver-k8s-master            1/1     Running   4          19h
kube-controller-manager-k8s-master   1/1     Running   12         19h
kube-flannel-ds-amd64-sgqsm          1/1     Running   1          17h
kube-flannel-ds-amd64-swqhf          1/1     Running   1          17h
kube-flannel-ds-amd64-tnbmc          1/1     Running   2          17h
kube-proxy-259l8                     1/1     Running   0          17h
kube-proxy-qcnpt                     1/1     Running   0          17h
kube-proxy-rp7qx                     1/1     Running   4          20h
kube-scheduler-k8s-master            1/1     Running   12         19h

Because I haven’t learned the content of cloud computing, there are some mistakes in the blog. Please correct them in the comments area.

db2 Database Error: table space access is not allowed

One day, my development colleague told me that the database couldn’t be used and reported “table space access is not allowed”. So I logged into the server to check db2diag. Log
and found that the log stopped in the morning

[14:51:46]db2inst1@gdtmsdb:~/sqllib/db2dump> ls -l|grep db2diag
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1 23195331  May 12 09:37 db2diag.log
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1 24481792  April  7 2016 db2diag.log_2016-04-08-13.49.13
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1 41023003  Jun  2 2017 db2diag.log_2017-06-02-10.27.09
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1 53019005  April  8 2019 db2diag.log_2019-04-09-07.10.34
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1    85065  April  9 2019 db2diag.log_2019-04-09-07.27.43
[14:51:46]-rw-rw-rw- 1 db2inst1 db2iadm1    63379  April  9 2019 db2diag.log_2019-04-09-07.33.49

2.Db2top – D tmsdb view the database table space

you can see that four file spaces are offline<Second, view the log information

[14:51:55]db2inst1@gdtmsdb:~/sqllib/db2dump> tail -n 1000 db2diag.log|more
14:52:07]2021-05-12-08.55.52.809736+480 E23154237E1192        LEVEL: Error (OS)
[14:52:07]PID     : 19571                TID : 47162285090560  PROC : db2sysc 0
[14:52:07]INSTANCE: db2inst1             NODE : 000            DB   : TMSDB
[14:52:07]APPHDL  : 0-7                  APPID: M000E092.CED2.210512005537
[14:52:07]AUTHID  : TMSUSR               HOSTNAME: gdtmsdb
[14:52:07]EDUID   : 25                   EDUNAME: db2agent (TMSDB) 0
[14:52:07]FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
[14:52:07]MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
[14:52:07]          DIA8701C Access denied for resource "", operating system return code 
[14:52:07]          was "".
[14:52:07]CALLED  : OS, -, open                             OSERR: EACCES (13)
[14:52:07]DATA #1 : Codepath, 8 bytes
[14:52:07]4:11:18:20:24:40
[14:52:07]DATA #2 : File name, 13 bytes
[14:52:07]/dev/raw/raw1
[14:52:07]DATA #3 : SQO Open File Options, PD_TYPE_SQO_FILE_OPEN_OPTIONS, 4 bytes
[14:52:07]SQLO_REVISE, SQLO_READWRITE, SQLO_SHAREWRITE, SQLO_USE_RAW_DEVICE, SQLO_WRITETHRU, SQLO_NO_FLUSH_ON_CLOSE
[14:52:07]DATA #4 : Hex integer, 4 bytes
[14:52:07]0x00000180
[14:52:07]DATA #5 : signed integer, 4 bytes
[14:52:07]0
[14:52:07]DATA #6 : Hex integer, 4 bytes
[14:52:07]0x00004000
[14:52:07]DATA #7 : String, 105 bytes
[14:52:07]Search for ossError*Analysis probe point after this log entry for further
[14:52:07]self-diagnosis of this problem.
[14:52:28]
[14:52:28]2021-05-12-08.55.52.811932+480 I23155430E3586        LEVEL: Error (OS)
[14:52:28]PID     : 19571                TID : 47162285090560  PROC : db2sysc 0
[14:52:28]INSTANCE: db2inst1             NODE : 000            DB   : TMSDB
[14:52:28]APPHDL  : 0-7                  APPID: M000E092.CED2.210512005537
[14:52:28]AUTHID  : TMSUSR               HOSTNAME: gdtmsdb
[14:52:28]EDUID   : 25                   EDUNAME: db2agent (TMSDB) 0
[14:52:28]FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
[14:52:28]CALLED  : OS, -, open                             OSERR: EACCES (13)
[14:52:28]DATA #1 : String, 111 bytes
[14:52:28]A total of 2 analysis will be performed :
[14:52:28] - User info
[14:52:28] - Path access permission
[14:52:28]
[14:52:28] Target file = /dev/raw/raw1
[14:52:28]DATA #2 : String, 184 bytes
[14:52:28]  Real user ID of current process       = 503
[14:52:28]  Effective user ID of current process  = 503
[14:52:28]  Real group ID of current process      = 304
[14:52:28]  Effective group ID of current process = 304
[14:52:28]DATA #3 : String, 41 bytes
[14:52:28]current sbrk(0) value: 0x000000000073a000
[14:52:28]DATA #4 : String, 204 bytes
[14:52:28]Information of each subdirectory leading up to the first inaccessible one is shown in the format below :
[14:52:28]   <UID>:<GID>:<permissions> (subdirectories)
[14:52:28]
[14:52:28]   0:0:755 (dev)
[14:52:28]   0:0:755 (raw)
[14:52:28]   0:6:660 (raw1)
[14:52:28]CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[14:52:28]  [0] 0x00002AE4BD0AF4AB /db2home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x2244AB
[14:52:53]  [1] 0x00002AE4BD0B0A33 ossLogSysRC + 0xB3
[14:52:53]  [2] 0x00002AE4BD0A28D4 /db2home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x2178D4
[14:52:53]  [3] 0x00002AE4BD09FB9D ossErrorAnalysis + 0x2D
[14:52:53]  [4] 0x00002AE4B7034E6C sqloSystemErrorHandler + 0x77C
[14:52:53]  [5] 0x00002AE4B50036A6 sqloopenp + 0xA36
[14:52:53]  [6] 0x00002AE4B211D6FD _Z20sqlbDMSDoContainerOpP12SQLB_POOL_CBPK9SQLP_LSN8iP16SQLB_POOLCONT_CB12SQLB_CONT_OPjS3_P12SQLB_GLOBALSb + 0x
[14:52:53]18D
[14:52:53]  [7] 0x00002AE4B2136931 _Z16sqlbDMSStartPoolP12SQLB_GLOBALSP12SQLB_POOL_CBb + 0x221
[14:52:53]  [8] 0x00002AE4B1FED9AB _Z14sqlbStartPoolsP12SQLB_GLOBALS + 0x61B
[14:52:53]  [9] 0x00002AE4B209EA56 sqlbinit + 0x1D78
[14:52:53]  [10] 0x00002AE4B4098D02 /db2home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x3247D02
[14:52:53]  [11] 0x00002AE4B409206D _ZN16sqeLocalDatabase12FirstConnectEP8SQLE_BWARcP8sqeAgentP8sqlo_gmtiiPb + 0x18FD
[14:52:53]  [12] 0x00002AE4B4080FF8 _ZN8sqeDBMgr23StartUsingLocalDatabaseEP8SQLE_BWAP8sqeAgentRccP8sqlo_gmtPb + 0x1558
[14:52:53]  [13] 0x00002AE4B403339F _ZN14sqeApplication13AppStartUsingEP8SQLE_BWAP8sqeAgentccP5sqlcaPc + 0x43F
[14:52:53]  [14] 0x00002AE4B402A19C _ZN14sqeApplication13AppLocalStartEP14db2UCinterface + 0x57C
[14:52:53]  [15] 0x00002AE4B4252310 _Z11sqlelostWrpP14db2UCinterface + 0x40
[14:52:53]  [16] 0x00002AE4B4251237 _Z14sqleUCengnInitP14db2UCinterfacet + 0x6F7
[14:52:53]  [17] 0x00002AE4B424FB08 sqleUCagentConnect + 0x4A8
[14:52:53]  [18] 0x00002AE4B4363B36 _Z18sqljsConnectAttachP13sqljsDrdaAsCbP14db2UCinterface + 0xB6
[14:52:53]  [19] 0x00002AE4B432804E _Z16sqljs_ddm_accsecP14db2UCinterfaceP13sqljDDMObject + 0x3CE
[14:52:53]  [20] 0x00002AE4B431B628 _Z17sqljsParseConnectP13sqljsDrdaAsCbP13sqljDDMObjectP14db2UCinterface + 0x58
[14:52:53]  [21] 0x00002AE4B431BE6B _Z10sqljsParseP13sqljsDrdaAsCbP14db2UCinterfaceP8sqeAgentb + 0x36B
[14:52:53]  [22] 0x00002AE4B4316049 /db2home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x34C5049
[14:52:53]  [23] 0x00002AE4B43144DC /db2home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x34C34DC
[14:52:53]  [24] 0x00002AE4B4311519 /db2home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x34C0519
[14:52:53]  [25] 0x00002AE4B431110B _Z17sqljsDrdaAsDriverP18SQLCC_INITSTRUCT_T + 0xEB
[14:52:53]  [26] 0x00002AE4B400CC77 _ZN8sqeAgent6RunEDUEv + 0xAD7
[14:52:53]  [27] 0x00002AE4B58821F7 _ZN9sqzEDUObj9EDUDriverEv + 0xF7
[14:52:53]  [28] 0x00002AE4B5017C83 sqloEDUEntry + 0x303
[14:52:53]  [29] 0x00002AE4B0C3B806 /lib64/libpthread.so.0 + 0x7806
[14:52:53]  [30] 0x00002AE4BDE7F64D clone + 0x6D

You can see the key words [14:52:28] target file =/dev/raw/raw1. It seems that there is something wrong with this file system
check whether the device is bare or not with db2pd – D tmsdv – tab

[15:04:47]db2inst1@gdtmsdb:~> db2pd -d tmsdb -tab
[15:04:48]
[15:04:48]Database Member 0 -- Database TMSDB -- Active -- Up 0 days 04:25:13 -- Date 2021-05-12-13.20.50.628719
[15:04:48]
[15:04:48]Tablespace Configuration:
[15:04:48]Address            Id    Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe  LastConsecPg RSE  Name
[15:04:48]0x00002AEB8D5540C0 0     SMS  Regular 32768  32       Yes  192      1     1         Def 1        0          31           No   SYSCATSPACE
[15:04:48]0x00002AEB8D561260 1     SMS  SysTmp  32768  32       Yes  192      1     1         On  1        0          31           No   TEMPSPACE1
[15:04:48]0x00002AEB8D56E400 2     DMS  Large   32768  32       No   32       2     2         Def 1        0          31           Yes  EOSWFCTX
[15:04:48]0x00002AEB8D57B5A0 3     DMS  Large   32768  4        Yes  24       1     1         Def 1        0          3            Yes  SYSTOOLSPACE
[15:04:48]0x00002AEB8D588740 4     DMS  UsrTmp  32768  32       No   32       2     2         Def 1        0          31           No   TEMP32K
[15:04:48]0x00002AEB8D5958E0 5     DMS  Large   32768  32       No   32       2     2         Def 1        0          31           Yes  TMSDBUSR
[15:04:48]0x00002AEB8D5A2A80 6     DMS  Large   32768  32       No   32       3     3         Def 1        0          31           Yes  TMSDBIDX
[15:04:48]
[15:04:48]Tablespace Statistics:
[15:04:48]Address            Id    TotalPgs   UsablePgs  UsedPgs    PndFreePgs FreePgs    HWM        Max HWM    State      MinRecTime NQuiescers PathsDropped TrackmodState    
[15:04:48]0x00002AEB8D5540C0 0     5143       5143       5143       0          0          -          -          0x00000000 0          0          No           n/a              
[15:04:48]0x00002AEB8D561260 1     1          1          1          0          0          -          -          0x00000000 0          0          No           n/a              
[15:04:48]0x00002AEB8D56E400 2     163840     163808     0          0          0          0          0          0x00004000 0          0          No           n/a              
[15:04:48]0x00002AEB8D57B5A0 3     1024       1020       80         0          940        80         80         0x00000000 0          0          No           n/a              
[15:04:48]0x00002AEB8D588740 4     163840     163808     0          0          0          0          0          0x00004000 0          0          No           n/a              
[15:04:48]0x00002AEB8D5958E0 5     6553600    6553568    0          0          0          0          0          0x00004000 0          0          No           n/a              
[15:04:48]0x00002AEB8D5A2A80 6     3276800    3276768    0          0          0          0          0          0x00004000 0          0          No           n/a              
[15:04:48]
[15:04:48]Tablespace Autoresize Statistics:
[15:04:48]Address            Id    AS  AR  InitSize             IncSize              IIP MaxSize              LastResize                 LRF
[15:04:48]0x00002AEB8D5540C0 0     No  No  0                    0                    No  0                    None                       No  
[15:04:48]0x00002AEB8D561260 1     No  No  0                    0                    No  0                    None                       No  
[15:04:48]0x00002AEB8D56E400 2     No  No  0                    0                    No  0                    None                       No  
[15:04:48]0x00002AEB8D57B5A0 3     No  Yes -32768               -1                   No  None                 None                       No  
[15:04:48]0x00002AEB8D588740 4     No  No  0                    0                    No  0                    None                       No  
[15:04:48]0x00002AEB8D5958E0 5     No  No  0                    0                    No  0                    None                       No  
[15:04:48]0x00002AEB8D5A2A80 6     No  No  0                    0                    No  0                    None                       No  
[15:04:48]
[15:04:48]Tablespace Storage Statistics:
[15:04:48]Address            Id    DataTag  Rebalance SGID  SourceSGID
[15:04:48]0x00002AEB8D5540C0 0     0        No        -     -                    
[15:04:48]0x00002AEB8D561260 1     0        No        -     -                    
[15:04:48]0x00002AEB8D56E400 2     0        No        -     -                    
[15:04:48]0x00002AEB8D57B5A0 3     0        No        -     -                    
[15:04:48]0x00002AEB8D588740 4     0        No        -     -                    
[15:04:48]0x00002AEB8D5958E0 5     0        No        -     -                    
[15:04:48]0x00002AEB8D5A2A80 6     0        No        -     -                    
[15:04:48]
[15:04:48]Containers:
[15:04:48]Address            TspId ContainNum Type    TotalPgs   UseablePgs PathID     StripeSet  Container 
[15:04:48]0x00002AE4FDA42A40 0     0          Path    5143       5143       -          0          /db2data/tmsdb/db2inst1/NODE0000/SQL00001/SQLT0000.0
[15:04:48]0x00002AE4FDA3EC00 1     0          Path    1          1          -          0          /db2data/tmsdb/db2inst1/NODE0000/SQL00001/SQLT0001.0
[15:04:48]0x00002AE4FDA32C40 2     0          Disk    163840     163808     -          0          /dev/raw/raw1
[15:04:48]0x00002AE4FDA36C60 3     0          File    1024       1020       -          0          /db2data/tmsdb/db2inst1/NODE0000/SQL00001/SYSTOOLSPACE
[15:04:48]0x00002AE4FDA37C60 4     0          Disk    163840     163808     -          0          /dev/raw/raw2
[15:04:48]0x00002AE4FDA38C60 5     0          Disk    6553600    6553568    -          0          /dev/raw/raw3
[15:04:48]0x00002AE4FDA39C60 6     0          Disk    3276800    3276768    -          0          /dev/raw/raw4

You can see that four bare devices are used. Considering that the restart permission of bare devices will change, check the startup script of this machine

[15:13:00]gdtmsdb:/myscript # cat startServer.sh 
[15:13:00]chown db2inst1:db2iadm1 /dev/raw/raw1
[15:13:00]chown db2inst1:db2iadm1 /dev/raw/raw2
[15:13:00]chown db2inst1:db2iadm1 /dev/raw/raw3
[15:13:00]chown db2inst1:db2iadm1 /dev/raw/raw4
[15:13:00]
[15:13:00]su - db2inst1 -c "db2start"
[15:13:00]su - db2inst1 -c "db2 activate db tmsdb"

Power on needs to be re empowered. Check the permissions under/dev/raw, and it’s not db2inst1. Execute the self startup script written in advance, and the problem is solved.

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your

Error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘stock’(
‘id’ int unsigned auto_increment,
‘number’ int (10) not null,
‘name’ va’ at line 1

The reason for this is that the quotation marks should be used for the reason that the English quotation marks, i.e., the – symbol in the key below the esc key on the keyboard has a ~ and – key, are used as quotation marks.