[Remoting] - running an RMI server on same server as JBoss
by jdriver
I have a method that I have exposed via RMI. First I start the registry using:
start rmiregistry
Then I start the server like this
java -cp <classpath stuff here> -Djava.rmi.server.codebase=file:/d:/blah.jar -Djava.security.policy=server.policy -Djava.rmi.server.hostname=10.38.12.17 com.example.ServerCode
This is working fine, but when I start JBoss on the same server the rmi port gets blocked by the JBoss server. I dug around and found something I could change in the jboss-service.xml that would cause both things to run on same box:
<!-- The listening port for the bootstrap JNP service. Set this to -1
to run the NamingService without the JNP invoker listening port.
-->
<attribute name="Port">-1</attribute>
By setting this to -1 things work (it was 1099), but what have I disabled? JNP is the JNDI naming protocol right? Does this mean JNDI lookups will now fail on this JBoss?
I also wanted to try and get RMI to stop using port 1099 all together so I would have no impact on JBoss. I've looked into running my RMI server using rmid, but haven't understood whether that will help.
Can anyone please give me some hints?
Thanks - Jesse jdriver(a)yahoo.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204824#4204824
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204824
17 years, 2 months
[Beginners Corner] - twiddle can't get some objects?
by kcbraunschweig
This seems like it should be simple but I can't find any helpful info online about it. I have a jboss server running and I'm trying to use twiddle to get info about various objects that are visible in the JMX console. Some return data as expected, while others give an error. Specifically these cases:
| twiddle.sh -s localhost info jboss.system:type=Server
| twiddle.sh -s localhost get jboss.system:type=Server
|
Both of the above return as expected. No errors.
| twiddle.sh -s localhost info jboss:service=Naming
|
The above info command also returns a list w/ the description, attributes and operations as expected.
| twiddle.sh -s localhost get jboss:service=Naming
|
However this time trying to get that object fail as above fails like this:
| 12:49:21,579 ERROR [Twiddle] Exec failed
| java.io.NotSerializableException: java.lang.reflect.Method
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
|
I've seen errors like this in other posts, but in those cases it looks like that first line after "Exec failed" usually has some useful information about why. Maybe I'm missing the meaning? Can I not get this object? How do I know if I can or not? I assume I should be able to since the JMX console can?
Can you help a n00b?
Thanks,
KC
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204818#4204818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204818
17 years, 2 months
[Security & JAAS/JBoss] - Re: Security Issues with Migrating from WebSphere to JBoss
by plscstx
Never mind, figured it out.
web.xml security snippet:
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>Admin</web-resource-name>
| <description>Administrative Functions</description>
| <url-pattern>/admin/*</url-pattern>
| <url-pattern>/formprocessing/*</url-pattern>
| <url-pattern>/adminintro.html</url-pattern>
| <!-- url-pattern>/config/*</url-pattern -->
| <http-method>
| GET</http-method>
| <http-method>
| POST</http-method>
| <http-method>
| PUT</http-method>
| <http-method>
| HEAD</http-method>
| <http-method>
| TRACE</http-method>
| <http-method>
| DELETE</http-method>
| <http-method>
| OPTIONS</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description>AdminSettings</description><role-name>*</role-name> </auth-constraint>
| <user-data-constraint>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| <!--realm-name>corpTax</realm-name>
| <realm-name>drhorton.com</realm-name-->
| <form-login-config>
| <form-login-page>/login.html</form-login-page>
| <form-error-page>/error.jsp</form-error-page>
| </form-login-config>
| </login-config>
note the * for the role
jboss-web.xml:
<jboss-web>
| <!-- All secured web content uses this security manager -->
| <security-domain>java:/jaas/myApp</security-domain>
| </jboss-web>
servers login-config.xml:
<application-policy name = "myApp">
| <authentication>
| <login-module code = "org.jboss.security.auth.spi.LdapLoginModule" flag = "required" >
| <!-- PASSWORD VERIFICATION -->
| <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option name="java.naming.provider.url">ldap://servername:389/</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="principalDNPrefix">prefix\</module-option>
|
| </login-module>
| </authentication>
| </application-policy>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204810#4204810
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204810
17 years, 2 months