How to access an application which is in remote JBoss - jboss

I am running my application using JBoss which is in windows7. Now I want to access the same application from other system which is having Ubuntu 14.04 OS. I saw some posts in the internet and I can able to access the remote JBoss & my application. But I am not able to Login. I am getting this error in the console
net::ERR_CONNECTION_REFUSED
I don't know what is the issue. Help me.
Thanks.

Normally Jboss is started to listen in localhost (127.0.0.1). On your standalone.xml file you will find something like:
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
So you can change your standalone.xml file replacing this 127.0.0.1 with 0.0.0.0, or you can edit (in your jboss/bin directory) standalone.conf.bat file and at some point add to your JAVA_OPTS the option -Djboss.bind.address=0.0.0.0, like:
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.bind.address=0.0.0.0"
You can even add this property on the standalone.xml file.

Related

SMBJ no longer working when I modify JMX port settings

I have an application running under spring boot utilizing SMBJ to mount and read remote files, and it works perfectly. However I am trying to set up some datadog reporting and trying to use JMX as a datasource for datadog...
TO do this I am staring the springboot jar with the following:
ENTRYPOINT java -Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=8089
-Dcom.sun.management.jmxremote.rmi.port=8089
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-jar demo-0.0.1-SNAPSHOT.jar
And once I do this, SMBJ no longer creates the mount. If I remove these parameters the code works fine again and SMBJ is able to create/mount to the share, If I have them it simply times out trying to create the share. I thought maybe it was the RMI hostname change, but removing just this this doesn't seem to fix it.
Can anyone offer any help on this? Is SMBJ really dependent on the jmxremote settings? It certainly seems to be..I have tried removing the overriding of the ports, so they go to their default ports as well, but this didn't fix it either.
Any help would be appreciated.

Hot redeployment not working on Wildfly 10.1.Final

I have a multi-maven war project that I'm trying to deploy in Wildfly. I'm using the JBoss Tools plugin in eclipse to do the deployment (incremental, full publish) and I can see the files being deployed, updated in wildfly's deployment directory. My problem is the xhtml file rendered in the browser is not updated. What I tried:
1.) clear the browser's cache - no effect
2.) open a private browser window - no effect
3.) added a no-cache filter in wildfly
<server name="default-server">
<host name="default-host" alias="localhost">
<filter-ref name="cache-control" predicate="path-suffix['.html'] or path-suffix['.jsf'] or path-suffix['.xhtml'] or path-suffix['.css'] or path-suffix['.js']"/>
</host>
</server>
<filters>
<response-header name="cache-control" header-name="Cache-Control" header-value="no-cache"/>
</filters>
Seems like Wildfly has some deep caching, because when you run incremental publish and then restart the server the changes are reflected.
Any idea?
For standalone:
When already connected to CLI:
deploy /path/to/application.war
Connecting and deploying in a single command:
jboss-cli.sh --connect command="deploy /path/to/application.war"
Connecting, deploying, and authenticating in a single command:
jboss-cli.sh --connect --user=admin --password=redhat command="deploy /path/to/application.war"
For domain:
Deploying to all groups:
deploy /path/to/application.war --all-server-groups
Deploying only to specified groups:
deploy /path/to/application.war --server-groups=server_group_1,server_group_2
These domain commands can also be used like above to connect and/or authenticate in a single command.
User can not deploy application to specific server/servers in domain mode.
The application.war should be an archived application (not an exploded war).
Problem was solved by adding param: javax.faces.FACELETS_REFRESH_PERIOD in web.xml.
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>2</param-value> <!-- Should be -1 for production. -->
</context-param>

How to remove KeyCloak from Wildfly?

I recently configured KeyCloak in my existing Wildfly server using the overlay installation:
bin/jboss-cli.sh --file=bin/keycloak-install.cli
I would like to remove it or disable it now. I'm pretty new to Wildfly. I think it should be the same way how to disable a subsystem?
The easiest way to achieve it will be to open standalone.xml file in the %JBossHome%>standalone>configuration folder and remove/comment out the keycloak subsystem.
The subsystem configuration will look something like this
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
<web-context>auth</web-context>
</subsystem>

How can I run two instances of tomcat 7.0 per eclipse different ports?

Project1: http1.1=8080 ajp1.3=8009; Project2: http1.1=8085 ajp1.3=8010. When I run Project2 in eclipseit starts up ok. However, when I startup the second in eclipse it says tomcat has a problem....this is all after cleaning both projects and a reboot.
As per the screenshot, eclipse complains that "tomcat admin port" 8005 is already in use. Please change this under Ports ( in addition to changing http 1.1 and ajp1.3). I think you had mentioned that the port appears to be readonly. If that is the case, the port could be directly modified in the server.xml located in your workspace.
File location: <>\Servers\Tomcat v7.0 Server at localhost-config\server.xml
Locate the following line in server.xml and modify it. Refresh your eclipse and it should reflect in the UI.
<Server port="8005" shutdown="SHUTDOWN">
For 2nd instance change the server port to some other port like 801010 ...it will work
You need to change all the three port numbers as in the pic

OSGi Remote DS product configuration works only inside Eclipse

I'm working on Eclipse STS 2.7.2 with Java JDK 1.6, Windows XP SP3. I work behind a proxy which requires authentication.
I wrote two simple client and server plugins which work using DS and Zookeeper discovery. They refer to an IHello interface bundled in a third plugin.
The server publishes a simple Hello service which returns a string "hello" when invoked on 192.16.23.28:6666/hello and starts Zookeper with VM arguments
-Dzoodiscovery.dataDir=bla
-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=192.168.23.28:3030;clientPort=3031
xml is:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="NOLINKALLOWED" name="it.eng.test.remote.ds.helloservice">
<implementation class="it.eng.test.remote.ds.helloservice.HelloService"/>
<property name="service.exported.interfaces" type="String" value="*"/>
<property name="service.exported.configs" type="String" value="ecf.generic.server"/>
<property name="ecf.exported.containerfactoryargs" type="String" value="ecftcp://192.168.23.28:6666/hello"/>
<service>
<provide interface="it.eng.test.remote.ds.hello.IHello"/>
</service>
</scr:component>
the client starts Zookeeper with VM arguments
-Dzoodiscovery.autoStart=true
-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=192.168.23.28:3031;clientPort=3030
In both cases the OSGi framework is started with the -console -consoleLog -clean arguments.
I then created two separated run configuration for both server and client (Run as->run configurations..) adding all required bundles (most important ones: org.eclipse.ecf.provider.remoteservice and org.eclipse.ecf.provider.zookeeper) and their dependencies.
Based on that configuration I defined two separated product configurations (new->product definition->select run configuration) for both client and server.
Now, if I run them by clicking on the link "Launch an Eclipse application" inside the respective product configuration, everything works. The server publishes the service, the client gets it and shows "Hello" on output. netstat -a | grep 6666 shows that someone is listening on that port and netstat -a | grep 30 shows that port 3030 and 3031 are being used.
Eclipse is configured to use my proxy correctly.
If I export them as an Eclipse product based on the aforementioned configurations (export->eclipse product->select product configuration), I get two folders: client and server.
Inside them there's everything needed to run the applications inside an external OSGi framework, including configuration files for both the framework (config.ini) and the VM (eclipse.ini).
The applications are started with STS.exe -console which opens an OSGi console with all the required bundles installed and started.
Starting the server works, I see someone listening on 6666 and zookeeper reports that the service has been published.
If I start the client, nothing happens. No output, no connections on 3030 and 3031, no errors. It simply does nothing, zookeeper however says it has started discovery.
Using localhost instead of my IP changes nothing, it still works inside Eclipse but not outside.
The exported application had its configuration stored in: ./eclipse.ini and the OSGi framework configuration was in ./configuration/config.ini
eclipse.ini contained the parameters needed by the Java VM for zookepeer to work:
-consoleLog
-console
-clean
-vmargs
-Declipse.ignoreApp=true
-Dosgi.noShutdown=true
-Dzoodiscovery.autoStart=true;
-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=localhost:3031;clientPort=3030
Launching the application was ok but that file wasn't read.
manually launching the application as:
java -Dzoodiscovery.autoStart=true; -Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=192.168.23.28:3031;clientPort=3030 -jar org.eclipse.osgi_3.7.0.v20110613.jar -console -configuration c:\temp\zooc\configuration\
from within ./plugins where all the jars were worked.
Guess the .exe made automatically by Eclipse wasn't well configured to read its config file.