[JNDI/Naming/Network] - JBoss with porty forwardng problem
by ps.jagadeesh
Hi All,
I am working on a Java webstart application with JMS. The application scenario is a little bit differnt than a normal application. My JBoss is running on a Local machine(IP: 192.168.1.2) inside the Lan, and the java webstart clients outside the network has to communicate with this server through the gateway server(IP: 203.200.112.125) of the network. This gateway server will forward all requests to the JBoss which runs on the local machine. From the local network this application works well, but when I try to access the application using http://203.200.112.125/appname from an external network, I am able to download the webstart and start the program, but when I try to access the deployed bean for login or any kind of business activity , it gives me a lot of Exceptions. The stack trace is as follows...
javax.naming.CommunicationException. Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.2; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.klc.locator.ServiceLocator.getHome(ServiceLocator.java:56)
at com.klc.klwebspy.ServerManager.(ServerManager.java:26)
at com.klc.klwebspy.ServerManager.getInstance(ServerManager.java:39)
at com.klc.klnetcenter.database.postgres.KLNetCenterDB.create(KLNetCenterDB.java:310)
at com.klc.klnetcenter.database.postgres.KLNetCenterDB.checkDatabase(KLNetCenterDB.java:92)
at com.klc.klnetcenter.KLNetcenter.initialization(KLNetcenter.java:65)
at com.klc.klnetcenter.KLNetcenter.(KLNetcenter.java:23)
at com.klc.klnetcenter.KLNetcenter.main(KLNetcenter.java:35)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.(Socket.java:291)
at java.net.Socket.(Socket.java:119)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 15 more
java.lang.NullPointerException
at com.klc.klwebspy.ServerManager.executeRequest(ServerManager.java:46)
at com.klc.klnetcenter.database.postgres.KLNetCenterDB.create(KLNetCenterDB.java:310)
at com.klc.klnetcenter.database.postgres.KLNetCenterDB.checkDatabase(KLNetCenterDB.java:92)
at com.klc.klnetcenter.KLNetcenter.initialization(KLNetcenter.java:65)
at com.klc.klnetcenter.KLNetcenter.(KLNetcenter.java:23)
at com.klc.klnetcenter.KLNetcenter.main(KLNetcenter.java:35)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012971#4012971
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012971
19Â years, 2Â months
[Security & JAAS/JBoss] - using digest authentication
by martique
Hi, I'm learning JBoss and I'm trying to use digest authentication for my web application. I did this:
1) application.war/WEB-INF/web.xml:
<security-constraint>
<display-name>Default JSP Security Constraints</display-name>
<web-resource-collection>
<web-resource-name>Portlet Directory</web-resource-name>
<url-pattern>/jsp/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>DIGEST</auth-method>
<realm-name>MyApplication</realm-name>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
2)application.war/WEB-INF/jboss-webxml:
<security-domain>java:/jaas/pentaho</security-domain>
<security-role>
<role-name>admin</role-name>
<principal-name>martagroup</principal-name>
<principal-name>marta</principal-name>
</security-role>
3)server/default/conf/login-config.xml
<application-policy name="application">
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/digest-users.properties</module-option>
<module-option name="rolesProperties">props/digest-roles.properties</module-option>
<module-option name="hashAlgorithm">MD5</module-option>
<module-option name="hashEncoding">rfc2617</module-option>
<module-option name="hashUserPassword">false</module-option>
<module-option name="hashStorePassword">true</module-option>
<module-option name="passwordIsA1Hash">true</module-option>
<module-option name="storeDigestCallback">
org.jboss.security.auth.spi.RFC2617Digest
</module-option>
</login-module>
</application-policy>
4)conf/props/digest-roles.properties
marta=admin
5)conf/props/digest-users.properties
marta=231484604fc44289526e4420998828a7
digested string was created as:
java -cp jbosssx.jar org.jboss.security.auth.spi.RFC2617Digest marta "My Application" marta
It doesn't work at all, my application load without any authentication. What I did wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012968#4012968
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012968
19Â years, 2Â months