Here is my WebSocket endpoint
import javax.websocket.CloseReason;
import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.twitter.hbc.core.Client;
#ServerEndpoint("/tweets")
public class TweetStreamServer {
private static final Logger LOGGER = LoggerFactory.getLogger(TweetStreamServer.class);
#OnMessage
public void tweets(final String message, final Session client) throws IOException, InterruptedException {
LOGGER.debug("registering search term {}", message);
final TwitterHoseBird twitterHoseBird = new TwitterHoseBird();
final Client twitterClient = twitterHoseBird.getInstance(message);
while(!twitterClient.isDone()) {
client.getAsyncRemote().sendText(twitterHoseBird.getMsgQueue().take());
}
}
#OnClose
public void onClose(CloseReason reason) {
System.out.println("Closing connection");
LOGGER.warn("closing connection {}", reason);
}
}
When I deploy this, I try to hit the endpoint via JavaScript code as
var connection = new WebSocket('ws://127.0.0.1:8080/tweetstream-1.0-SNAPSHOT/tweets');
connection.onmessage = function (e) {
console.log('Server: ' + e.data);
};
connection.send('fifa');
This starts to send tweets from the server. Now when I close the connection from client, I do
connection.close();
Problem?
I want to close connection to twitter once websocket client connection closes. I expect the following code to execute
#OnClose
public void onClose(CloseReason reason) {
System.out.println("Closing connection");
LOGGER.warn("closing connection {}", reason);
}
But on server log, I do not see any such statement
/Users/harith/code/installers/wildfly-8.1.0.Final/bin/standalone.sh
=========================================================================
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java -classpath "/Applications/IntelliJ IDEA 13.app/lib/idea_rt.jar:/Applications/IntelliJ IDEA 13.app/lib/util.jar" -Dfile.encoding=UTF-8 com.intellij.rt.execution.CommandLineWrapper /private/var/folders/qs/y62p93xs0bdb9ptk6l2r8vw0002kvk/T/classpath571663656928489966.tmp com.intellij.javaee.oss.process.JavaeeProcess 53801 com.intellij.javaee.oss.jboss.agent.JBoss71Agent
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
JBoss Bootstrap Environment
[2014-07-12 02:16:06,305] Artifact tweetstream:war: Server is not connected. Deploy is not available.
JBOSS_HOME: /Users/harith/code/installers/wildfly-8.1.0.Final
Detected server admin port: 9990
Detected server http port: 8080
JAVA: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
[0m14:16:06,048 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
[0m[0m14:16:06,289 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
[0m[0m14:16:06,349 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
[0m[0m14:16:07,165 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
[0m[0m14:16:07,180 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.2.2.Final
[0m[0m14:16:07,186 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.2.2.Final
[0m[0m14:16:07,207 INFO [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem
[0m[33m14:16:07,208 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
[0m[0m14:16:07,211 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.
[0m[0m14:16:07,213 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
[0m[0m14:16:07,219 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem
[0m[0m14:16:07,221 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
[0m[0m14:16:07,222 INFO [org.jboss.as.security] (MSC service thread 1-13) JBAS013170: Current PicketBox version=4.0.21.Beta1
[0m[0m14:16:07,222 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]
[0m[0m14:16:07,251 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.0.15.Final starting
[0m[0m14:16:07,252 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017502: Undertow 1.0.15.Final starting
[0m[0m14:16:07,266 INFO [org.jboss.as.connector.logging] (MSC service thread 1-11) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
[0m[0m14:16:07,291 INFO [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 4.0.3.Final
[0m[0m14:16:07,291 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[0m[0m14:16:07,299 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010417: Started Driver service with driver-name = h2
[0m[0m14:16:07,346 INFO [org.jboss.as.naming] (MSC service thread 1-15) JBAS011802: Starting Naming Service
[0m[0m14:16:07,346 INFO [org.jboss.as.mail.extension] (MSC service thread 1-13) JBAS015400: Bound mail session [java:jboss/mail/Default]
[0m[0m14:16:07,390 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path /Users/harith/code/installers/wildfly-8.1.0.Final/welcome-content
[0m[0m14:16:07,425 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017525: Started server default-server.
[0m[0m14:16:07,498 INFO [org.wildfly.extension.undertow] (MSC service thread 1-13) JBAS017531: Host default-host starting
[0m[0m14:16:07,561 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017519: Undertow HTTP listener default listening on /127.0.0.1:8080
[0m[0m14:16:07,724 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-13) JBAS015012: Started FileSystemDeploymentService for directory /Users/harith/code/installers/wildfly-8.1.0.Final/standalone/deployments
[0m[0m14:16:07,728 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "4f0c2559-5f61-4cf1-b441-c6288b419b80.war" (runtime-name: "4f0c2559-5f61-4cf1-b441-c6288b419b80.war")
[0m[0m14:16:07,736 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
[0m[0m14:16:07,918 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
[0m[0m14:16:08,062 INFO [io.undertow.websockets.jsr] (MSC service thread 1-11) UT026003: Adding annotated server endpoint class com.self.tweetstream.TweetStreamServer for path /tweets
[0m[0m14:16:08,075 INFO [io.undertow.websockets.jsr] (MSC service thread 1-11) UT026004: Adding annotated client endpoint class com.self.tweetstream.TweetStreamClient
[0m[0m14:16:08,167 INFO [org.wildfly.extension.undertow] (MSC service thread 1-11) JBAS017534: Registered web context: /4f0c2559-5f61-4cf1-b441-c6288b419b80
[0m[0m14:16:08,203 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "4f0c2559-5f61-4cf1-b441-c6288b419b80.war" (runtime-name : "4f0c2559-5f61-4cf1-b441-c6288b419b80.war")
[0m[0m14:16:08,215 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
[0m[0m14:16:08,215 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
[0m[0m14:16:08,216 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 2554ms - Started 250 of 304 services (91 services are lazy, passive or on-demand)
[0mConnected to server
[2014-07-12 02:16:08,683] Artifact tweetstream:war: Artifact is being deployed, please wait...
[0m14:16:08,794 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "tweetstream-1.0-SNAPSHOT.war" (runtime-name: "tweetstream-1.0-SNAPSHOT.war")
[0m[0m14:16:09,408 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016002: Processing weld deployment tweetstream-1.0-SNAPSHOT.war
[0m[0m14:16:09,450 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-5) HV000001: Hibernate Validator 5.1.0.Final
[0m[0m14:16:09,548 INFO [org.jboss.weld.deployer] (MSC service thread 1-14) JBAS016005: Starting Services for CDI deployment: tweetstream-1.0-SNAPSHOT.war
[0m[0m14:16:09,573 INFO [org.jboss.weld.Version] (MSC service thread 1-14) WELD-000900: 2.1.2 (Final)
[0m[0m14:16:09,580 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016008: Starting weld service for deployment tweetstream-1.0-SNAPSHOT.war
[0m[0m14:16:10,361 INFO [io.undertow.websockets.jsr] (MSC service thread 1-8) UT026004: Adding annotated client endpoint class com.self.tweetstream.TweetStreamClient
[0m[0m14:16:10,364 INFO [io.undertow.websockets.jsr] (MSC service thread 1-8) UT026003: Adding annotated server endpoint class com.self.tweetstream.TweetStreamServer for path /tweets
[0m[0m14:16:10,383 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Initializing Mojarra 2.2.6-jbossorg-4 20140501-1134 for context '/tweetstream-1.0-SNAPSHOT'
[0m[0m14:16:11,293 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017534: Registered web context: /tweetstream-1.0-SNAPSHOT
[0m[0m14:16:11,307 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "tweetstream-1.0-SNAPSHOT.war" (runtime-name : "tweetstream-1.0-SNAPSHOT.war")
[0m[2014-07-12 02:16:11,327] Artifact tweetstream:war: Artifact is deployed successfully
[2014-07-12 02:16:11,327] Artifact tweetstream:war: Deploy took 2,644 milliseconds
[0m14:16:21,124 INFO [com.twitter.hbc.httpclient.BasicClient] (default task-2) New connection executed: tweetStream-client, endpoint: /1.1/statuses/filter.json?delimited=length&stall_warnings=true
[0m[0m14:16:21,207 INFO [com.twitter.hbc.httpclient.ClientBase] (hosebird-client-io-thread-0) tweetStream-client Establishing a connection
[0m[0m14:16:23,789 INFO [com.twitter.hbc.httpclient.ClientBase] (hosebird-client-io-thread-0) tweetStream-client Processing connection data
[0m
What am I missing here?
UPDATE
I have test as following
#Test
public void test() throws URISyntaxException, IOException, DeploymentException, InterruptedException {
System.out.println("URI: " + getEndpointUrl());
TweetStreamClient.latch = new CountDownLatch(1);
Session session = connectToServer(TweetStreamClient.class, "tweets");
assertNotNull(session);
// (todo: harit) assert correct things
// assertTrue(TweetStreamClient.latch.await(10, TimeUnit.SECONDS));
// assertEquals("Hello", TweetStreamClient.response);
}
When I run this test, I see following in logs
8295 [main] INFO io.undertow.websockets.jsr - UT026004: Adding annotated client endpoint class com.self.tweetstream.TweetStreamClient
14:59:26,981 INFO [org.wildfly.extension.undertow] (MSC service thread 1-13) JBAS017535: Unregistered web context: /b5b7b561-8b49-4c69-b55f-7859b86da36d
14:59:26,983 INFO [stdout] (default task-2) session id:AMAjTU1TYTCjXBgLOKnMXS6q, search term: Hello World!
14:59:26,985 INFO [stdout] (default task-2) Closing session: io.undertow.websockets.jsr.UndertowSession#cd7ecfa
14:59:26,986 WARN [com.self.tweetstream.TweetStreamServer] (default task-2) closing session: AMAjTU1TYTCjXBgLOKnMXS6q, reason: CloseReason[1001]
But when I call connection.close() from JavaScript, I do not see such thing
I was experiencing the same problem and initially thought it was a Wildfly issue, but then noticed that Firefox was triggering #OnClose. When I added an #OnError, Chromium was triggering that.
I found an another StackOverflow question referring to the same behavior.
It also appears that Chromium may have just fixed this issue as of a month ago.
Related
I found in other threads others having a problem similar to mine but none of the solutions worked for me.
I'm migrating from jBoss 5 to Wildfly 18. I followed the official guide to migrate.
I set up the datasources in the standalone.xml file, and they are correctly connected (the admin console test - localhost:9990 - confirms that the connections to the DB are up and running).
Anyway, I got some errors while deploying my application.
It seems that there is something wrong with the services that are supposed to use the datasources and the connections.
Can anyone please take a look at the error log here below? Is anything familiar for anyone?
I cannot figure it out ...
Thanks in advance
17:16:47,804 INFO [org.jboss.modules] (main) JBoss Modules version 1.9.1.Final
17:16:48,855 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final
17:16:48,863 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
17:16:48,940 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) starting
17:16:49,818 INFO [org.wildfly.security] (ServerService Thread Pool -- 28) ELY00001: WildFly Elytron version 1.10.4.Final
17:16:51,270 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
17:16:51,284 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 31) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
17:16:51,544 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found myApplication.war in deployment directory. To trigger deployment create a file called myApplication.war.dodeploy
17:16:51,565 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
17:16:51,579 INFO [org.xnio] (MSC service thread 1-8) XNIO version 3.7.3.Final
17:16:51,585 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.7.3.Final
17:16:51,612 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 72) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
17:16:51,618 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 51) WFLYCLINF0001: Activating Infinispan subsystem.
17:16:51,626 INFO [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 63) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
17:16:51,626 INFO [org.wildfly.extension.microprofile.config.smallrye._private] (ServerService Thread Pool -- 60) WFLYCONF0001: Activating WildFly MicroProfile Config Subsystem
17:16:51,632 INFO [org.jboss.as.security] (ServerService Thread Pool -- 70) WFLYSEC0002: Activating Security Subsystem
17:16:51,633 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 64) WFLYNAM0001: Activating Naming Subsystem
17:16:51,637 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 74) WFLYWS0002: Activating WebServices Extension
17:16:51,643 INFO [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=5.0.3.Final
17:16:51,646 INFO [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 61) WFLYHEALTH0001: Activating Eclipse MicroProfile Health Subsystem
17:16:51,651 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 58) WFLYJSF0007: Activated the following JSF Implementations: [main]
17:16:51,652 INFO [org.wildfly.extension.microprofile.metrics.smallrye] (ServerService Thread Pool -- 62) WFLYMETRICS0001: Activating Eclipse MicroProfile Metrics Subsystem
17:16:51,653 INFO [org.jboss.as.connector] (MSC service thread 1-1) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.17.Final)
17:16:51,687 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0003: Undertow 2.0.27.Final starting
17:16:51,738 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
17:16:51,759 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
17:16:51,812 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 43) WFLYJCA0004: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 6.4)
17:16:51,815 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 73) WFLYUT0014: Creating file handler for path 'SERVER_PATH\wildfly-18.0.1.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
17:16:51,819 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = sqlserver
17:16:51,985 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 52) WFLYIO001: Worker 'default' has auto-configured to 24 core threads with 192 task threads based on your 12 available processors
17:16:51,989 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 48 (per class), which is derived from the number of CPUs on this host.
17:16:51,989 INFO [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 192 (per class), which is derived from thread worker pool sizing.
17:16:52,007 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 53) WFLYRS0016: RESTEasy version 3.9.1.Final
17:16:52,010 INFO [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 5.0.15.Final
17:16:52,014 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012: Started server default-server.
17:16:52,016 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0018: Host default-host starting
17:16:52,045 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
17:16:52,263 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0493: EJB subsystem suspension complete
17:16:52,290 INFO [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-2) IJ020018: Enabling <validate-on-match> for java:jboss/datasources/datasource1
17:16:52,290 INFO [org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService$AS7DataSourceDeployer] (MSC service thread 1-8) IJ020018: Enabling <validate-on-match> for java:jboss/datasources/datasource2
...
other datasources enabled
...
17:16:52,354 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/datasource1]
17:16:52,354 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/datasource2]
...
other datasources bind
...
17:16:53,791 INFO [org.jboss.as.patching] (MSC service thread 1-1) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
17:16:53,798 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-3) WFLYDM0111: Keystore SERVER_PATH\wildfly-18.0.1.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
17:16:53,801 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) WFLYDS0013: Started FileSystemDeploymentService for directory SERVER_PATH\wildfly-18.0.1.Final\standalone\deployments
17:16:53,806 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "myApplication.war" (runtime-name: "myApplication.war")
17:16:53,815 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
17:16:54,236 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.3.0.Final (Apache CXF 3.3.3)
17:16:55,095 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry toolbox.jar in SERVER_PATH/wildfly-18.0.1.Final/standalone/deployments/myApplication.war/WEB-INF/lib/iText-2.0.8.jar does not point to a valid jar for a Class-Path reference.
17:16:55,095 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry bcmail-jdk14-138.jar in SERVER_PATH/wildfly-18.0.1.Final/standalone/deployments/myApplication.war/WEB-INF/lib/iText-2.0.8.jar does not point to a valid jar for a Class-Path reference.
17:16:55,095 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry bcprov-jdk14-138.jar in SERVER_PATH/wildfly-18.0.1.Final/standalone/deployments/myApplication.war/WEB-INF/lib/iText-2.0.8.jar does not point to a valid jar for a Class-Path reference.
17:16:55,456 INFO [org.jboss.as.jpa] (MSC service thread 1-6) WFLYJPA0002: Read persistence.xml for datasource1
17:16:55,456 INFO [org.jboss.as.jpa] (MSC service thread 1-6) WFLYJPA0002: Read persistence.xml for datasource2
...
other persistence.xml reading
...
17:16:56,949 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.16.Final
17:16:57,047 WARN [org.jboss.as.ee] (MSC service thread 1-8) WFLYEE0007: Not installing optional component org.springframework.web.context.ContextLoaderListener due to an exception (enable DEBUG log level to see the cause)
17:16:57,239 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
17:16:57,508 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0004: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 6.4)
17:16:57,538 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = myApplication.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_6_4
17:16:57,795 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "myApplication.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.naming.context.java.datasource1",
"jboss.naming.context.java.datasource2",
...
other required services not installed
...
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.persistenceunit.\"myApplication.war#datasource1\" is missing [jboss.naming.context.java.datasource1]",
"jboss.persistenceunit.\"myApplication.war#datasource2\" is missing [jboss.naming.context.java.datasource2]"
...
other missing dependencies
...
]
}
17:16:57,802 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "myApplication.war" (runtime-name : "myApplication.war")
17:16:57,806 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.naming.context.java.dbDB1 (missing) dependents: [service jboss.persistenceunit."myApplication.war#datasource1", service jboss.persistenceunit."myApplication.war#datasource1".__FIRST_PHASE__]
service jboss.naming.context.java.dbDB2 (missing) dependents: [service jboss.persistenceunit."myApplication.war#datasource2".__FIRST_PHASE__, service jboss.persistenceunit."myApplication.war#datasource2"]
...
other missing dependencies
...
WFLYCTL0448: 350 additional services are down due to their dependencies being missing or failed
17:16:57,835 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
17:16:57,838 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
17:16:57,839 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
17:16:57,839 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) started (with errors) in 12801ms - Started 1754 of 2359 services (389 services failed or missing dependencies, 470 services are lazy, passive or on-demand)
I'm trying to implement a simple method in my JAX-WS project that, for the moment, prints to the console every second. I found this simple guide and I have tried to implement it to my current working project.
My TimerService.java looks like this:
package brass.ducks.controller;
import javax.ejb.EJB;
import javax.ejb.Schedule;
import javax.ejb.Singleton;
#Singleton
public class TimerService {
#EJB
HelloService helloService;
#Schedule(second="*/1", minute="*",hour="*", persistent=false)
public void doWork(){
System.out.println("timer: " + helloService.sayHello());
}
}
And my HelloService.java looks like this:
package brass.ducks.controller;
import javax.ejb.Stateless;
#Stateless
public class HelloService {
public String sayHello(){
return "Hello from control: " + System.currentTimeMillis();
}
}
I noted that the tutorial mentioned something about how to deploy? Would this be covered by just deploying the project on my local WildFly server or does it require something else?
Here is my stacktrace too:
14:53:03,672 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
14:53:04,119 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
14:53:04,239 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
14:53:06,683 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment BrassDucks.war
14:53:06,708 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found BrassDucks.war in deployment directory. To trigger deployment create a file called BrassDucks.war.dodeploy
14:53:06,829 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
14:53:06,860 INFO [org.xnio] (MSC service thread 1-6) XNIO version 3.3.4.Final
14:53:06,873 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.3.4.Final
14:53:06,981 INFO [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.18.Final
14:53:07,003 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 41) WFLYCLINF0001: Activating Infinispan subsystem.
14:53:07,044 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 48) WFLYJSF0007: Activated the following JSF Implementations: [main]
14:53:07,063 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 60) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
14:53:07,072 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 40) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
14:53:07,303 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 52) WFLYNAM0001: Activating Naming Subsystem
14:53:07,359 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 61) WFLYUT0003: Undertow 1.3.15.Final starting
14:53:07,373 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0003: Undertow 1.3.15.Final starting
14:53:07,378 INFO [org.jboss.as.security] (ServerService Thread Pool -- 59) WFLYSEC0002: Activating Security Subsystem
14:53:07,446 INFO [org.jboss.as.connector] (MSC service thread 1-7) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.2.Final)
14:53:07,470 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 62) WFLYWS0002: Activating WebServices Extension
14:53:07,475 INFO [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=4.9.4.Final
14:53:07,510 INFO [org.jboss.as.naming] (MSC service thread 1-4) WFLYNAM0003: Starting Naming Service
14:53:07,530 INFO [org.wildfly.iiop.openjdk] (ServerService Thread Pool -- 42) WFLYIIOP0001: Activating IIOP Subsystem
14:53:07,552 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 36) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
14:53:07,559 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
14:53:07,782 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = h2
14:53:08,133 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 61) WFLYUT0014: Creating file handler for path 'C:\wildfly-10.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
14:53:08,154 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0012: Started server default-server.
14:53:08,183 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
14:53:08,221 INFO [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
14:53:08,238 INFO [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
14:53:08,882 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
14:53:09,092 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0001: AIO wasn't located on this platform, it will fall back to using pure Java NIO.
14:53:09,237 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "mysql-connector-java-5.1.39-bin.jar" (runtime-name: "mysql-connector-java-5.1.39-bin.jar")
14:53:09,253 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "BrassDucks.war" (runtime-name: "BrassDucks.war")
14:53:09,280 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) WFLYDS0013: Started FileSystemDeploymentService for directory C:\wildfly-10.0.0.Final\standalone\deployments
14:53:09,374 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=C:\wildfly-10.0.0.Final\standalone\data\activemq\journal,bindingsDirectory=C:\wildfly-10.0.0.Final\standalone\data\activemq\bindings,largeMessagesDirectory=C:\wildfly-10.0.0.Final\standalone\data\activemq\largemessages,pagingDirectory=C:\wildfly-10.0.0.Final\standalone\data\activemq\paging)
14:53:09,587 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221013: Using NIO Journal
14:53:09,823 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
14:53:10,757 INFO [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4)
14:53:10,824 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
14:53:10,835 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
14:53:10,857 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
14:53:10,865 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
14:53:10,868 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
14:53:11,045 INFO [org.wildfly.iiop.openjdk] (MSC service thread 1-4) WFLYIIOP0009: CORBA ORB Service started
14:53:11,264 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
14:53:11,266 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
14:53:11,358 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.39-bin.jar_com.mysql.jdbc.Driver_5_1
14:53:11,544 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.39-bin.jar_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1
14:53:11,559 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0001: Bound data source [java:/MySqlNorthwindDS]
14:53:11,605 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0001: Bound data source [java:/BrassDucksDS]
14:53:11,634 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:/MySqlEquitiesDS]
14:53:12,241 INFO [org.jboss.as.protocol] (management I/O-2) WFLYPRT0057: cancelled task by interrupting thread Thread[management-handler-thread - 1,5,management-handler-thread]
14:53:12,479 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
14:53:12,483 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
14:53:12,483 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
14:53:12,484 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
14:53:12,614 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221007: Server is now live
14:53:12,615 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0.wildfly-011 [nodeID=ad393a41-759e-11e6-8402-b9b09451d246]
14:53:12,660 INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 64) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
14:53:12,696 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 67) AMQ221003: trying to deploy queue jms.queue.Tasks
14:53:12,726 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 68) AMQ221003: trying to deploy queue jms.queue.ExpiryQueue
14:53:12,731 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 66) AMQ221003: trying to deploy queue jms.queue.DLQ
14:53:12,737 INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 65) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/ConnectionFactory
14:53:12,796 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-7) WFLYJCA0007: Registered connection factory java:/JmsXA
14:53:12,895 INFO [org.apache.activemq.artemis.ra] (MSC service thread 1-7) Resource adaptor started
14:53:12,895 INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-7) IJ020002: Deployed: file://RaActivatoractivemq-ra
14:53:12,897 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-7) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA]
14:53:12,898 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-7) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
14:53:15,665 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0003: Processing weld deployment BrassDucks.war
14:53:15,797 INFO [org.jboss.as.protocol] (management I/O-2) WFLYPRT0057: cancelled task by interrupting thread Thread[management-handler-thread - 1,5,management-handler-thread]
14:53:15,811 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-2) HV000001: Hibernate Validator 5.2.3.Final
14:53:15,930 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named 'BrassDucksDAO' in deployment unit 'deployment "BrassDucks.war"' are as follows:
java:global/BrassDucks/BrassDucksDAO!brass.ducks.model.BrassDucksDAO
java:app/BrassDucks/BrassDucksDAO!brass.ducks.model.BrassDucksDAO
java:module/BrassDucksDAO!brass.ducks.model.BrassDucksDAO
java:global/BrassDucks/BrassDucksDAO
java:app/BrassDucks/BrassDucksDAO
java:module/BrassDucksDAO
14:53:15,931 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named 'Trader' in deployment unit 'deployment "BrassDucks.war"' are as follows:
java:global/BrassDucks/Trader!brass.ducks.model.Trader
java:app/BrassDucks/Trader!brass.ducks.model.Trader
java:module/Trader!brass.ducks.model.Trader
java:global/BrassDucks/Trader
java:app/BrassDucks/Trader
java:module/Trader
14:53:15,932 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named 'HelloService' in deployment unit 'deployment "BrassDucks.war"' are as follows:
java:global/BrassDucks/HelloService!brass.ducks.controller.HelloService
java:app/BrassDucks/HelloService!brass.ducks.controller.HelloService
java:module/HelloService!brass.ducks.controller.HelloService
java:global/BrassDucks/HelloService
java:app/BrassDucks/HelloService
java:module/HelloService
14:53:15,932 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named 'TimerService' in deployment unit 'deployment "BrassDucks.war"' are as follows:
java:global/BrassDucks/TimerService!brass.ducks.controller.TimerService
java:app/BrassDucks/TimerService!brass.ducks.controller.TimerService
java:module/TimerService!brass.ducks.controller.TimerService
java:global/BrassDucks/TimerService
java:app/BrassDucks/TimerService
java:module/TimerService
14:53:16,333 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."BrassDucks.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."BrassDucks.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "BrassDucks.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0052: Failed to install component TimerService
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:109)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.module.BrassDucks.BrassDucks.TimerService is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:198)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:101)
... 6 more
14:53:16,377 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "BrassDucks.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"BrassDucks.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"BrassDucks.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"BrassDucks.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0052: Failed to install component TimerService
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.module.BrassDucks.BrassDucks.TimerService is already registered"},
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.deployment.unit.\"BrassDucks.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"BrassDucks.war\".beanmanager]",
"jboss.deployment.unit.\"BrassDucks.war\".batch.environment is missing [jboss.deployment.unit.\"BrassDucks.war\".beanmanager]"
]
}
14:53:16,427 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "mysql-connector-java-5.1.39-bin.jar" (runtime-name : "mysql-connector-java-5.1.39-bin.jar")
14:53:16,477 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "BrassDucks.war" (runtime-name : "BrassDucks.war")
14:53:16,493 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit."BrassDucks.war".beanmanager (missing) dependents: [service jboss.deployment.unit."BrassDucks.war".batch.environment, service jboss.deployment.unit."BrassDucks.war".weld.weldClassIntrospector]
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."BrassDucks.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."BrassDucks.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "BrassDucks.war"
14:53:16,782 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
14:53:16,782 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
14:53:16,783 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 13851ms - Started 395 of 689 services (3 services failed or missing dependencies, 401 services are lazy, passive or on-demand)
14:53:16,887 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment BrassDucks.war (runtime-name: BrassDucks.war) in 60ms
14:53:17,087 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "BrassDucks.war" (runtime-name: "BrassDucks.war")
14:53:17,088 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."BrassDucks.war".INSTALL
14:53:21,595 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found BrassDucks.war in deployment directory. To trigger deployment create a file called BrassDucks.war.dodeploy
Try using the following steps:
These are the steps I followed to resolve the issue.
1.Stop the Server.
2.Go to deployment path.
3.Manually deleted the existing project in deployment folder.
4.Restarted the server
5.Deploy the application again.
because From the error, it looks like ".BrassDucks.BrassDucks.TimerService" already deployed on the server
First thing, I already saw posts on it on Stackoverflow
(like this : Wildfly 9.x startet with errors: Address already in use) but no solution is working (changing the port , check if another server is running , etc) and got Jboss in a zip from http://tools.jboss.org/downloads/jbosstools/neon/4.4.0.Final.html#zips (because my eclipse marketplace didn't find it)
Bad luck this time when I start my WildFly Server on Eclipse :
23:47:12,788 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
23:47:15,449 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
23:47:15,530 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
23:47:25,711 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
23:47:26,198 INFO [org.xnio] (MSC service thread 1-6) XNIO version 3.3.4.Final
23:47:26,376 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.3.4.Final
23:47:26,637 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
23:47:26,654 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
23:47:26,658 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
23:47:26,945 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
23:47:26,978 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
23:47:27,100 INFO [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=4.9.4.Final
23:47:27,134 INFO [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.2.Final)
23:47:27,433 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
23:47:27,692 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
23:47:27,704 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.3.15.Final starting
23:47:27,705 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.3.15.Final starting
23:47:29,761 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:47:29,764 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
23:47:30,400 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path 'C:\Progs\wildfly-10.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
23:47:31,056 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
23:47:31,057 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
23:47:32,848 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
23:47:32,848 INFO [org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
23:47:32,978 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0012: Started server default-server.
23:47:32,980 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
23:47:33,057 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 4.0.18.Final
23:47:33,824 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
23:47:34,863 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
23:47:35,357 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Progs\wildfly-10.0.0.Final\standalone\deployments
23:47:35,421 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "postgresql-9.3-1103.jdbc4.jar" (runtime-name: "postgresql-9.3-1103.jdbc4.jar")
23:47:37,241 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:271)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:157)
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:237)
... 5 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:192)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:144)
... 6 more
23:47:37,300 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:37,300 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-7) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:37,301 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-8) ISPN000128: Infinispan version: Infinispan 'Mahou' 8.1.0.Final
23:47:42,235 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.1.3.Final (Apache CXF 3.1.4)
23:47:44,552 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.3)
23:47:44,707 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = postgresql-9.3-1103.jdbc4.jar
23:47:45,394 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.serverManagement.controller.management.http" => "org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
Caused by: java.net.BindException: Address already in use: bind"}}
23:47:45,588 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "postgresql-9.3-1103.jdbc4.jar" (runtime-name : "postgresql-9.3-1103.jdbc4.jar")
23:47:45,589 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
23:47:45,967 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0063: Http management interface is not enabled
23:47:45,967 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
23:47:45,968 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 34185ms - Started 307 of 603 services (2 services failed or missing dependencies, 379 services are lazy, passive or on-demand)
What I understood with these lines is that this address is already in use.
I start this cmd command before and after the start of the server :
netstat -aon | findstr :8080
Before :
After :
I can access on the default page (localhost:8080) :
When I click on "Administration Console" , I got this :
Any solution ?
Finally , I found the answer here (Thanks Ualter Jr.) :
Check if you have service called NVIDIA Network Service running at your computer. Coincidentally this NVIDIA Service is running at the port 9990, used for the Admin console of Wildfly. In my case, it was only stop this Service and restart the Wildfly server.
I am working on project which needs to be deployable on both weblogic and jboss. I have compiled wildfly from sources. Now, I am trying to get datasource using naming. Application is working fine on JBOSS EAP 6.1, I am able to get datasource reference as javax.sql.DataSource but now in widlfly, using following code
dataSource = (javax.sql.DataSource) context.lookup("datasource");
it throws exception
java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.WrapperDataSource cannot be cast to javax.sql.DataSource
if I try using following code,
Object obj = context.lookup("datasource");
dataSource = (javax.sql.DataSource) obj;
it doesn't throw the above exception rather on using the datasource, it throws exception
Caused by: java.lang.IncompatibleClassChangeError: Class org.jboss.jca.adapters.jdbc.WrapperDataSource does not implement the requested interface javax.sql.DataSource
However, looking at code of class, we can see that it implements the javax.sql.DataSource
Can anyone please tell me how can I use the casted WrapperDataSource or get datasource returned as javax.sql.DataSource.
Server Info:
Calling "C:\wildfly-8.0.0.Beta2-SNAPSHOT\bin\standalone.conf.bat"
Setting JAVA property to "C:\Progra~2\Java\jdk1.7.0_40\bin\java"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: "C:\wildfly-8.0.0.Beta2-SNAPSHOT"
JAVA: "C:\Progra~2\Java\jdk1.7.0_40\bin\java"
===============================================================================
Listening for transport dt_socket at address: 8787
16:04:19,731 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final
16:04:19,903 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.0.Beta2
16:04:19,997 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.0.0.Beta2-SNAPSHOT "WildFly" starting
16:04:21,138 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
16:04:21,138 INFO [org.xnio] (MSC service thread 1-1) XNIO version 3.1.0.CR7
16:04:21,153 INFO [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.1.0.CR7
16:04:21,309 INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 4.0.0.Beta1
16:04:21,341 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 50) JBAS015537: Activating WebServices Extension
16:04:21,356 INFO [org.jboss.as.security] (ServerService Thread Pool -- 46) JBAS013171: Activating Security Subsystem
16:04:21,372 INFO [org.jboss.as.security] (MSC service thread 1-8) JBAS013170: Current PicketBox version=4.0.19.Final
16:04:21,388 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 41) JBAS011800: Activating Naming Subsystem
16:04:21,388 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 33) JBAS010280: Activating Infinispan subsystem.
16:04:21,388 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017502: Undertow 1.0.0.Beta18 starting
16:04:21,403 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 49) JBAS017502: Undertow 1.0.0.Beta18 starting
16:04:21,403 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 39) JBAS012605: Activated the following JSF Implementations: [main]
16:04:21,419 INFO [org.jboss.as.connector.logging] (MSC service thread 1-7) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.0.Final)
16:04:21,450 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
16:04:21,466 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:04:21,466 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
16:04:21,481 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = h2
16:04:21,559 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 49) JBAS017527: Creating file handler for path C:\wildfly-8.0.0.Beta2-SNAPSHOT/welcome-content
16:04:21,700 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017525: Started server default-server.
16:04:21,700 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) JBAS017531: Host default-host starting
16:04:21,763 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) JBAS017519: Undertow HTTP listener default listening on localhost/127.0.0.1:8080
16:04:21,841 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deploying JDBC-compliant driver class com.ibm.db2.jcc.DB2Driver (version 3.57)
16:04:21,841 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = DB2Driver
16:04:22,091 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory C:\wildfly-8.0.0.Beta2-SNAPSHOT\standalone\deployments
16:04:22,091 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 127.0.0.1:9999
16:04:22,122 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.1.Final
16:04:22,122 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:04:22,122 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/rapiddb]
16:04:22,247 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
16:04:22,247 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
16:04:22,247 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Beta2-SNAPSHOT "WildFly" started in 2828ms - Started 186 of 223 services (62 services are lazy, passive or on-demand)
I assume it will have something to do with the way you configure your JDBC driver in the datasource on the server or if you supply another driver in your package that makes a collision with the actual driver you use.
A similar error can be found at https://community.jboss.org/message/250795
If that doesn't work out also post the version of the server in which you encounter the issue. Just to ensure you are not suffering from fixed data source patches on the server.
I posted the issue on WildFly Forum (WildFly Thread) and found that there is another jar containing javax.sql.DataSource interface.
I used a utility named jarscan.jar to search the interface in my modules and found that a jar was containing another javax.sql.DataSource class. Removing the jar form module resolved the issue.
I am planning to use Infinispan as the remote cache cluster that will sit between my application and database. Now I am planning to make a cluster of few nodes, let's say 2 nodes.
I started the Infinispan server using the bin/clustered.sh script on both of my Ubuntu machines.
rkost#rj-vm9-14105:~/infinispan/infinispan-server-6.0.0.Alpha1/bin$ uname -a
Linux rj-vm9-14105 2.6.35-22-server #33-Ubuntu SMP Sun Sep 19
20:48:58 UTC 2010 x86_64 GNU/Linux
Below is the result I got on both of my machines console after starting the infinispan server using the bin/clustered.sh. Now how do I make sure that they are forming a cluster of two nodes? And on which mode they have formed a cluster, how do I figure that one out?
Machine 1 console-
root#rj-raptor-vm1-14938:/home/rkost/infinispan/infinispan-server-6.0.0.Alpha1/bin# sh clustered.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/rkost/infinispan/infinispan-server-6.0.0.Alpha1
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel=''
=========================================================================
23:16:14,426 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
23:16:14,874 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
23:16:14,934 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) starting
23:16:15,784 INFO [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.7.GA
23:16:15,788 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
23:16:15,792 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.7.GA
23:16:15,799 INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.2.14.GA
23:16:15,865 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem.
23:16:15,865 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem
23:16:15,868 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem.
23:16:15,876 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.15.Final
23:16:15,879 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem
23:16:15,921 INFO [org.jboss.as.connector.logging] (MSC service thread 1-6) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
23:16:15,926 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2]
23:16:15,957 INFO [org.jboss.as.naming] (MSC service thread 1-9) JBAS011802: Starting Naming Service
23:16:16,073 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
23:16:16,080 INFO [org.apache.coyote.ajp] (MSC service thread 1-16) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/127.0.0.1:8009
23:16:16,087 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
23:16:16,106 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final
23:16:16,135 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364
23:16:16,253 INFO [org.jboss.as.remoting] (MSC service thread 1-16) JBAS017100: Listening on 127.0.0.1:4447
23:16:16,253 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 127.0.0.1:9999
23:16:16,407 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan '<TBD>' 6.0.0.Alpha1
23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-6) JDGS010000: WebSocketServer starting
23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-11) JDGS010000: HotRodServer starting
23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-6) JDGS010001: WebSocketServer listening on 127.0.0.1:8181
23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-11) JDGS010001: HotRodServer listening on 127.0.0.1:11222
23:16:16,512 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000078: Starting JGroups Channel
23:16:16,523 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
23:16:16,524 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
23:16:16,524 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the send buffer of socket MulticastSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
23:16:16,525 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
23:16:16,528 INFO [stdout] (MSC service thread 1-15)
23:16:16,528 INFO [stdout] (MSC service thread 1-15) -------------------------------------------------------------------
23:16:16,528 INFO [stdout] (MSC service thread 1-15) GMS: address=rj-raptor-vm1-14938/clustered, cluster=clustered, physical address=127.0.0.1:55200
23:16:16,528 INFO [stdout] (MSC service thread 1-15) -------------------------------------------------------------------
23:16:16,550 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-7) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:16,550 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:16,552 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-7) JBAS010281: Started jboss-web-policy cache from security container
23:16:16,552 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started other cache from security container
23:16:16,561 INFO [org.infinispan.server.endpoint] (MSC service thread 1-8) JDGS010000: REST starting
23:16:16,756 INFO [org.infinispan.server.endpoint] (MSC service thread 1-8) JDGS010002: REST mapped to /rest
23:16:21,546 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000094: Received new cluster view: [rj-raptor-vm1-14938/clustered|0] [rj-raptor-vm1-14938/clustered]
23:16:21,620 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000079: Cache local address is rj-raptor-vm1-14938/clustered, physical addresses are [127.0.0.1:55200]
23:16:21,664 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-15) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:21,664 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:21,665 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-16) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started memcachedCache cache from clustered container
23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-15) JBAS010281: Started default cache from clustered container
23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-16) JBAS010281: Started namedCache cache from clustered container
23:16:21,676 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010000: MemcachedServer starting
23:16:21,677 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010001: MemcachedServer listening on 127.0.0.1:11211
23:16:22,216 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-11) ISPN000031: MBeans were successfully registered to the platform MBean server.
23:16:22,220 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-11) JBAS010281: Started ___hotRodTopologyCache cache from clustered container
23:16:22,319 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
23:16:22,320 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
23:16:22,320 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) started in 8264ms - Started 93 of 142 services (49 services are passive or on-demand)
Machine 2 console (And then I started Infinispan server on machine 2 after I started on machine 1)
root#rj-raptor-vm2-14939:/home/rkost/infinispan/infinispan-server-6.0.0.Alpha1/bin# sh clustered.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/rkost/infinispan/infinispan-server-6.0.0.Alpha1
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel=''
=========================================================================
22:45:59,604 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
22:45:59,855 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
22:45:59,917 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015899: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) starting
22:46:00,731 INFO [org.xnio] (MSC service thread 1-16) XNIO Version 3.0.7.GA
22:46:00,734 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
22:46:00,740 INFO [org.xnio.nio] (MSC service thread 1-16) XNIO NIO Implementation Version 3.0.7.GA
22:46:00,748 INFO [org.jboss.remoting] (MSC service thread 1-16) JBoss Remoting version 3.2.14.GA
22:46:00,773 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem.
22:46:00,797 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem.
22:46:00,800 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem
22:46:00,801 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem
22:46:00,803 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2]
22:46:00,809 INFO [org.jboss.as.security] (MSC service thread 1-14) JBAS013170: Current PicketBox version=4.0.15.Final
22:46:00,824 INFO [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
22:46:00,828 INFO [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service
22:46:00,948 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
22:46:00,951 INFO [org.apache.coyote.ajp] (MSC service thread 1-9) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/127.0.0.1:8009
22:46:00,960 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
22:46:00,986 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final
22:46:00,995 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364
22:46:01,181 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 127.0.0.1:9999
22:46:01,181 INFO [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on 127.0.0.1:4447
22:46:01,302 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-13) ISPN000128: Infinispan version: Infinispan '<TBD>' 6.0.0.Alpha1
22:46:01,355 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) JDGS010000: HotRodServer starting
22:46:01,356 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) JDGS010001: HotRodServer listening on 127.0.0.1:11222
22:46:01,357 INFO [org.infinispan.server.endpoint] (MSC service thread 1-15) JDGS010000: WebSocketServer starting
22:46:01,358 INFO [org.infinispan.server.endpoint] (MSC service thread 1-15) JDGS010001: WebSocketServer listening on 127.0.0.1:8181
22:46:01,458 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000078: Starting JGroups Channel
22:46:01,472 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
22:46:01,473 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
22:46:01,474 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the send buffer of socket MulticastSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
22:46:01,474 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
22:46:01,478 INFO [stdout] (MSC service thread 1-12)
22:46:01,478 INFO [stdout] (MSC service thread 1-12) -------------------------------------------------------------------
22:46:01,478 INFO [stdout] (MSC service thread 1-12) GMS: address=rj-raptor-vm2-14939/clustered, cluster=clustered, physical address=127.0.0.1:55200
22:46:01,478 INFO [stdout] (MSC service thread 1-12) -------------------------------------------------------------------
22:46:01,483 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-8) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:01,483 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-13) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:01,486 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-8) JBAS010281: Started jboss-web-policy cache from security container
22:46:01,486 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-13) JBAS010281: Started other cache from security container
22:46:01,495 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010000: REST starting
22:46:01,707 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010002: REST mapped to /rest
22:46:06,495 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000094: Received new cluster view: [rj-raptor-vm2-14939/clustered|0] [rj-raptor-vm2-14939/clustered]
22:46:06,572 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000079: Cache local address is rj-raptor-vm2-14939/clustered, physical addresses are [127.0.0.1:55200]
22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-12) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-6) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-12) JBAS010281: Started memcachedCache cache from clustered container
22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started namedCache cache from clustered container
22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-6) JBAS010281: Started default cache from clustered container
22:46:06,628 INFO [org.infinispan.server.endpoint] (MSC service thread 1-16) JDGS010000: MemcachedServer starting
22:46:06,628 INFO [org.infinispan.server.endpoint] (MSC service thread 1-16) JDGS010001: MemcachedServer listening on 127.0.0.1:11211
22:46:07,052 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-5) ISPN000031: MBeans were successfully registered to the platform MBean server.
22:46:07,056 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) JBAS010281: Started ___hotRodTopologyCache cache from clustered containerReply to original post
22:46:07,143 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
22:46:07,144 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
22:46:07,144 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) started in 7780ms - Started 93 of 142 services (49 services are passive or on-demand)
As per the above logs, I don't think so they are forming a cluster of two nodes. Something is wrong for sure. Can anyone help me out here? And also how do I make sure multicast is enabled on my network interfaces and infrastructure?
I am pretty much sure, there should be some settings that I need to have to enable the cluster of two nodes..
Both machines are bound to 127.0.0.1. Impossible to create a cluster with another machine if bound to that address :)
23:16:21,620 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000079: Cache local address is rj-raptor-vm1-14938/clustered, physical addresses are [127.0.0.1:55200]
22:46:06,572 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000079: Cache local address is rj-raptor-vm2-14939/clustered, physical addresses are [127.0.0.1:55200]
Pass -b <IP/host> so that both machines bind to the NIC that links them with each other.