- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在网上寻找答案,但没有任何帮助。我正在尝试运行我创建的 RMI 服务器。在服务器主体中我有这部分:
System.setSecurityManager(new RMISecurityManager());
...
...
...
Naming.rebind("//localhost/ForumSite", obj);
我的策略文件:server,policy(...指向该文件夹)-
grant codeBase "file:C:/.../workspace//ForunServer/bin/" {
permission java.security.AllPermission;
permission java.net.SocketPermission "localhost:1099-", "listen, connect, resolve";
};
grant {
permission java.lang.RuntimePermission "setSecurityManager";
permission java.lang.RuntimePermission "createSecurityManager";
permission java.lang.RuntimePermission "usePolicy";
};
我正在尝试运行 Windows 操作系统,我在另一个控制台中写道:javaw rmiregistry在另一个(来自 bin 文件夹)中:
java -Djava.security.manager -Djava.security.policy=server.policy ServerSideImp
我不断收到错误:
access denied ("java.net.SocketPermission" "127.0.0.1:1099" "connect,resolve")
我确保策略文件位于同一位置,
这是我在运行中添加 -Djava.security.debug=access,failure 时的运行结果-
access: access allowed ("java.io.FilePermission" "C:\Users...\ForumServer\bin" "read") access: access allowed ("java.lang.RuntimePermission" "setSecurityManager") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.1") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.2") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.3") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.4") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.5") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.6") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.7") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.8") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.9") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.10") access: access allowed ("java.security.SecurityPermission" "getProperty.security.provider.11") access: access allowed ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.provider") access: access allowed ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") access: access allowed ("java.util.PropertyPermission" "java.security.egd" "read") access: access allowed ("java.security.SecurityPermission" "getProperty.securerandom.source") access: access allowed ("java.security.SecurityPermission" "putProviderProperty.SUN") access: access allowed ("java.util.PropertyPermission" "*" "read,write") access: access allowed ("java.util.PropertyPermission" "os.arch" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.net") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\net.dll" "read") access: access allowed ("java.util.PropertyPermission" "java.net.preferIPv4Stack" "read") access: access allowed ("java.util.PropertyPermission" "java.net.preferIPv6Addresses" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.net") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\net.dll" "read") access: access allowed ("java.util.PropertyPermission" "impl.prefix" "read") access: access allowed ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") access: access allowed ("java.util.PropertyPermission" "sun.net.spi.nameservice.provider.1" "read") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.net.NetPermission" "getNetworkInformation") access: access allowed ("java.lang.RuntimePermission" "fileSystemProvider") access: access allowed ("java.util.PropertyPermission" "user.dir" "read") access: access allowed ("java.util.PropertyPermission" "os.version" "read") access: access allowed ("java.util.PropertyPermission" "sun.jnu.encoding" "read") access: access allowed ("java.util.PropertyPermission" "java.nio.file.spi.DefaultFileSystemProvider" "read") access: access allowed ("java.io.FilePermission" "C:\Users\URI\AppData\Local\Temp" "read") access: access allowed ("java.io.FilePermission" "C:\Users\URI\AppData\Local\Temp" "read") access: access allowed ("java.io.FilePermission" "C:\Users\URI\AppData\Local\Temp" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.net") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\net.dll" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.nio") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\nio.dll" "read") access: access allowed ("java.util.PropertyPermission" "sun.nio.fs.ensureAccurateMetadata" "read") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.randomIDs" "read") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.hostname" "read") access: access allowed ("java.security.SecurityPermission" "getProperty.networkaddress.cache.ttl") access: access allowed ("java.util.PropertyPermission" "sun.net.inetaddr.ttl" "read") access: access allowed ("java.security.SecurityPermission" "getProperty.networkaddress.cache.negative.ttl") access: access denied ("java.net.SocketPermission" "URI-PC" "resolve") java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Unknown Source) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at java.net.InetAddress.getLocalHost(Unknown Source) at sun.rmi.transport.tcp.TCPEndpoint.(Unknown Source) at sun.rmi.transport.LiveRef.(Unknown Source) at sun.rmi.transport.LiveRef.(Unknown Source) at sun.rmi.server.UnicastServerRef.(Unknown Source) at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source) at java.rmi.server.UnicastRemoteObject.(Unknown Source) at java.rmi.server.UnicastRemoteObject.(Unknown Source) at ServerSideImp.(ServerSideImp.java:18) at ServerSideImp.main(ServerSideImp.java:62) access: access allowed ("java.security.SecurityPermission" "getPolicy") access: access allowed ("java.io.FilePermission" "C:\Users...\ForumServer\bin" "read") access: domain that failed ProtectionDomain (file:/C:/Users/.../ForumServer/bin/ ) sun.misc.Launcher$AppClassLoader@73d16e93 java.security.Permissions@6f94fa3e ( ("java.lang.RuntimePermission" "setSecurityManager") ("java.lang.RuntimePermission" "createSecurityManager") ("java.lang.RuntimePermission" "exitVM") ("java.lang.RuntimePermission" "usePolicy") ("java.lang.RuntimePermission" "stopThread") ("java.util.PropertyPermission" "java.specification.version" "read") ("java.util.PropertyPermission" "java.version" "read") ("java.util.PropertyPermission" "os.arch" "read") ("java.util.PropertyPermission" "java.specification.vendor" "read") ("java.util.PropertyPermission" "java.vm.specification.name" "read") ("java.util.PropertyPermission" "java.vm.vendor" "read") ("java.util.PropertyPermission" "path.separator" "read") ("java.util.PropertyPermission" "os.version" "read") ("java.util.PropertyPermission" "file.separator" "read") ("java.util.PropertyPermission" "line.separator" "read") ("java.util.PropertyPermission" "java.vm.specification.vendor" "read") ("java.util.PropertyPermission" "java.specification.name" "read") ("java.util.PropertyPermission" "java.vendor.url" "read") ("java.util.PropertyPermission" "java.vendor" "read") ("java.util.PropertyPermission" "java.vm.version" "read") ("java.util.PropertyPermission" "java.vm.name" "read") ("java.util.PropertyPermission" "java.vm.specification.version" "read") ("java.util.PropertyPermission" "os.name" "read") ("java.util.PropertyPermission" "java.class.version" "read") ("java.net.SocketPermission" "localhost:0" "listen,resolve") ("java.io.FilePermission" "\C:\Users...\ForumServer\bin-" "read") )
access: access allowed ("java.util.PropertyPermission" "java.rmi.server.useLocalHostName" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.logLevel" "read") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.logLevel" "read") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.maxConnectionThreads" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.threadKeepAliveTime" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.proxy.logLevel" "read") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.proxy.connectTimeout" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.proxy.eagerHttpFallback" "read") access: access allowed ("java.util.PropertyPermission" "http.proxyHost" "read") access: access allowed ("java.util.PropertyPermission" "proxyHost" "read") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.disableHttp" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.readTimeout" "read") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.hostname" "read") access: access allowed ("java.util.PropertyPermission" "sun.misc.ProxyGenerator.saveGeneratedFiles" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.dgc.server.gcInterval" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.net") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\net.dll" "read") access: access allowed ("java.util.PropertyPermission" "" "read,write") access: access allowed ("java.util.PropertyPermission" "" "read,write") access: access allowed ("java.util.PropertyPermission" "sun.net.useExclusiveBind" "read") access: access allowed ("java.net.SocketPermission" "localhost:0" "listen,resolve") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "getClassLoader") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.RuntimePermission" "setContextClassLoader") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.util.PropertyPermission" "sun.rmi.dgc.logLevel" "read") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.PropertyPermission" "java.rmi.dgc.leaseValue" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.dgc.checkInterval" "read") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.logging.LoggingPermission" "control") access: access allowed ("java.util.PropertyPermission" "sun.rmi.runtime.schedulerThreads" "read") access: access allowed ("java.lang.RuntimePermission" "sun.rmi.runtime.RuntimeUtil.getInstance") access: access allowed ("java.lang.RuntimePermission" "setContextClassLoader") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.hostname" "read") access: access allowed ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") access: access allowed ("java.lang.RuntimePermission" "setContextClassLoader") access: access allowed ("java.lang.RuntimePermission" "getClassLoader") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.RuntimePermission" "setContextClassLoader") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "modifyThreadGroup") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.RuntimePermission" "modifyThread") access: access allowed ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") access: access allowed ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") access: access allowed ("java.util.PropertyPermission" "java.rmi.server.hostname" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.connectionTimeout" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.handshakeTimeout" "read") access: access allowed ("java.util.PropertyPermission" "sun.rmi.transport.tcp.responseTimeout" "read") access: access allowed ("java.lang.RuntimePermission" "sun.rmi.runtime.RuntimeUtil.getInstance") access: access allowed ("java.net.SocketPermission" "localhost" "resolve") access: access allowed ("java.util.PropertyPermission" "jdk.net.ephemeralPortRange.low" "read") access: access allowed ("java.lang.RuntimePermission" "loadLibrary.net") access: access allowed ("java.io.FilePermission" "C:\Program Files\Java\jre1.8.0_45\bin\net.dll" "read") access: access allowed ("java.util.PropertyPermission" "jdk.net.ephemeralPortRange.high" "read") access: access denied ("java.net.SocketPermission" "127.0.0.1:1099" "connect,resolve") java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Unknown Source) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.(Unknown Source) at java.net.Socket.(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) at java.rmi.Naming.rebind(Unknown Source) at ServerSideImp.main(ServerSideImp.java:63) access: access allowed ("java.security.SecurityPermission" "getPolicy") access: access allowed ("java.io.FilePermission" "C:\Users...\ForumServer\bin" "read") access: domain that failed ProtectionDomain (file:/C:/Users/.../ForumServer/bin/ ) sun.misc.Launcher$AppClassLoader@73d16e93 java.security.Permissions@2c7b84de ( ("java.lang.RuntimePermission" "setSecurityManager") ("java.lang.RuntimePermission" "createSecurityManager") ("java.lang.RuntimePermission" "exitVM") ("java.lang.RuntimePermission" "usePolicy") ("java.lang.RuntimePermission" "stopThread") ("java.util.PropertyPermission" "java.specification.version" "read") ("java.util.PropertyPermission" "java.version" "read") ("java.util.PropertyPermission" "os.arch" "read") ("java.util.PropertyPermission" "java.specification.vendor" "read") ("java.util.PropertyPermission" "java.vm.specification.name" "read") ("java.util.PropertyPermission" "java.vm.vendor" "read") ("java.util.PropertyPermission" "path.separator" "read") ("java.util.PropertyPermission" "os.version" "read") ("java.util.PropertyPermission" "file.separator" "read") ("java.util.PropertyPermission" "line.separator" "read") ("java.util.PropertyPermission" "java.vm.specification.vendor" "read") ("java.util.PropertyPermission" "java.specification.name" "read") ("java.util.PropertyPermission" "java.vendor.url" "read") ("java.util.PropertyPermission" "java.vendor" "read") ("java.util.PropertyPermission" "java.vm.version" "read") ("java.util.PropertyPermission" "java.vm.name" "read") ("java.util.PropertyPermission" "java.vm.specification.version" "read") ("java.util.PropertyPermission" "os.name" "read") ("java.util.PropertyPermission" "java.class.version" "read") ("java.net.SocketPermission" "localhost:0" "listen,resolve") ("java.io.FilePermission" "\C:\Users...\ForumServer\bin-" "read") )
access: access allowed ("java.lang.RuntimePermission" "exitVM.1")
但我不太明白这里发生了什么,任何帮助将不胜感激。
最佳答案
删除安全管理器。除非您使用 RMI 代码库功能,否则 RMI 不需要它,但您并不使用它。
关于java rmi - 访问被拒绝 ("java.net.SocketPermission" "127.0.0.1:1099" "connect,resolve"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30542778/
我只想允许一个国家/地区访问,但排除该国家/地区内的代理。 这就是我所拥有的(为了方便起见,缩短了版本) order deny,allow deny from all allow from 139.
这个问题在这里已经有了答案: What is an unhandled promise rejection? (9 个回答) 关闭 4 年前。 我目前正在尝试实现我自己的 Promise,以便在 A
我在使用 Gitolite 推送 git 时遇到问题。 当我尝试这个时: git push origin :refs/tags/deployment 我收到这个错误: remote: D NAME/i
我已经为我的 laravel 5.0-dev 项目配置了 mysql,如下所示: 'mysql' => [ 'driver' => 'mysql', 'host' =>
我对 Web 和 SOF 进行了一些研究,但发现对于该错误没有任何真正的帮助。 我使用 Windows 10 Ubuntu Bash 安装了 Node 和 Puppeteer,但未能使其工作,但我设法
在我的应用审核期间,我收到了以下信息: “17.2:要求用户共享个人信息(例如电子邮件地址和生日)才能正常运行的应用将被拒绝 具体来说,您的应用仅使用Facebook登录名进行身份验证,但不包括该网站
我正在开发 VeriFone VX 终端的接口(interface)。虽然,这确实是一个普遍的 EMV 问题。我们的处理器的下限为零,因此它将始终在线发送。但是,如果它发生变化,您如何知道(哪些标签)
我编写了一些宏代码,根据表单提交向经理发送电子邮件(用于费用/审批流程),这是我使用谷歌表单/电子表格的第一个项目,所以也许我可能会错过一些简单的东西,但我为此浏览了 2 个教程,我的代码与重要的部分
clang 3.4 接受以下代码;而 vc++ NOV 2013 CTP 拒绝它并出现错误: error C2668: 'AreEqual' : ambiguous call to overloade
使用 nginx,您可以允许和拒绝范围和 ips (https://www.nginx.com/resources/admin-guide/restricting-access/)。使用realip模
官方编辑: 非常感谢您的帮助,但我仍然遇到问题。 我的 ffserver.conf 文件是这样的: # Port on which the server is listening. You must
我有一个问题:我是 Ubuntu 系统的根。我想授予用户(比如用户名是 X)执行任何命令的权限,但同时我有一个文件夹,除了我的用户(当然不是 X,因为它是 Admin ) 或根。有什么建议么?谢谢!
我使用 Apache2.2 作为 tomcat 服务器的前端。我想限制对某个位置的访问,但允许对子位置的所有访问,但遇到了一些麻烦。 我目前拥有的是: AllowOverride None
就像 this person ,我一直在为浏览器缓存 SSL session 而苦苦挣扎。简而言之,如果选择了客户端证书,则无法以编程方式清除状态,除非在 IE 中使用 document.execCo
我的网站是在由 Apache 服务器提供服务的 Angular 上设置的。我通过 View 将内容动态加载到主页上。 现在以下是我的问题: 我建立这个网站的主要目的是通过 google adsense
我最近遇到了我的应用程序的问题,当它突然被 Google Play 拒绝时因为他们发现我使用的是背景位置 .但实际上我并没有使用这个功能。我只有 ACCESS_COARSE_LOCATION和 ACC
function sendPushNotification(subscription, urlEncodedData){ try { webpush.sendNotification(su
我包裹了一个 request-promise-native调用返回 promise 的函数。 import request from 'request-promise-native'; functio
我正在开发我的 meteor 项目,并开始设置我的第一个更复杂的允许/拒绝规则。我发现很难看出哪些允许触发,哪些不允许触发,以及这些函数中的某些变量包含什么。例如: List.allow({ u
我正在 AngularJS 中创建一个 Factory,它是这样的: if (href) { return $http({ method: method, url: item.href });
我是一名优秀的程序员,十分优秀!