[JBoss Messaging] - Cannot find free port - problem
by anshah1
Hi all,
I've never seen this kind of an error message before. I have a jboss (app server AS4.0.3SP1) messaging configuration (CR4) running on a Windows box and it runs perfectly as expected.
Now recently we shifted our server to a RHEL machine and downloaded and installed the same jboss server and messaging configuration. When running the jboss server under root privileges it runs perfectly fine... However the moment you switch to running as another user account, lets say jboss, it starts giving the following error messages..
java.io.IOException: Can not find a free port for use.
| at org.jboss.remoting.transport.PortUtil.findFreePort(PortUtil.java:114)
| at org.jboss.jms.client.remoting.CallbackServerFactory.startCallbackServer(CallbackServerFactory.java:141)
| at org.jboss.jms.client.remoting.CallbackServerFactory.getCallbackServer(CallbackServerFactory.java:87)
| at org.jboss.jms.client.remoting.JMSRemotingConnection.<init>(JMSRemotingConnection.java:84)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.invoke(ClientConnectionFactoryDelegate.java:158)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.java)
| at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:81)
| at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect1.invoke(StateCreationAspect1.java)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.java)
| at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.java)
| at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N6840474864420126404.java)
| at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
| at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:202)
| at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:108)
| at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:103)
| at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:156)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
| at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:605)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:932)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:428)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
|
|
It seems to run fine as root so I would have to guess that it is trying to open ports under 1024 which are the only ports restricted to root. But looking at the jboss code it doesn't seem to be the case.
Any ideas on what might be causing this?
Thanks,
Anuj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972016#3972016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972016
19 years, 7 months
[JBoss Portal] - image/png Content type not accepted
by jgilbert
I am trying to create a portlet that just returns content of type image/png. So I have configured my portlet with:
<supports>
| <mime-type>image/png</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
and in my portlet I set the type as:
response.setContentType("image/png");
But when I run the portlet I get the following exception: java.lang.IllegalArgumentException: Content type not accepted
According to the spec this exception is thrown when the content type does not match request.getResponseContentType().
When I add a debug statement, I see that request.getResponseContentType() returns text/html.
Shouldn't this return image/png since I configured it as above? Or is this a bug or am I trying to do something that I shouldn't?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972015#3972015
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972015
19 years, 7 months