rmi

Rmi connection refused with localhost

China☆狼群 提交于 2019-11-26 20:56:24
问题 I have a problem using java rmi: When I'm trying to run my server, I get a connectException (see below). Exception happens when executing the rebind method: Runtime.getRuntime().exec("rmiregistry 2020"); MyServer server = new MyServer(); Naming.rebind("//localhost:2020/RemoteDataPointHandler", server); when using rmi://localhost:2020/RemoteDataPointHandler instead, it doesn't work either. Also using the default port does not work. I also tried using the 127.0.0.1 ip-address, but with the same

java.rmi.ConnectException: Connection refused to host: 127.0.1.1;

纵然是瞬间 提交于 2019-11-26 20:01:06
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler

Why Java opens 3 ports when JMX is configured?

拈花ヽ惹草 提交于 2019-11-26 19:46:26
I run my Java program with JDK7 on Centos6. I enable JMX using the following options: JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=true" When I check what ports are opened I discover 2 additional random ports: netstat -plunt | grep java tcp 0 0 :::9123 :::* LISTEN 13295/java tcp 0 0 :::59927 :::* LISTEN 13295/java tcp 0 0 :::59928 :::* LISTEN 13295/java Please note that each restart only configured port 9123

How to connect to a java program on localhost jvm using JMX?

偶尔善良 提交于 2019-11-26 18:56:46
问题 I should connect to a java program on localhost jvm using JMX. In other words I want to develop a JMX client to config a java program on localhost. Don't recommend using JConsole! JConsole is not suitable because it is general JMX client and have negative effect on main program performance. Samples on oracle site use RMIConnector and host:port params but I don't know: where should set jmx port? JConsole have an option to connect to java processes by PID. But I don't find any method in JMX api

Web Services vs EJB vs RMI, advantages and disadvantages?

心已入冬 提交于 2019-11-26 18:44:49
问题 My web server would be overloaded quickly if all the work were done there. I'm going to stand up a second server behind it, to process data. What's the advantage of EJB over RMI, or vice versa? What about web services (SOAP, REST)? 回答1: EJBs are built on top of RMI. Both imply Java clients and beans. If your clients need to be written in something else (e.g., .NET, PHP, etc.) go with web services or something else that speaks a platform-agnostic wire protocol, like HTTP or XML over HTTP or

K8s学习笔记

僤鯓⒐⒋嵵緔 提交于 2019-11-26 14:41:45
1、管理节点配置 增加主机解析 vi /etc/hosts 192.168.2.121 master 192.168.2.122 node1 192.168.2.123 node2 停止防火墙 systemctl stop firewalld systemctl disable firewalld 配置yum源 cd /etc/yum.repos.d/ wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo vi /etc/yum.repos.d/kubernetes.repo [Kubernetes] name=Kubernetes Repo baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/ gpgcheck=0 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg enabled=1 wget https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg rpm --import yum-key.gpg 使用阿里云静像加速器 tee /etc/docker

How to organize RMI Client-Server architecture

落爺英雄遲暮 提交于 2019-11-26 14:40:09
问题 I am developing a secured Banking service in RMI with a GUI both for Server and Client. The Server must be able to log every operations (new User, deleted User, Withdrawal, Lodgement...) The Client will do these operations. As everything is secured, the Client must at first, create an account with a name and a password in the GUI. After that, the GUI adds the User in the Bank UserList(arrayList) as a new Customer and the User can do several operations. It seems straightforward at first but I

Java RMI AccessControlException: access denied

穿精又带淫゛_ 提交于 2019-11-26 13:58:35
问题 Hey I'm getting a AccessControlException: access denied when attempting to start up a RMI app I'm writing, I can't work out why I get this exception if I open it on the default port 1099, or on another dynamic port, my policy file currently grants everything (will change when app is finished). I am stuck as to where it is going wrong, any help would be of great use My code public class Main { /** * @param args the command line arguments */ public static void main(String[] args) throws

Java: no security manager: RMI class loader disabled

送分小仙女□ 提交于 2019-11-26 12:27:39
问题 Hi I have RMI application and now I try to invoke some methods at server from my client. I have following code: public static void main(final String[] args) { try { //Setting the security manager System.setSecurityManager(new RMISecurityManager()); IndicatorsService server = (IndicatorsService) Naming .lookup(\"rmi://localhost/\" + IndicatorsService.SERVICE_NAME); DataProvider provider = new OHLCProvider(server); server.registerOHLCProvider(provider); } catch (MalformedURLException e) { e

running rmi server, classnotfound [duplicate]

白昼怎懂夜的黑 提交于 2019-11-26 11:52:58
This question already has an answer here: java.rmi.ServerException: RemoteException occurred in server thread (ClassNotFoundException) 4 answers Hi I'm trying to run a java application that binds a class to the naming server, but i constantly get a ClassNotFoundException First I start the registry: rmiregistry then from eclipse I try to execute the server but get this error java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: progInternet2008