java - javax.jms.ConnectionFactory only connecting when logged in a root -


i executing following code on rhel 6 box root , runs perfectly. when execute user lesser permissions javax.naming.namingexception: failed connect server. servers tride: [remote://myserver::myport]. seems permission issue have of files program accesses set 777.

what causing happen?

update apparently not resolve host name ip address unless root. using ipaddress instead (i use iputils resolve later). getting follwoing errors:

javax.jms.jmsexception: failed create session factory         @ org.hornetq.jms.client.hornetqconnectionfactory.createconnectioninternal(hornetqconnectionfactory.java:587)         @ org.hornetq.jms.client.hornetqconnectionfactory.createconnection(hornetqconnectionfactory.java:107)         @ myclass.run(myclass.java:172)         @ java.lang.thread.run(thread.java:744) caused by: hornetqexception[errortype=not_connected message=hq119007: cannot connect server(s). tried available servers.]         @ org.hornetq.core.client.impl.serverlocatorimpl.createsessionfactory(serverlocatorimpl.java:863)         @ org.hornetq.jms.client.hornetqconnectionfactory.createconnectioninternal(hornetqconnectionfactory.java:583) 
initialcontext context = null;  properties properties = new properties(); properties.setproperty(context.initial_context_factory, "org.jboss.naming.remote.client.initialcontextfactory"); properties.setproperty("java.naming.provider.port", hostport); properties.setproperty("jboss.naming.client.ejb.context", "true"); properties.setproperty(context.provider_url, "remote://" + hostaddr + ":" + hostport); properties.setproperty("jboss.naming.client.connect.options.org.xnio.options.sasl_policy_noplaintext", "false"); properties.setproperty("jboss.naming.client.remote.connectionprovider.create.options.org.xnio.options.ssl_enabled", "true"); properties.setproperty("jboss.naming.client.connect.options.org.xnio.options.ssl_starttls", "true"); properties.setproperty(context.security_principal, username); properties.setproperty(context.security_credentials, userpass); try {   context = new initialcontext(properties);    connectionfactory cf = (connectionfactory) context.lookup(connectionfactory);   destination destination = (destination) context.lookup(jmstopicname);    connection conn = cf.createconnection(username, userpass);   session sesh = conn.createsession(false, session.auto_acknowledge);   messageconsumer consumer = sesh.createconsumer(destination, selector + selectornum);   consumer.setmessagelistener(this); 

are trying host on restricted ports such 80?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -