這個問題:
1.第一個是hostname 有沒設置好(windows server試過不用設置host)
2.要設置 System.setProperty("java.rmi.server.hostname",realIp); 其中realIp 爲服務器或電腦的對外ip
如果這樣還不行,那就是端口的問題了,需要設置exporter.setRegistryPort(), 以及exporter.setServicePort()兩個端口
這個問題:
1.第一個是hostname 有沒設置好(windows server試過不用設置host)
2.要設置 System.setProperty("java.rmi.server.hostname",realIp); 其中realIp 爲服務器或電腦的對外ip
如果這樣還不行,那就是端口的問題了,需要設置exporter.setRegistryPort(), 以及exporter.setServicePort()兩個端口