Hi I currently just setup JBOSS 6.3 EAP on AWS Ubuntu 14.04 Server. I also have Apache installed and running.
The AWS machine has all ports accessible for testing, and no firewall.
Lets say the public IP is: 2.2.2.2
Going to 2.2.2.2 on a web browser gets me to the Apache "It Works!" page.
In terms of JBoss, I run JBoss through standalone.sh.
I get the following lines in the output:
07:17:02,989 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
07:17:02,990 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
07:17:02,990 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.3.0.GA (AS 7.4.0.Final-redhat-19) started in 3621ms - Started 151 of 189 services (56 services are lazy, passive or on-demand)
I try to visit 2.2.2.2:9990 and am met with a "Webpage not Available" prompt from chrome.
I tried running the command with the -b option: sudo standalone.sh -b 2.2.2.2
Then I get this error:
07:21:40,730 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.network.public: org.jboss.msc.service.StartException in service jboss.network.public: JBAS015810: failed to resolve interface public
at org.jboss.as.server.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:97) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_72]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_72]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_72]
Does anyone know what I am doing wrong?
Try to bind on 0.0.0.0 instead of 2.2.2.2
The public IP addresses of EC2 instances are not visible on the instance itself. So, JBoss will not find the network interface with IP 2.2.2.2.
You can try this yourself by issuing the following command :
ifconfig -a
You must start your Jboss with
/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0
Also, keep in mind that if you want to start the management console, you must
create an admin user
/opt/jboss/wildfly/bin/add-user.sh username password --silent
Start JBoss by telling him to start the management interface
/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
Related
I have used the wildlfy migration tool to migrate my apps from Wildfly 17 to 22. The migration is successful. However, Wildfly application server doesn't start. Here's the content of the server.log file:
2021-04-10 14:17:50,552 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
2021-04-10 14:17:50,593 INFO [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBossWS 5.4.2.Final (Apache CXF 3.3.7)
2021-04-10 14:17:50,645 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at org.wildfly.extension.metrics#22.0.1.Final//org.wildfly.extension.metrics.WildFlyMetricMetadata.<init>(WildFlyMetricMetadata.java:55)
at org.wildfly.extension.metrics#22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:126)
at org.wildfly.extension.metrics#22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:137)
at org.wildfly.extension.metrics#22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:137)
at org.wildfly.extension.metrics#22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics(MetricCollector.java:69)
at org.wildfly.extension.microprofile.metrics-smallrye#22.0.1.Final//org.wildfly.extension.microprofile.metrics.MicroProfileMetricsSubsystemAdd$2.execute(MicroProfileMetricsSubsystemAdd.java:101)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1005)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:744)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:529)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:515)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:477)
at org.jboss.as.server#14.0.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:451)
at org.jboss.as.server#14.0.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:404)
at org.jboss.as.controller#14.0.1.Final//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:416)
at java.base/java.lang.Thread.run(Thread.java:834)
How to fix the error shown in the above log. My applications and configuration work like a charm with WF 17 Final.
The issue seems to be the prefix is missing. You can fix this with CLI by adding a prefix. Using the embedded server the following should work.
embed-server
/subsystem=microprofile-metrics-smallrye:write-attribute(name=prefix, value=${wildfly.metrics.prefix:wildfly})
stop-embeddes-server
Since you're not using the subsystem you could just remove the subsystem. With JBoss CLI you'd do something like the following.
embed-server
/subsystem=microprofile-metrics-smallrye:remove
stop-embedded-server
exit
This assumes you're using the default standalone.xml file name. If you're configure file name is different you can use embed-server --server-config=custom-standalone.xml.
If you want to add the subsystem back you can use the following CLI command:
/subsystem=microprofile-metrics-smallrye:add(exposed-subsystems=["*"], prefix="${wildfly.metrics.prefix:wildfly}", security-enabled=false)
I'm trying to run a dynamic web application from eclipse. I am using wildfly-10.0.0.Final as the server. I installed jboss tools.
As a test I created a dynamic web project called 'test', and added an index.html file in the WebContent directory with simply "hi" in p tags.
I start the server, which is running fine, hit 'Run On Server', and immediately get the error message:
http://localhost:8080/tester/index.html
Page load failed with error: The network connection was lost.
So far I have tried a full clean uninstall of eclipse, downloading wildly, adding jboss tools, and trying again, yet the same issue occurs. I have looked on the Eclipse forums, but they are of no help.
This problem occurred out of the blue.
wildfly admin works at the url:
http://127.0.0.1:9990/management
unable to access localhost:8080/
I tried this with intelliJ and am getting the same issue. Getting the error message from google:
The localhost page isn't working
localhost didn't send any data.
ERR_EMPTY_RESPONSE
03:49:12,347 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4)
03:49:12,671 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0021: Registered web context: /tester
03:49:12,688 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "tester.war" (runtime-name : "tester.war")
03:49:12,747 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
03:49:12,748 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
03:49:12,748 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started in 3163ms - Started 336 of 627 services (382 services are lazy, passive or on-demand)
Connected to server
Please check whether index.html is present in the list welcome file in web.xml
and right click the project name and select Run on server,
if u directly use run on server from index.html,it will try to run that page only not the entire application
i think that's it
Page load failed with error: The network connection was lost.
Your URL is pointing to the wrong port. You are saying that you are running Wildfly on port 9x. So you need to change the URL to point to 9080 instead of 8080. Go to the servers tab in Eclipse and change the HTTP port there to 9080.
I want to check some cli commands if they are valid from java. I cant use the config file I'm currently running on. Additionally I can't use a running Wildfly at all, since I would have to do reloads every now and then.
So I want to use offline-cli (cli with embedded server)
What I'm doing:
Connect to CLi using org.jboss.as.cli.scriptsupport.CLI
CLI cli = CLI.newInstance();
cli.connect("127.0.0.1",9990,"admin","admin".toCharArray());
starting an embedded server via cli.cmd
cli.cmd("embed-server --server-config=standalone.xml --std-out=discard");
But apart from me waiting forever for this command to finish (?) nothing happens.
One thing I noticed was, after deploying my application configuration-management.war to wildfly, state changes to "deployed". But then, a service fails to start. I did not pay much attention to it, because after that I can see an output from my application. Maybe this has something to do with it?
2016-06-29 15:59:55,333 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 83) WFLYUT0021: Registered web context: /configuration
2016-06-29 15:59:55,364 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0016: Replaced deployment "configuration-management.war" with deployment "configuration-management.war"
2016-06-29 15:59:55,364 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."configuration-management.war".POST_MODULE
2016-06-29 16:00:29,530 INFO [stdout] (default task-1) this is mine!
All there is is just that little spinning wheel of death at the upper left corner of my mozilla firefox, indicating that I'm still waiting for a response.
Any hints?
When you start an embedded server it doesn't start any interfaces. This includes the management interface. It doesn't look like the script support allows for embedded CLI. You could file a feature request to support it though.
However you can use the CLI CommandContext API to achieve this.
final CommandContext commandContext = CommandContextFactory.getInstance().newCommandContext();
commandContext.handle("embed-server --jboss-home=/path/to/wildfly-10.0.0.Final");
commandContext.handle(":read-resource");
commandContext.handle("stop-embedded-server");
Do note some command, like module add, will require the jboss.home.dir system property to be set as well.
I started WildFly 8.2. And can open http://localhost:8080/
Btw, on Ubuntu it was different port.
Anyway, I cant open localhost:8080/console or http://127.0.0.1:9990/console. Just nothing happen. I make same steps like on ubuntu. But on Win 7 I cant open admin page.
In console after start i see:
00:19:46,011 INFO [org.wildfly.extension.undertow] (MSC service
thread 1-3) JBAS017519: Undertow HTTP listener default listening on
/127.0.0.1:8080
And...
00:19:46,344 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951:
Admin console listening on http://127.0.0.1:9990
What should i do?
Had the similar issue and it turns out that we tried to open admin console from IE8, which is the only browser was available on the server at the time. Looks like Wildfly 8.2 does not support IE8, which is make sense. Issue solved by using different browser.
Very often (in my practice) it happens because of one or both of the ports 8080 and 9990 are in use by other [java] processes.
Admin console is listening on port 9990, but it doesn't guarantee something else doesn't use it.
You can also use netstat -noa | find "port number" and then tasklist | findstr PID_of_process to check which process uses your ports.
To change port modify standalone.xml.
I have a Jboss 7 server running & accepting secure connections on port 443.
All along i was testing locally which was working fine . However now when i make connection attempts i get a
"javax.naming.NamingException: Failed to create proxy [Root exception is java.lang.IllegalStateException: ..." .
I tried to follow what is written # EJB invocations from a remote client using JNDI
I guess my jndi.properties & jboss-ejb-client.properties file need changes . I think i got it right but still no success .
1 ) jndi.properties
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
2 ) jboss-ejb-client.properties
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=10.160.148.61
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
Any suggestions anyone . Making the port 443 also doesnt help .
My ejb call from the client
InitialContext aJNDI = new InitialContext();
Ppi handle = (Ppi) aJNDI
.lookup("ejb:PPIEAR/PService/PConnect!com.gem.p.PConnection?stateful");
Posting Full stracktrace :
log4j: Finished configuring.
- JBoss EJB Client version 1.0.5.Final
- XNIO Version 3.0.3.GA
- XNIO NIO Implementation Version 3.0.3.GA
- JBoss Remoting version 3.2.3.GA
- Could not register a EJB receiver for connection to remote://10.160.148.61:4447
java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:93)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:121)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:78)
at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:77)
at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:160)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:135)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:113)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.lookup(EjbNamingContext.java:96)
at javax.naming.InitialContext.lookup(Unknown Source)
..
Quoting this page:
WARN: Could not register a EJB receiver for connection to
remote://10.160.148.61:4447 java.lang.RuntimeException: Operation failed
with status WAITING
This is commonly caused by a wrong combination of IP or port in the file jboss-ejb-client.properties.
You might be unable to reach that host address
Maybe you are using a port-offset on that server, so instead of port 4447 you should use 4447 + offset
You could start by testing if you can connect to your target using telnet:
telnet 10.160.148.61 4447