JBoss as5, JVM_Bind address - jboss

This may have been addressed prior, but I don't see a question specifically from this problem.
I'm trying to run 3 separate instances of JBoss as5 on my Win7 box. After starting the initial server the subsequent server startups complain:
13:57:59,659 ERROR [RmiInitialization]
java.rmi.server.ExportException: Port already in use: 0; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
which would indicate to me that the JVM_Bind port is not getting configured so it's defaulting to 0 ?
If so, where/how should this be defined in the JBoss infrastructure?

Looks like you are using the same bind address. Please do an nslookup or lsof to check your address and port. You could also set a port offset since your instances are running on the same machine.

Try stopping services in services.msc particular to other application servers like IBM Websphere.

Related

Wildfly Connection refused for url with DNS name

I have a Wildfly 16 instance running on a test server. This instance can be reached successfully via the host name and the IP address of the server. In addition, there is a DNS entry for the server similar to test.mydomain.internal. The server does not respond to the DNS name (example url: http://test_instance.mydomain.internal:8080/test/). The connection is refused.
What do I have to set in the standalone.xml so that I can also get a connection via the DNS name?
-update-
The sample url has been adjusted to clarify the problem in the question .
I found the problem. It had nothing to do with the settings in the Wildfly. The DNS entry had underlines in the name. SOAPUI and two other programs had a problem with that.

Error on starting the WildFly server (address already in use)

I have a problem starting a wildfly app-server (wildfly-21.0.1) on a Solaris server (computer). I have read a lot of similar posts, but my problem seems to be different.
First, I make an SSH-tunnel in PuTTY:
My home machine is Windows, I connect to a remote Solaris server. I write the address of the server in a "Host name" field.
After this I create an SSH tunnel on a port of the server (I tried different and rare ones), so I put the port of the server I am connecting to in "Source port" field and the port of my personal machine (localhost:port_number) in the "Destination".
I have configured standalone.xml by changing on
<interface name="public">
<any-address/>
</interface>
and
<socket-binding name="http" port="${jboss.http.port:14384}"/>
I have configured PATH and JAVA_HOME on the server.
I start the server by
bash wildfly-21.0.1.Final/bin/standalone.sh
command.
After this I get the following error:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service org.wildfly.undertow.listener.default: org.jboss.msc.service.StartException in service org.wildfly.undertow.listener.default: Address already in use /0.0.0.0:14384
It happens with any ports I tried, and I am sure that they aren't in use.
How can I fix this? Are there any known bugs in Wildfly that can cause this? Is it somehow connected with tunneling?
The discussion with #AndrewHenle made me think of ports usage in a tunneling procedure so I changed "Remote" parameter in "Tunnels" section on "Local" (since the destination is localhost). All the other parameters and values were left the same. Now everything works correctly, and WildFly doesn't recognise 14384 as a taken port.

Consul.io - how to run multiple servers on same machine

This is probably a very basic question for you, but I'm just getting into consul and for testing purposes, I wanna run multiple servers on my PC. For example, I run the first server with
consul agent -server -bootstrap-expect=1 -dc=dev -data-dir=/tmp/consul -ui-dir="c:/consul 0.5.2/dist"
and then I try to run the second server with
consul agent -server -data-dir=/tmp/consul2 -dc=dc2
but it returns
==> Error starting agent: Failed to start Consul server: Failed to start RPC lay
er: listen tcp 0.0.0.0:8300: bind: Only one usage of each socket address (protoc
ol/network address/port) is normally permitted.
What am I missing from my command?
You are launching two consul servers using mostly default values. In this case the problem is that you use default ports.
When you read the error message you will notice that your second consul server tries to bind to port 8300. But your first server is already using this port, causing the second server to fail at startup. (note: consul binds to a variety of ports, each having another purpose and default setting. Take a look at the documentation).
As suggested by LenW, you can use Vagrant to set your environment. You could follow the consul tutorial.
If you do not want to use vagrant or set up any virtual machines on your own. You could change the defaults of the second server.
If you are trying to simulate a production topology on your dev machine I would look at using Vagrant in combination with VirtualBox to simulate a couple of machines for testing.

Why does JBoss 7.1.1 recognize localhost but not my IP address?

Centos 6.5
JBoss 7.1.1.Final
starting jboss as ./standalone.sh
When I go to localhost:8080 there is jboss, nice and happy
When I go to 192.168.111.222:8080 I get a 404 page not found error
This is problematic.
I have looked at other questions here that have advocated the following
./standalone.sh -b 0.0.0.0
This gives an error. It says the address is already in use.
I have tried
./standalone.sh -b 192.168.111.222
This doesn't work either.Same error as above. I have checked each time to see if there is another jboss process running out there and the answer is no.
I have tried modifying the jboss/standalone/configuration/standalone.xml interfaces to accept all connections. That didn't work either
No matter what I do, it always says:
Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
and going to ipaddr:8080 doesn't work, but localhost:8080 does work.
I saw one thread recommend modifying your hosts file to point your ip address at local host: I already have an entry there pointing my ip address at a domain name (which also doesn't work)
Other services on my machine work just fine, able to reach addresses whether I use localhost or specify the IP address, so this seems to be a jboss specific problem.
How do I fix this? I haven't used jboss before and I'm starting to see why.
There is probably some other process listening on port 8080. Try to find the process by
netstat -tulpn | grep 8080
You can simply change the AS7 port numbers by setting port-offset. Start JBoss AS7 like this:
./standalone.sh -b 0.0.0.0 -Djboss.socket.binding.port-offset=150
The web port will be 8230 in this case. (i.e. you'll use 192.168.111.222:8230 in the browser).

RhodeCode - What is blocking my connection?

All connection attempts on RhodeCode on CentOS 6.3 are refused except from localhost.
Note that iptables is not running, and I am only trying to visit the web interface.
I have googled the exact error message below and looked around SO. I have yet to find a solution.
abort: error: No connection could be made because the target machine actively refused it
If the firewall is down, and I am not trying to modify any repository, what else is preventing me from connecting? EDIT: See #5 below. Not sure how to address it yet.
Things tried and other info
Using localhost, 127.0.0.1 and hostname in production.ini
service iptables stop
Connected over HTTP successfully. In other words, connections are accepted outside RhodeCode.
Made sure no authentication methods were enabled or configured in production.ini
Although the server accepts connections on localhost, netstat -l does not show that port 5000 is listening. Port 5000 is set in production.ini and ps uax | grep paster confirms the server is running. No other software tries to grab port 5000.
Ok, apparently I have been misunderstanding the host configuration. I was running on the assumption that host should be set to 127.0.0.1 or localhost in production.ini for RhodeCode to know what host to look for for another service. This was a faulty presumption on my part, since I am used to pointing web applications to local systems to look for databases.
It turns out that host binds the application to a specific address for access, meaning that it RhodeCode was supposed to only respond to local requests, regardless of what other system policies say. The setup docs did not make this clear because it did not specify that external connections would be refused. All it said was:
This command [paster serve] runs the RhodeCode server. The web app should be available at the 127.0.0.1:5000. This ip and port is configurable via the production.ini file created in previous step
The problem was fixed by binding RhodeCode to 0.0.0.0, which opened it to outside connections. Kudos to Ɓukasz Balcerzak for pointing this out in the RC support google group.