Hot questions for Using Ubuntu in wildfly

Question:

Currently I have setup an ubuntu server in virtual PC running in Windows 7.

Got it from http://developer-should-know.com/post/134394533957/how-to-install-wildfly-on-ubuntu

I configured JAVA and JBOSS related configuration and deployed a simple .war file(App).

Now I want to access it in my host pc i.e. in windows. when I am pinging from host pc ip: 192.168.64.129 its responding but when I put the ip in host browser its not accessing war file.

I know now i am lacking some more config issue. How to solve it?


Answer:

By default, wildfly listens on port 8080 (and the default http port of browsers is 80). So you could use

http://192.168.64.129:8080/

Alternatively, see the WildFly Admin Guide - Configuring interfaces and ports and change the http binding from 8080.

Question:

Environment:

  • Ubuntu 14.04
  • Netbeans 8.0.2
  • Wildfly 8.2.1
  • JDK 1.8.0_60

I can build without error, but when I try to Run the project I get this error, but I don't have any persistance configuration yet.

Error log

11:47:56,871 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
11:47:57,070 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
11:47:57,144 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.2.1.Final "Tweek" starting
11:47:57,534 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112)
    at org.jboss.as.server.ServerService.boot(ServerService.java:331)
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:259)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,1]
Message: Unexpected element '{urn:jboss:domain:3.0}server'
    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)
    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:104)
    ... 3 more

11:47:57,535 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
11:47:57,545 INFO  [org.jboss.as] (MSC service thread 1-8) JBAS015950: WildFly 8.2.1.Final "Tweek" stopped in 3ms

How can I fix this?


Answer:

Your server can't start because there is an issue with your server configuration. According to your error message, your configuration starts with something like this:

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:3.0">
...

but wildfly 8.2.1 as I know supports server configuration version 2.2 and your config should look like this:

<?xml version='1.0' encoding='UTF-8'?>

<server xmlns="urn:jboss:domain:2.2">
...

How could this happen? Most probably, you have misconfigured your IDE or environment properties, so that Wildfly looks in wrong place for configuration. Check JBOSS_HOME environment property, in most situations you don't need that, so unset it.

$ env | grep JBOSS_HOME

otherwise review carefully your server configuration in Netbeans.

Question:

I've been trying for a few days now to configure a development JBoss working space on my Linux Ubuntu server (both AS7 and WildFly 8), but I can't seem to be able to configure it so that I can see the web-facing ports outside of the local network. I've looked through several tutorials and pages here on stackoverflow, and they all seem to point to these lines in standalone.xml:

452     <interfaces>
453         <interface name="management">
454             <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
455         </interface>
456         <interface name="public">
457             <inet-address value="${jboss.bind.address:127.0.0.1}"/>
458         </interface>
459         <!-- TODO - only show this if the jacorb subsystem is added  -->
460         <interface name="unsecure">
461             <!--
462               ~  Used for IIOP sockets in the standard configuration.
463               ~                  To secure JacORB you need to setup SSL
464               -->
465             <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
466         </interface>
467     </interfaces>

I've tried several different solutions, changing the inet-address value to point to 0.0.0.0 like so

458             <inet-address value="${jboss.bind.address:0.0.0.0}"/>

as well as using the <any-address/> and <any-ipv4-address/> tag. I've also tried running the server with the -b 0.0.0.0 option. It appears that the changes take with all of these solutions, but when I try to visit the server by typing the IP address with port 9990, I still can't reach the admin console. I believe that the correct changes are being made with respect to interface-binding because on start-up it says

14:24:36,801 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990

I also know that the server is physically reachable because when I simply type in the IP, I can see the /var/www directory structure.

When I use netstat | grep 9990, I get:

tcp        0      0 *:9990                  *:*                     LISTEN      9519/java

Can anyone give me any suggestions as to why I am not able to reach the admin console? I've tried the solutions listed here: Can't access JBoss AS 7 from remote machine and here: How to share jboss over network

UPDATE: The result of the command iptables -L -v -n is:

Chain INPUT (policy ACCEPT 1736K packets, 1702M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 1402K packets, 149M bytes)
 pkts bytes target     prot opt in     out     source               destination

Answer:

Not pretty sure what do you mean by:

I also know that the server is physically reachable because when I simply type in the IP, I can see the /var/www directory structure.

Are you trying reaching the server through FTP/SFTP , that's why you mention the /var/www folder ? Can you make a list addresses which you have tried ? is http://domain.com:8080 (The Root Web app) reachable ? If so it could be a matter of a firewall rule blocking port 8080. Try running as root:

/etc.rc.d/init.d/iptables stop

And see if you can reach the Administration console. I've published a small checklist of things to do to reach jboss over a network. Hope it helps