Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix log4j error #1686

Merged
merged 3 commits into from
Dec 13, 2021
Merged

fix log4j error #1686

merged 3 commits into from
Dec 13, 2021

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Dec 13, 2021

Change-Id: I991e975d254bb3522070a52d73326c6ea99424ab

Change-Id: I991e975d254bb3522070a52d73326c6ea99424ab
@codecov
Copy link

codecov bot commented Dec 13, 2021

Codecov Report

Merging #1686 (1ccd553) into master (f6a492c) will increase coverage by 0.03%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1686      +/-   ##
============================================
+ Coverage     66.74%   66.77%   +0.03%     
- Complexity     7052     7061       +9     
============================================
  Files           420      420              
  Lines         34668    34682      +14     
  Branches       4805     4809       +4     
============================================
+ Hits          23139    23160      +21     
+ Misses         9189     9186       -3     
+ Partials       2340     2336       -4     
Impacted Files Coverage Δ
.../baidu/hugegraph/security/HugeSecurityManager.java 80.50% <80.00%> (+1.92%) ⬆️
...va/com/baidu/hugegraph/backend/cache/RamCache.java 72.47% <0.00%> (-0.57%) ⬇️
...n/java/com/baidu/hugegraph/schema/PropertyKey.java 76.97% <0.00%> (-0.56%) ⬇️
...n/java/com/baidu/hugegraph/structure/HugeEdge.java 76.23% <0.00%> (-0.27%) ⬇️
...du/hugegraph/backend/tx/GraphIndexTransaction.java 83.72% <0.00%> (-0.11%) ⬇️
...java/com/baidu/hugegraph/structure/HugeVertex.java 78.79% <0.00%> (+0.22%) ⬆️
...c/main/java/com/baidu/hugegraph/task/HugeTask.java 72.30% <0.00%> (+0.30%) ⬆️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 80.16% <0.00%> (+0.30%) ⬆️
...a/com/baidu/hugegraph/backend/query/Condition.java 80.14% <0.00%> (+0.72%) ⬆️
...egraph/backend/store/cassandra/CassandraStore.java 72.64% <0.00%> (+0.85%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6a492c...1ccd553. Read the comment docs.

javeme
javeme previously approved these changes Dec 13, 2021
@imbajin
Copy link
Member

imbajin commented Dec 13, 2021

seems ci may always failed, why the same log print so much
image

@javeme
Copy link
Contributor

javeme commented Dec 13, 2021

memory backend:

2021-12-13 05:37:09 [main] [INFO] c.b.h.HugeGraph - Graph 'hugegraph' has been initialized
2021-12-13 05:37:09 [main] [INFO] c.b.h.HugeGraph - Init server info [server1-MASTER] for graph 'hugegraph'...
2021-12-13 05:37:09 [main] [INFO] c.b.h.t.ServerInfoManager - Init server info: HugeServerInfo(server1){server_load=0, server_role=MASTER, id=server1, label=~server, server_update_time=Mon Dec 13 05:37:09 UTC 2021, server_max_load=10000}
2021-12-13 05:37:09 [main] [INFO] c.b.h.HugeGraph - Check olap property-key tables for graph 'hugegraph'
2021-12-13 05:37:09 [main] [INFO] c.b.h.HugeGraph - Restoring incomplete tasks for graph 'hugegraph'...
2021-12-13 05:37:09 [task-scheduler-1] [INFO] c.b.h.t.TaskScheduler - Scheduled task '1' to server 'server1'
2021-12-13 05:37:13 [task-worker-1] [WARN] c.b.h.s.HugeSecurityManager - SecurityException: Not allowed to access system properties via Gremlin
2021-12-13 05:37:13 [task-worker-1] [WARN] c.b.h.s.HugeSecurityManager - SecurityException: Not allowed to access system properties via Gremlin
2021-12-13 05:37:13 [task-worker-1] [WARN] c.b.h.s.HugeSecurityManager - SecurityException: Not allowed to access system properties via Gremlin

scylladb backend:

Error:  Tests run: 84, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 64.927 s <<< FAILURE! - in com.baidu.hugegraph.api.ApiTestSuite
Error:  testAddGraphs(com.baidu.hugegraph.api.ProjectApiTest)  Time elapsed: 1.953 s  <<< FAILURE!
java.lang.AssertionError: Response with status 400 and content {"exception":"class com.baidu.hugegraph.HugeException","message":"Expect just one result, but got at least two: [TableBackendEntry{Row{type=PROPERTY_KEY, id=null, columns={AGGREGATE_TYPE=0, USER_DATA={~create_time=\"2021-12-13 05:34:40.163\"}, PROPERTIES=[], NAME=~group_name, CARDINALITY=1, WRITE_TYPE=1, ID=-64, DATA_TYPE=8, STATUS=1}}, sub-rows: []}, TableBackendEntry{Row{type=PROPERTY_KEY, id=null, columns={AGGREGATE_TYPE=0, USER_DATA={~create_time=\"2021-12-13 05:34:42.224\"}, PROPERTIES=[], NAME=~group_name, CARDINALITY=1, WRITE_TYPE=1, ID=-31, DATA_TYPE=8, STATUS=1}}, sub-rows: []}]","cause":""} expected:<201> but was:<400>
	at com.baidu.hugegraph.api.ProjectApiTest.createProject(ProjectApiTest.java:181)
	at com.baidu.hugegraph.api.ProjectApiTest.testAddGraphs(ProjectApiTest.java:124)

@zhoney
Copy link
Contributor Author

zhoney commented Dec 13, 2021

	at com.baidu.hugegraph.security.HugeSecurityManager.checkPropertiesAccess(HugeSecurityManager.java:310)
	at java.lang.System.getProperties(System.java:630)
	at org.apache.logging.log4j.util.PropertiesUtil$Environment.hasSystemProperty(PropertiesUtil.java:476)
	at org.apache.logging.log4j.util.PropertiesUtil$Environment.get(PropertiesUtil.java:489)
	at org.apache.logging.log4j.util.PropertiesUtil$Environment.access$200(PropertiesUtil.java:420)
	at org.apache.logging.log4j.util.PropertiesUtil.getStringProperty(PropertiesUtil.java:368)
	at org.apache.logging.log4j.util.PropertiesUtil.getBooleanProperty(PropertiesUtil.java:155)
	at org.apache.logging.log4j.status.StatusLogger.isDebugPropertyEnabled(StatusLogger.java:120)
	at org.apache.logging.log4j.status.StatusLogger.isEnabled(StatusLogger.java:403)
	at org.apache.logging.log4j.status.StatusLogger.isEnabled(StatusLogger.java:319)
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1898)
	at org.apache.logging.log4j.spi.AbstractLogger.trace(AbstractLogger.java:2464)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:52)
	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
	at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
	at com.baidu.hugegraph.util.Log.logger(Log.java:32)
	at com.baidu.hugegraph.security.HugeSecurityManager.newSecurityException(HugeSecurityManager.java:389)
	at com.baidu.hugegraph.security.HugeSecurityManager.checkRead(HugeSecurityManager.java:203)
	at java.io.File.exists(File.java:814)
	at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1282)
	at sun.misc.URLClassPath.getResource(URLClassPath.java:239)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createWithCustomLookup(MetaClassRegistry.java:144)
	at groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:139)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:286)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:329)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:271)
	at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:969)
	at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
	at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
	at groovy.lang.Script.<init>(Script.java:39)
	at Script2.<init>(Script2.groovy)
	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.codehaus.groovy.runtime.InvokerHelper.newScript(InvokerHelper.java:482)
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:440)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:631)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
	at com.baidu.hugegraph.traversal.optimize.HugeScriptTraversal.applyStrategies(HugeScriptTraversal.java:103)
	at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:196)
	at com.baidu.hugegraph.job.GremlinJob.execute(GremlinJob.java:82)
	at com.baidu.hugegraph.job.UserJob.call(UserJob.java:29)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.baidu.hugegraph.task.HugeTask.run(HugeTask.java:287)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Change-Id: I9bbd73564aa6bb1df5240c26f78a87898c24dbd0
javeme
javeme previously approved these changes Dec 13, 2021
@@ -116,11 +116,17 @@
"com.baidu.hugegraph.backend.store.raft.rpc.RpcForwarder"
);


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

Change-Id: I342d8099834d3b6779c40d46dcbb1c4e89bc821b
@zhoney zhoney merged commit 59f0ce9 into master Dec 13, 2021
@zhoney zhoney deleted the fix-log4j-error branch December 13, 2021 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants