How do I check and set the URL and port number for JBoss 5? - jboss

How do I check and set the URL and port number for JBoss 5? I have a existing JBoss installation in a zip file that I am trying to use. How do I find out what URL and port number I need to type in my browser to access it when it's running? How would I go about modifying this setting to change the URL and port number?
I'm running this in windows 7.

I solved my problem by finding in the file /jboss.5.1.0.ga/server/default/jbossweb.sar/server.xml the HTTP connector was commented out so it was using the AJP connector. I enabled the HTTP connector and was able to connect to jboss using the standard http://localhost:8080 address. I believe you can change the port number as well as the URL in this same area.

Related

How to find port number of a Spring Boot app?

How do I find the port number of my SpringBoot app so I can call it? I already tried setting -Dserver.port=8080 and--server.port=8080 in VM arguments and in src/main/resources/application.properties.
If I try to go to localhost:8080 Chrome says refused to connect. I simply want to be able to connect to my App don't know why Spring Boot made finding which port is being used so challenging.
I'm using Eclipse and the app appears to be running properly from the logs.
This simply printed 0:
#Value("${local.server.port}")
int port;
I've tried these answers none work:
Spring Boot - How to get the running port
Spring boot - how to get running port and ip address How to configure port for a Spring Boot application How to configure port for a Spring Boot application
localhost:<your port> may not respond at all. Make sure you're hitting an endpoint you know is availible like localhost:8080/info. Make sure your app has completly started, it could take serveral minutes.
As #BrianC mentioned make sure your app is actually a web server.
in your springboot main method use below code to detect port of your application
Environment environment =app.run(args).getEnvironment();
System.out.println(environment.getProprty("server.port");
this will tell you actual port where your aplication running .
Value can be found using Spring’s Environment as it represents the environment in which the current application is running.
It can also be used to find other properties in applications like profiles.
#Autowired Environment environment;
String port = environment. getProperty("local.server.port");

Failed to connect to localhost/127.0.0.1:7443

Hi i am using openfire as my im server to my mobile app client, I have added the Httpfileupload plugin to openfire and enabled the http bind settings, when I try to upload a file it shows me this error Failed to connect to localhost/127.0.0.1:7443 ,
and the servers send me this XML message <get url="https://localhost:7443/httpfileupload/45726202-5e69-4b5c-a533-00d82f6d1121/4add76e7f15b6b4f.png"/>
I’ve tried to access this uri but it doesn’t work
please help me with this issues
i am using the latest smack version and the latest openfire version also
You appear to have set up Openfire using the value 'localhost' as its XMPP domain and/or fully qualified domain name for the server that is running Openfire. This is a recipe for disaster. Openfire is broadcasting the address of the content that is managed by its HTTP File Upload plugin, and uses the value that was configured, 'localhost'. Clients, which typically run on different machines, will try to connect to this host. As they're instructed to connect to 'localhost', they'll never be able to reach Openfire.
My advise is to setup Openfire again, and use proper, network-reachable addresses for values of the XMPP domain name and FQDN (these are asked for in the second page of the setup wizard, if memory serves).

Swing Client - EJB2 lookup over HTTP in JBoss 5.1

I have a swing client which connects to my ejb2 application deployed in JBoss 5.1. There is a particular requirement from Customer to make it available on internet.
The deployment architecture is as follows,
swing_client --> extranet_ip |firewall | --> iis7_machine --> jboss5.1_machine.
jndi properties in client is as follows
Context.PROVIDER_URL=http://extranet_ip:9180/invoker/JNDIFactory
Context.INITIAL_CONTEXT_FACTORY=org.jboss.naming.HttpNamingContextFactory
This configuration works fine when the client is inside intranet. But it does not work in internet (extranet).
When I tried initially I got the error 'Connection refused'
After seeing some posts in various forums, I changed the file server\deploy\http-invoker.sar\META-INF\jboss-service.xml, to reflect the extranet_ip in invokerURL.
Aftet this I am getting the following error.
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://10.200.1.193:4546/?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
Where 10.200.1.193 is the intranet IP address of JBoss Server machine.
I tried changing the trasport parameter in remoting-jboss-beans.xml to http, but at that time client is not working in both intranet and extranet.
Please anybody suggest a way forward for this issue. Or is there any other way to implement RMI over Http in JBoss?
Update: As a solution, I had to change my deployment architecture as follows.
swing_client --> extranet_ip |firewall | --> jboss5.1_machine
where the JBoss Application Server will be directly exposed through firewall. Then update clientConnectAddress in the remoting-jboss-beans.xml to the extranet IP. Also open the ports 8080 & 4446 in the firewall for this address.
This way the swing client is working if I use the jnid properties as follows.
Context.PROVIDER_URL : http://extranet_ip:8080/invoker/JNDIFactory
Context.INITIAL_CONTEXT_FACTORY : org.jboss.naming.HttpNamingContextFactory
But still looking for a solution where there is no need to open any non-standard ports and no need to expose the Application Server directly.
After a long struggle I found a solution for my issue. The solution was to change EJB container's invoker type to http in standardjboss.xml. When the invoker is http, it will use the settings in http-invoker.sar for remote binding.

JBoss Servername

Where do you change the hostname(servername) for your application server. For example, if there is an application server JBoss which is running on local machine, port 8080 and is accessed using "http://localhost:8080/index.jsp, and if I want to change lets say to "http://www.myserver.com/index.jsp, how do i do this?
This is called "virtual hosting". You can find the instructions for doing this with JBoss 5.1 here.

tomcat and eclipse: starting server

in my system i am using eclipse and tomcat server. I hav 3 different versions of tomcat servers.
But i am trying to run only one server at a time. But by default Already one server is running on port number 8080. When i am trying to start the tomcat server in 8081 port, the tomcat server is not getting start.
I have configured my tomcat home, and server.xml in eclipse properly. But I don't know what I am missing. please guide me.
It sounds like you don't have your port numbers defined and each tomcat instance is fighting to grab the port range first before the others.
Check your config file to make sure the port numbers are specified for each instance.
see how to change port in y=tomcat , may be you forgot to change some where
http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
you can stop another tomcat service before you start your tomcat gets started , end process tomcatX(X is version) from task-manager