Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.rmi.ConnectException: Connection refused to host

843810Jul 25 2005 — edited May 3 2009
Hi,
I am trying to get a RMI server running. I am using a windows 2000 client. I started with "start rmiserver". When I am trying to run my service by calling "java AccountServerImpl", I am getting the following exceptioion. Can someone help me find where I am missing ?.

java.rmi.ConnectException: Connection refused to host: 10.77.283.97; nested exception is:
java.net.ConnectException: Connection refused: connect
StackTrace
java.rmi.ConnectException: Connection refused to host: 10.77.283.97; nested exc
eption is:
java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
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 AccountServerImpl.main(AccountServerImpl.java:56)

For registering, I am using the following statement.
Naming.rebind("rmi//10.77.283.97/AccountServer",instance);

TIA,
NBG

Comments

Hilary Farrell-Oracle
Answer

Hi JKL,
If you haven't already done so, please refer to section 20.3 Controlling Access to Applications, Pages, and Page Components in our APEX 20.2 User's Guide. You haven't stated what Authentication Scheme has been selected for your app, so I'll go with the assumption that it's the default APEX Application Account. The usernames that you list in your Access Control list, should be created as new users in the workspace. Please refer to section 2.7 Managing Users in a Workspace in our APEX 20.2 Administration Guide, specifically section 2.7.3 Creating User Accounts. Once you've created the users in the workspace, to correspond with the user names you've defined in your app's Access Control list, then those user credentials can be used to log into the app.
I hope this helps.
Regards,
Hilary

Marked as Answer by JKL · Oct 27 2020
JKL

Hilary,
Thanks for the reply. I am comparing the user from the Application specific Users area in the Administration section and the APEX Workspace user. The two lists don't match. Attached please find the screen shots between the two. One from the Application Administration Access Control User list and the other is the Workspace user. I don't think that the two lists are the same like you suggested unless I misunderstand you. The following two screen shots will show you the difference. I blur the domain name for the email address. In the Workspace user section, you can ignore GETHELP as the user. That's for another app/login. But jlam@xxxxxx.com is my actual login to the apex.oracle.com. In the specific app, I also have an user named jlam@xxxxxx.com. I can understand this one. But I have also created ds9, jl2 via the Application Administration menu link area, i.e. default Access Control List feature Admin page seeded with the App Creation wizard. But I am not finding these users in the Workspace User list. So I don't think that the two are the same here.
The following screen shot was taken from the App Administration section of the User list.
apex_user_list_from_App-ACL.pngThe following screen shot was taken from the Workspace Manage User section.
apex_user_list_from_WrkspaceAdmin.png
The two are very different. My understanding is that the APEX user is created in the Workspace. But my question is related to the Application level user list. Where do they create and how can I login as those user such as DS9 in the screen. There is no place to create the password when you add a new user via the Application Administration section.
So are you suggesting that I have to also create the same user e.g. DS9 or JL2 in the Workspace area and then they can access the app that way?
Hope I can explain my question properly. Thanks

JKL

Hilary,
Ok, I just create new user via the Manage Workspace User area and it seems to work the way it is. But how does APEX reconcile the two lists. Are they truely the same user in this case other than the user name is the same. But it is just weird that this is the method. Why can't APEX simply actually create the Workspace user directly if the user is not already created? Either way, thanks for your reply.

Hilary Farrell-Oracle

Hi JKL,
So are you suggesting that I have to also create the same user e.g. DS9 or JL2 in the Workspace area and then they can access the app that way?
Yes, that's correct. When you're using APEX Accounts authentication, the users in question must exist in the workspace in order to have access to the application. Users added to the Access Control List via the Application Administration are not automatically created as workspace users. You must use the workspace Administration -> Manage Users and Groups -> Create User wizard in order to actually create the new users.
Regards,
Hilary

JKL

Hilary,
It would be nice to automatically add this as APEX user or take you to the add user page for the app if the app has a custom application user creation process. I guess that this may be quite a complicated feature. For now, thanks for your update.

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 31 2009
Added on Jul 25 2005
4 comments
847 views