Tag Archives: question

[Solved] ERROR: child process failed, exited with error number 14 (error number 1, error number 100)

Problem Description:

Error: 14 when starting mongodb, check mongodb.log for MongoDB – Unable to unlink socket file / tmp / mongodb-27017

Cause analysis:

Check /tmp/mongodb-27017.sock, found that the owner is root

Solution:

Delete the /tmp/mongodb-27017.sock file and restart the mongod process. Check the /tmp/mongodb-27017.sock permissions again and change the ownership to the “mongodb” user.

also started successfully

Summary:

1. Check more logs, mongodb.log
2. The mongodb error column, such as 1100, is mostly due to the wrong specification of the data path and log path in the configuration file. The data path needs to be created in advance, which is a directory, and the log path also needs to be created in advance, which is a file

Error creating bean with name ‘org.springframework.security.oauth2.config.annotation.web.configurati

The following error occurs mainly because the configuration of the resource server is added, but the service is not identified as a resource server.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.TypeNotPresentException: Type javax.servlet.Filter not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:63) ~[spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:769) [spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313) [spring-boot-2.4.4.jar:2.4.4]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) [spring-boot-2.4.4.jar:2.4.4]
	at com.zsh.GatewayApplication.main(GatewayApplication.java:16) [classes/:na]
Caused by: java.lang.TypeNotPresentException: Type javax.servlet.Filter not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_261]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_261]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_261]
	at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68) ~[na:1.8.0_261]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) ~[na:1.8.0_261]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_261]
	at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:108) ~[na:1.8.0_261]
	at java.lang.Class.getGenericInterfaces(Class.java:913) ~[na:1.8.0_261]
	at org.springframework.core.ResolvableType.getInterfaces(ResolvableType.java:502) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.as(ResolvableType.java:450) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.as(ResolvableType.java:451) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.as(ResolvableType.java:456) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.as(ResolvableType.java:456) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1341) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1324) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1291) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1281) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.BridgeMethodResolver.isResolvedTypeMatch(BridgeMethodResolver.java:157) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.BridgeMethodResolver.isBridgeMethodFor(BridgeMethodResolver.java:141) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.BridgeMethodResolver.searchCandidates(BridgeMethodResolver.java:120) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:82) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.lambda$buildResourceMetadata$1(CommonAnnotationBeanPostProcessor.java:390) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:324) ~[spring-core-5.3.5.jar:5.3.5]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:389) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:347) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295) ~[spring-context-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1098) ~[spring-beans-5.3.5.jar:5.3.5]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.3.5.jar:5.3.5]
	... 16 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_261]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_261]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[na:1.8.0_261]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_261]
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_261]
	at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_261]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_261]
	... 43 common frames omitted

2021-10-31 18:29:13.998  WARN 8204 --- [       Thread-8] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Start destroying common HttpClient
2021-10-31 18:29:13.998  WARN 8204 --- [       Thread-8] c.a.n.common.http.HttpClientBeanHolder   : [HttpClientBeanHolder] Destruction of the end

Process finished with exit code 1

There are two main solutions to this problem

First: remove the configuration of the resource server
Second: add the @ enableresourceserver annotation on the startup class

Start again to succeed!

Shiro Error: Configuration error: No realms have been configured!

solution

Check if the ini configuration file is written in a standard way

correct demonstration:

error demonstration:

exception information

2021-10-05 17:12:26.609 [main] WARN  org.apache.shiro.authc.AbstractAuthenticator - Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - ans, rememberMe=false].  Possible unexpected error?(Typical or expected login exceptions should extend from AuthenticationException).
java.lang.IllegalStateException: Configuration error:  No realms have been configured!  One or more realms must be present to execute an authentication attempt.
	at org.apache.shiro.authc.pam.ModularRealmAuthenticator.assertRealmsConfigured(ModularRealmAuthenticator.java:161)
	at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:264)
	at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)
	at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)
	at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:275)
	at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260)
	at com.yas.MyApplication.test(MyApplication.java:40)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

error: multiple substitutions specified in non-positional format; did you mean to add the formatted

When used

 aapt2 compile -o build/res.zip --dir ./app/src/main/res

You may encounter the following problems

./app/src/main/res/values/strings.xml:4: error: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
./app/src/main/res/values/strings.xml: error: file failed to compile.

You can check the strings. XML file and replace placeholders such as % s with % 1 $s