I'm following example to setup Cluster sharding at https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html
I download the example from https://developer.lightbend.com/start/?group=akka&project=akka-samples-cluster-sharding-java
When I try to run the example using mvn -pl killrweather exec:java -Dexec.args="2553" I receive an exception:
[2021-07-10 22:26:04,974] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather#127.0.0.1:2553] - Starting up, Akka version [2.6.1] ...
[2021-07-10 22:26:05,099] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather#127.0.0.1:2553] - Registered cluster JMX MBean [akka:type=Cluster]
[2021-07-10 22:26:05,099] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-3] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather#127.0.0.1:2553] - Started up successfully
[2021-07-10 22:26:05,127] [ERROR] [akka://KillrWeather#127.0.0.1:2553] [akka.cluster.Cluster] [KillrWeather-akka.actor.default-dispatcher-5] [Cluster(akka://KillrWeather)] - Cluster Node [akka://KillrWeather#127.0.0.1:2553] - crashed, [akka://KillrWeather/system/cluster/core/daemon: exception during creation] - shutting down...
akka.actor.ActorInitializationException: akka://KillrWeather/system/cluster/core/daemon: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:195)
at akka.actor.ActorCell.create(ActorCell.scala:657)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:509)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:531)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:294)
at akka.dispatch.Mailbox.run(Mailbox.scala:229)
at akka.dispatch.Mailbox.exec(Mailbox.scala:242)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: akka.ConfigurationException: Could not create cluster downing provider [akka.cluster.sbr.SplitBrainResolverProvider]
If I remove the line downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider" from application.conf
and re-execute the Cluster appears to startup correctly:
[2021-07-10 22:37:22,120] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [2] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,120] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [4] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-07-10 22:37:22,121] [INFO] [akka://KillrWeather#127.0.0.1:2553] [akka.remote.RemoteActorRefProvider$RemoteDeadLetterActorRef] [KillrWeather-akka.actor.default-dispatcher-24] [akka://KillrWeather/deadLetters] - Message [akka.cluster.InternalClusterAction$InitJoin] from Actor[akka://KillrWeather/system/cluster/core/daemon/firstSeedNodeProcess-1#-1591142875] to Actor[akka://KillrWeather/deadLetters] was not delivered. [6] dead letters encountered. If this is not an expected behavior then Actor[akka://KillrWeather/deadLetters] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
Shouldn't the class akka.cluster.sbr.SplitBrainResolverProvider be included as part of the Akka example ?
This issue against the samples seems to indicate that upgrading akka.version to 2.6.15 in pom.xml fixes this.
Related
We have a Google Cloud run application that runs at 1am every morning to ingest, process, and output some data files. Currently, we have max concurrency, as timing is important.
Over the past weeks we have noticed several errors generated by the platform.
The Cloud Run logs themselves show Shutting down: Master
At a similar timestamp, a logging sink picks up
The request failed because either the HTTP response was malformed or connection to the instance had an error.
We have modified the instances and concurrency, as well as memory and vCPUs available, and they just show the same error but generated over a longer period of time.
There are no other errors or logs generated to give us any further info.
Any ideas where we may be going wrong?
Edit:
The full trace from the Cloud Run log is below
[INFO] Starting gunicorn 20.0.4
[1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[1] [INFO] Using worker: sync
[4] [INFO] Booting worker with pid: 4
[5] [INFO] Booting worker with pid: 5
[6] [INFO] Booting worker with pid: 6
[1] [INFO] Handling signal: term
[6] [INFO] Worker exiting (pid: 6)
[5] [INFO] Worker exiting (pid: 5)
[4] [INFO] Worker exiting (pid: 4)
[1] [INFO] Shutting down: Master
My situation was the same.
I sloved it by stop the firewall.
Following the VSOMEIP tutorial Vsomeip in 10 minutes everything works up to the point of Communication between 2 devices.
Current Setup:
Ubuntu 16.04 (two machines - Server & Client)
Two Machines connected over ethernet
Files used:
server.cpp
client.cpp
client_config.json
server_config.json
Output of Server
[info] Parsed vsomeip configuration in 1ms
[info] Using configuration file: "../clie_prop.json".
[info] Default configuration module loaded.
[info] Initializing vsomeip application "Hello".
[info] SOME/IP client identifier configured. Using 0033 (was: 1313)
[info] Instantiating routing manager [Proxy].
[info] Client [33] is connecting to [0] at /tmp/vsomeip-0
[info] Listening at /tmp/vsomeip-33
[info] Application(Hello, 33) is initialized (11, 100).
[info] Starting vsomeip application "Hello" using 2 threads
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] io thread id from application: 0033 (Hello) is: 7f80f5cd88c0 TID: 1497
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
[info] io thread id from application: 0033 (Hello) is: 7f80f15e7700 TID: 1501
[info] shutdown thread id from application: 0033 (Hello) is: 7f80f1de8700 TID: 1500
[info] main dispatch thread id from application: 0033 (Hello) is: 7f80f25e9700 TID: 1499
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
[warning] local_client_endpoint::connect: Couldn't connect to: /tmp/vsomeip-0 (Connection refused / 111)
[info] routing_manager_proxy::on_disconnect: Client 0x33 calling host_->on_state with DEREGISTERED
Output of Client
[info] Parsed vsomeip configuration in 0ms
[info] Using configuration file: "../serv_prop.json".
[info] Default configuration module loaded.
[info] Initializing vsomeip application "World".
[warning] Routing Manager seems to be inactive. Taking over...
[info] SOME/IP client identifier configured. Using 1212 (was: 1212)
[info] Instantiating routing manager [Host].
[info] init_routing_endpoint Routing endpoint at /tmp/vsomeip-0
[info] Client [1212] is connecting to [0] at /tmp/vsomeip-0
[info] Service Discovery enabled. Trying to load module.
[info] Service Discovery module loaded.
[info] Application(World, 1212) is initialized (11, 100).
[info] OFFER(1212): [1234.5678:0.0]
[info] Starting vsomeip application "World" using 2 threads
[info] Watchdog is disabled!
[info] io thread id from application: 1212 (World) is: 7fa68723d8c0 TID: 5370
[info] Network interface "enp0s3" state changed: up
[info] vSomeIP 2.10.21 | (default)
[info] Sent READY to systemd watchdog
[info] io thread id from application: 1212 (World) is: 7fa6828f3700 TID: 5374
[info] shutdown thread id from application: 1212 (World) is: 7fa6838f5700 TID: 5372
[info] main dispatch thread id from application: 1212 (World) is: 7fa6840f6700 TID: 5371
[warning] Releasing client identifier 0003. Its corresponding application went offline while no routing manager was running.
[info] Application/Client 0003 is deregistering.
All the code used is the same as the code used in Request/Response in the vsomeip tutorial. The config files are the same as the config file specified in the communication between 2 devices section with the IP Addresses changed to match my machine addresses.
Any help would be greatly appreciated, thanks.
I found a solution!!
If you navigate to the /build/examples folder in the vsomeip or vsomeip-master directory, you will find executables (response-sample, subscribe-sample, etc.). If you run them in such a way that they use the same configuration files as used in the vsomeip in 10 mintutes (changing unicast addresses, etc.) it should work perfectly.
This is the configuration file I used.
{
"unicast" : "192.168.43.6",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "World",
"id" : "0x1212"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unreliable" : "30509"
}
],
"routing" : "World",
"service-discovery" :
{
"enable" : "true",
"multicast" : "224.224.224.245",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "3",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
I used shell script to do this.
#!/bin/bash
route add -host 224.224.224.245 dev <interface>
export VSOMEIP_CONFIGURATION=<config_file>
export VSOMEIP_APPLICATION_NAME=<application_name>
./<executable>
It did for me anyways! Hope this helps! :)
To clarify Rob Crowley's answer, I got it working using the two unique .json configuration files included in the "vsomeip in 10 minutes" tutorial. I used the "World" configuration on the host offering the service and the "Hello" configuration file on the host running the client. The only thing I need to modify in these files was the "unicast" address. I changed that to match the IP address of the respective hosts.
I also modified the script to use "sudo" before the "route add -host" command, as I found it wouldn't actually add the route without it.
I called make in the "vsomeip/build/examples/" folder to build the examples. The I pointed to on the script for the service service was "notify-sample" executable (vsomeip/build/examples/). The I pointed to on the script for the service service was "subscribe-sample" executable (vsomeip/build/examples/).
This combination worked for me after connecting my two hosts via ethernet and ensuring their IP addresses matched those in the "unicast" field of their respective configuration files.
folks.
I'm following this tutorial to deploy the c3-pro stack on AWS:
https://github.com/C3-PRO/c3-pro-server
I've followed all the steps, these are my configuration files:
standalone.xml
<datasource jndi-name="java:jboss/datasources/c3proDS" pool-name="c3proDS" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:#localhost:1521:XE</connection-url>
<driver>ojdbc14.jar</driver>
<security>
<security-domain>secure-c3pro-credentials</security-domain>
</security>
</datasource>
<drivers>
And this is the security domain part (note the I removed the 'auth' part in c3proAuthDS as it appears in the tutorial)
<security-domain name="StaticUserPwd" cache-type="default">
<authentication>
<login-module code="org.bch.security.oauth.OAuth2LoginModule" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/c3proDS"/>
<module-option name="principalsQuery" value="select passwd from Users where username=?"/>
<module-option name="rolesQuery" value="select userRoles, 'Roles' from UserRoles where username=?"/>
<module-option name="hashAlgorithm" value="SHA1"/>
<module-option name="hashEncoding" value="BASE64"/>
<module-option name="hashCharset" value="UTF-8"/>
<module-option name="hashUserPassword" value="true"/>
<module-option name="hashStorePassword" value="false"/>
</login-module>
</authentication>
I also copied the ojdbc14.jar into the deployment folder in jboss:
cd /usr/share/jboss-as-7.1.1.Final/standalone/deployments/
ojdbc14.jar ojdbc14.jar.deployed README.txt
When I try to launch jboss I get the following error:
sh /usr/share/jboss-as-7.1.1.Final/bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/share/jboss-as-7.1.1.Final
JAVA: /usr/lib/jvm/java/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -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=standalone.xml
=========================================================================
10:40:12,511 INFORMACIÓN [org.jboss.modules] JBoss Modules version 1.1.5.GA
10:40:12,797 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
10:40:12,852 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
10:40:13,971 INFO [org.xnio] XNIO Version 3.0.3.GA
10:40:13,995 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
10:40:14,006 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
10:40:14,018 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
10:40:14,069 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
10:40:14,082 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
10:40:14,117 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
10:40:14,165 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
10:40:14,169 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
10:40:14,209 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
10:40:14,238 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
10:40:14,277 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
10:40:14,311 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final
10:40:14,361 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
10:40:14,423 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
10:40:14,699 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
10:40:14,760 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA
10:40:15,218 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Arrancando Coyote HTTP/1.1 en puerto http--127.0.0.1-8080
10:40:15,573 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
10:40:15,580 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory /usr/share/jboss-as-7.1.1.Final/standalone/deployments
10:40:15,667 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:4447
10:40:15,672 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
10:40:15,892 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.ojdbc14_jar (missing) dependents: [service jboss.data-source.java:jboss/datasources/c3proDS]
10:40:15,928 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ojdbc14.jar"
10:40:16,305 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 10.2)
10:40:16,415 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/c3proDS]
10:40:16,417 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990
10:40:16,417 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 4233ms - Started 159 of 237 services (76 services are passive or on-demand)
10:40:16,476 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ojdbc14.jar"
10:40:16,476 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.jdbc-driver.ojdbc14_jar (no longer required)
And then I have to cancel it with CTRL +C because I cannot write anymore.
I have tried to run it in background with & and then try to run
mvn clean package
and
mvn jboss-as:deploy
This is what I get:
mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building c3pro server 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # c3pro-server ---
[INFO] Deleting /home/ec2-user/c3-pro/c3-pro-server/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # c3pro-server ---
[INFO] Compiling 26 source files to /home/ec2-user/c3-pro/c3-pro-server/target/classes
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (make-a-jar) # c3pro-server ---
[INFO] Building jar: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.jar
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # c3pro-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) # c3pro-server ---
[INFO] Surefire report directory: /home/ec2-user/c3-pro/c3-pro-server/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # c3pro-server ---
[INFO] Packaging webapp
[INFO] Assembling webapp [c3pro-server] in [/home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ec2-user/c3-pro/c3-pro-server/src/main/webapp]
[INFO] Webapp assembled in [603 msecs]
[INFO] Building war: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.520 s
[INFO] Finished at: 2018-07-25T10:43:12Z
[INFO] Final Memory: 22M/54M
[INFO] ------------------------------------------------------------------------
mvn jboss-as:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building c3pro server 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jboss-as-maven-plugin:7.3.Final:deploy (default-cli) > package # c3pro-server >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # c3pro-server ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (make-a-jar) # c3pro-server ---
[INFO] Building jar: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.jar
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # c3pro-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # c3pro-server ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) # c3pro-server ---
[INFO] Surefire report directory: /home/ec2-user/c3-pro/c3-pro-server/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # c3pro-server ---
[INFO] Packaging webapp
[INFO] Assembling webapp [c3pro-server] in [/home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ec2-user/c3-pro/c3-pro-server/src/main/webapp]
[INFO] Webapp assembled in [327 msecs]
[INFO] Building war: /home/ec2-user/c3-pro/c3-pro-server/target/c3pro-server.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< jboss-as-maven-plugin:7.3.Final:deploy (default-cli) < package # c3pro-server <<<
[INFO]
[INFO]
[INFO] --- jboss-as-maven-plugin:7.3.Final:deploy (default-cli) # c3pro-server ---
jul 25, 2018 10:45:00 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
jul 25, 2018 10:45:00 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
jul 25, 2018 10:45:00 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GA
10:45:04,178 INFO [org.jboss.as.repository] (management-handler-thread - 1) JBAS014900: Content added at location /usr/share/jboss-as-7.1.1.Final/standalone/data/content/ae/321f027724d11967669f345f2941400cb2e85a/content
10:45:04,195 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "c3pro-server.war"
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000df322000, 33685504, 0) failed; error='No se pudo asignar memoria' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 33685504 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/jvm-3373/hs_error.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.796 s
[INFO] Finished at: 2018-07-25T10:45:06Z
[INFO] Final Memory: 18M/128M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default-cli) on project c3pro-server: Error executing FORCE_DEPLOY: Operation failed: Channel closed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Is it a memory problem? In this case, how can I solve it?
Thanks.
Solved by changing instance to another with 4GB of RAM.
In my Django settings and on my machine I have utc+3 configured time so the expectations were to get all logs in utc+3, but turned out, that actually they are pretty messy:
[2017-08-08 10:29:22 +0000] [1] [INFO] Starting gunicorn 19.7.1
[2017-08-08 10:29:22 +0000] [1] [DEBUG] Arbiter booted
[2017-08-08 10:29:22 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000
[2017-08-08 10:29:22 +0000] [1] [INFO] Using worker: sync
[2017-08-08 10:29:22 +0000] [7] [INFO] Booting worker with pid: 7
[2017-08-08 10:29:23 +0000] [1] [DEBUG] 1 worker
[2017-08-08 13:29:26 +0300] [7] [INFO] [dashboard.views:9] Displaying menu
Settings:
TIME_ZONE = 'Europe/Moscow'
USE_TZ = True
Maybe you can provide some hints/information how to configure or debug it?
For a moment I thought that this is a gunicorn's problem, but it uses Django settings soo I have no idea what's wrong :/
Gunicorn logging time do not relay on Django timezone, but in the local machine one, so to get the right timezone you should configure your local machine and how to do it depends in what OS is running on it.
For Debian/Ubuntu:
sudo dpkg-reconfigure tzdata
Follow the directions in the terminal.
The timezone info is saved in /etc/timezone - which can be edited or used below
If you are using CentOS you can check it in this article.
For other options, check it in Google.
Hope that it helps.
So, the timestamps were correct, but different because of my company proxy settings. Also it turned out that is best way to handle different time zones is just use utc everywhere except presentation to user.
By following Akka documents, I can start two actors(front-end and back-end) on the same machine, and they can talk to each other. However, when I tried to deploy back-end actor to another machine(Linux), I hit error of start remoting:
============
Multiple main classes detected, select one to run:
[1] com.goticks.BackendMain
[2] com.goticks.BackendRemoteDeployMain
[3] com.goticks.FrontendMain
[4] com.goticks.FrontendRemoteDeployMain
[5] com.goticks.FrontendRemoteDeployWatchMain
[6] com.goticks.SingleNodeMain
Enter number: 2
[info] Running com.goticks.BackendRemoteDeployMain
INFO [Slf4jLogger]: Slf4jLogger started
INFO [Remoting]: Starting remoting
ERROR [NettyTransport]: failed to bind to /192.168.1.9:2551, shutting down Netty transport
192.168.1.9 is another machine.
In backend.conf:
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
#hostname = "0.0.0.0"
hostname = "192.168.1.9"
port = 2551
}
}
I have one basic question, when deploy and start a remote actor on remote JVM, do we need user login information to remote machine?
Thanks,
You don't need user login information, I think your port 2551 is already in use on hostname = 192.168.1.9, are you sure you don't use it in the past ?
I also had the same problem, and I accidentally forgot to close the running program on the same port after that I tried to run the program for the second time and it happened Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.3.216:2552
Just to add more information regarding my previous question:
Multiple main classes detected, select one to run:
[1] com.goticks.BackendMain
[2] com.goticks.BackendRemoteDeployMain
[3] com.goticks.FrontendMain
[4] com.goticks.FrontendRemoteDeployMain
[5] com.goticks.FrontendRemoteDeployWatchMain
[6] com.goticks.SingleNodeMain
Enter number: 2
[info] Running com.goticks.BackendRemoteDeployMain
[DEBUG] [04/18/2016 15:54:11.554] [run-main-0] [EventStream(akka://backend)] logger log1-Logging$DefaultLogger started
[DEBUG] [04/18/2016 15:54:11.555] [run-main-0] [EventStream(akka://backend)] Default Loggers started
[INFO] [04/18/2016 15:54:11.591] [run-main-0] [akka.remote.Remoting] Starting remoting
[ERROR] [04/18/2016 15:54:11.748] [backend-akka.remote.default-remote-dispatcher-5] [NettyTransport(akka://backend)] failed to bind to /192.168.1.9:2551, shutting down Netty transport
[ERROR] [04/18/2016 15:54:11.757] [run-main-0] [akka.remote.Remoting] Remoting error: [Startup failed] [
akka.remote.RemoteTransportException: Startup failed at
akka.remote.Remoting.akka$remote$Remoting$$notifyError(Remoting.scala:136)
at akka.remote.Remoting.start(Remoting.scala:201)
at akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:184)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:663)
at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:143)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:120)
at com.goticks.BackendRemoteDeployMain$.delayedEndpoint$com$goticks$BackendRemoteDeployMain$1(BackendRemoteDeployMain.scala:9)
at com.goticks.BackendRemoteDeployMain$delayedInit$body.apply(BackendRemoteDeployMain.scala:6)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.goticks.BackendRemoteDeployMain$.main(BackendRemoteDeployMain.scala:6)
at com.goticks.BackendRemoteDeployMain.main(BackendRemoteDeployMain.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sbt.Run.invokeMain(Run.scala:67)
at sbt.Run.run0(Run.scala:61)
at sbt.Run.sbt$Run$$execute$1(Run.scala:51)
at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:55)
at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
at sbt.Logger$$anon$4.apply(Logger.scala:85)
at sbt.TrapExit$App.run(TrapExit.scala:248)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /192.168.1.9:2551
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:410)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:406)