java - clientSecurity 运行的 geode 示例失败
问题描述
1.10 版,客户端安全的 Apache geode 示例
当我构建项目并执行“启动”任务时,GemFireSecurityException 总是在启动服务器时发生。甚至我可以在目录 build/resources/main/ 中找到文件“example_security.json”。
定位器可以找到文件,但服务器不能,为什么?
> Task :clientSecurity:start
1. Executing - start locator --name=locator --bind-address=127.0.0.1 --connect=false --security-properties-file=******** --classpath=../build/resources/main/
........
Locator in C:\Users\kenneth\Desktop\geode-examples-master\clientSecurity\locator on 127.0.0.1[10334] as locator is currently online.
2. Executing - start server --name=server1 --locators=127.0.0.1[10334] --classpath=../build/resources/main/:../build/classes/java/main/ --security-properties-file=******** --server-port=0 --user=superUser --password=********
...The Cache Server process terminated unexpectedly with exit status 1. Please refer to the log file in C:\Users\kenneth\Desktop\geode-examples-master\clientSecurity\server1 for full details.
Exception in thread "main" org.apache.geode.security.GemFireSecurityException: ExampleSecurityManager: unable to find json resource "example_security.json" as specified by [security-json].
at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:842)
at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:732)
at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:251)
************************* Execution Summary ***********************
Script file: C:\Users\kenneth\Desktop\geode-examples-master\clientSecurity\scripts\start.gfsh
Command-1 : start locator --name=locator --bind-address=127.0.0.1 --connect=false --security-properties-file=example_security.properties --classpath=../build/resources/main/
Status : PASSED
Command-2 : start server --name=server1 --locators=127.0.0.1[10334] --classpath=../build/resources/main/:../build/classes/java/main/ --security-properties-file=./example_security.properties --server-port=0 --user=superUser --password=123
Status : FAILED
解决方案
我更改为定位器和服务器的完整路径,这是所有输出:
PS C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security> C:\Users\hw83770\Documents\pivotal-gemfire-9.8.0\bin\gfsh.bat run --file=.\scripts\start.gfsh
1. Executing - start locator --name=clocator --bind-address=127.0.0.1 --connect=false --security-properties-file=******** --classpath=C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\resources\main
......
Locator in C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\clocator on 127.0.0.1[10334] as clocator is currently online.
Process ID: 28816
Uptime: 7 seconds
Geode Version: 9.8.0
Java Version: 1.8.0_161
Log File: C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\clocator\clocator.log
JVM Arguments: -DgemfireSecurityPropertyFile=C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\example_security.properties -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluster-configuration-from-dir=false -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: C:\Users\hw83770\Documents\pivotal-gemfire-9.8.0\lib\geode-core-9.8.0.jar;C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\resources\main;C:\Users\hw83770\Documents\pivotal-gemfire-9.8.0\lib\geode-dependencies.jar;C:\Users\hw83770\Documents\pivotal-gemfire-9.8.0\extensions\gemfire-greenplum-3.4.1.jar
2. Executing - start server --name=cserver1 --locators=127.0.0.1[10334] --classpath=C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\resources\main:C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\classes\java\main --security-properties-file=******** --server-port=0 --user=superUser --password=********
...The Cache Server process terminated unexpectedly with exit status 1. Please refer to the log file in C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\cserver1 for full details.
Exception in thread "main" org.apache.geode.security.GemFireSecurityException: ExampleSecurityManager: unable to find json resource "example_security.json" as specified by [security-json].
at org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:824)
at org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:716)
at org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:236)
************************* Execution Summary ***********************
Script file: .\scripts\start.gfsh
Command-1 : start locator --name=clocator --bind-address=127.0.0.1 --connect=false --security-properties-file=example_security.properties --classpath=C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\resources\main
Status : PASSED
Command-2 : start server --name=cserver1 --locators=127.0.0.1[10334] --classpath=C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\resources\main:C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\build\classes\java\main --security-properties-file=./example_security.properties --server-port=0 --user=superUser --password=123
Status : FAILED
此外,它说
1. Please refer to the log file in C:\Users\hw83770\git\frameworkpoc\rio-geode-cli\client-security\cserver1 for full details
实际上,没有任何日志文件,而且我对 geode 源代码不熟悉,所以不知道如何处理。
我正在做geode的POC,我们的团队需要确保geode支持客户端和端点的安全性,这非常重要,所以我在这里寻求帮助。
推荐阅读
- python-3.x - 使用 Auto-py-to-exe 时 Tcl/Tk 安装错误
- python - 从 html 表中获取值的问题
- firebase - Flutter+Firebase:检测换行符/空行,然后正确格式化
- android - 在 Android 上通过一键式登录使用 Google Drive API
- node.js - 如何在 node-postgres 中使用参数化查询动态创建数据库
- javascript - 如何在 JavaScript 的替换中确定匹配组的偏移量?
- linux - 是否可以防止从 linux 文件系统驱动程序中卸载?
- xcode - 如何在 Xcode 13 中“显示切片”?
- reactjs - 在本机反应中不显示路由参数
- java - Android 11 的文件共享失败