Getting James-Cassandra connection error

Hi All I tried to launch all the docker services services with this command -
– ESN_HOST=“localhost” ESN_PATH="$PWD" docker-compose -f ./docker/dockerfiles/dev/docker-compose.yml up

Every thing seems to be good except the james and cassandra connection please see the logs below.

WARNING: The PROVISION variable is not set. Defaulting to a blank string.
WARNING: The DOCKER_IP variable is not set. Defaulting to a blank string.
WARNING: The ELASTICSEARCH_INIT_TIMEOUT variable is not set. Defaulting to a blank string.
Creating dev_mongo_1 … done
Creating dev_redis_1 … done
Creating dev_rabbitmq_1 … done
Creating dev_cassandra_1 … done
Creating dev_elasticsearch_1 … done
Creating esn_james … done
Creating dev_sabre_1 … done
Attaching to dev_redis_1, dev_elasticsearch_1, dev_cassandra_1, dev_mongo_1, dev_rabbitmq_1, dev_sabre_1, esn_james

and then I am getting below errror - cassandra_1 | WARN [main] 2020-02-06 07:59:06,479 NativeLibrary.java:187 - Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root.
cassandra_1 | INFO [main] 2020-02-06 07:59:06,484 StartupChecks.java:140 - jemalloc seems to be preloaded from /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
cassandra_1 | WARN [main] 2020-02-06 07:59:06,490 StartupChecks.java:169 - JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info.
cassandra_1 | INFO [main] 2020-02-06 07:59:06,523 SigarLibrary.java:44 - Initializing SIGAR library
cassandra_1 | WARN [main] 2020-02-06 07:59:06,605 SigarLibrary.java:174 - Cassandra server running in degraded mode. Is swap disabled? : false, Address space adequate? : true, nofile limit adequate? : true, nproc limit adequate? : true
cassandra_1 | WARN [main] 2020-02-06 07:59:06,647 StartupChecks.java:311 - Maximum number of memory map areas per process (vm.max_map_count) 262144 is too low, recommended value: 1048575, you can change it with sysctl.
cassandra_1 | WARN [main] 2020-02-06 07:59:06,864 StartupChecks.java:332 - Directory /var/lib/cassandra/data doesn’t exist
cassandra_1 | WARN [main] 2020-02-06 07:59:06,972 StartupChecks.java:332 - Directory /var/lib/cassandra/commitlog doesn’t exist
cassandra_1 | WARN [main] 2020-02-06 07:59:06,981 StartupChecks.java:332 - Directory /var/lib/cassandra/saved_caches doesn’t exist
cassandra_1 | WARN [main] 2020-02-06 07:59:06,989 StartupChecks.java:332 - Directory /var/lib/cassandra/hints doesn’t exist
cassandra_1 | INFO [main] 2020-02-06 07:59:07,934 QueryProcessor.java:116 - Initialized prepared statement caches with 10 MB (native) and 10 MB (Thrift)
esn_james | 07:59:10.947 [INFO ] o.a.c.b.FluentPropertyBeanIntrospector - Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property.
esn_james | 07:59:11.687 [INFO ] o.a.j.m.m.ResilientClusterProvider - Trying to connect to Cassandra service at 2020-02-06T07:59:11.686 (list [cassandra:9042])
esn_james | 07:59:12.470 [INFO ] c.d.driver.core - DataStax Java driver 3.7.2 for Apache Cassandra
esn_james | 07:59:12.514 [INFO ] c.d.d.c.GuavaCompatibility - Detected Guava >= 19 in the classpath, using modern compatibility layer
esn_james | 07:59:12.628 [INFO ] o.a.j.b.c.i.ClusterBuilder - No cassandra host specified. Falling back to localhost
esn_james | 07:59:12.632 [INFO ] o.a.j.b.c.i.ClusterBuilder - No cassandra port specified. Falling back to 9042
cassandra_1 | INFO [main] 2020-02-06 07:59:14,849 ColumnFamilyStore.java:411 - Initializing system.IndexInfo
esn_james | 07:59:14.890 [INFO ] c.d.d.c.ClockFactory - Using native clock to generate timestamps.
esn_james | 07:59:15.447 [INFO ] c.d.d.c.NettyUtil - Detected shaded Netty classes in the classpath; native epoll transport will not work properly, defaulting to NIO.
esn_james | 07:59:19.487 [WARN ] o.a.j.m.m.ResilientClusterProvider - Error establishing Cassandra connection. Next retry scheduled in PT5S ms
esn_james | com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: cassandra/172.18.0.5:9042 (com.datastax.driver.core.exceptions.TransportException: [cassandra/172.18.0.5:9042] Cannot connect))
esn_james | at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268)
esn_james | at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107)
esn_james | at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652)
esn_james | at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571)
esn_james | at com.datastax.driver.core.Cluster.init(Cluster.java:208)
esn_james | at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376)
esn_james | at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:355)
esn_james | at com.datastax.driver.core.Cluster.connect(Cluster.java:305)
esn_james | at org.apache.james.backends.cassandra.init.ClusterWithKeyspaceCreatedFactory.createKeyspace(ClusterWithKeyspaceCreatedFactory.java:63)
esn_james | at org.apache.james.backends.cassandra.init.ClusterWithKeyspaceCreatedFactory.access$100(ClusterWithKeyspaceCreatedFactory.java:25)
esn_james | at org.apache.james.backends.cassandra.init.ClusterWithKeyspaceCreatedFactory$Configuration.clusterWithInitializedKeyspace(ClusterWithKeyspaceCreatedFactory.java:57)
esn_james | at org.apache.james.modules.mailbox.ResilientClusterProvider.lambda$getClusterRetryCallable$1(ResilientClusterProvider.java:76)
esn_james | at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:56)
esn_james | at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:55)
esn_james | at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:87)
esn_james | at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:50)
esn_james | at reactor.core.publisher.Mono.subscribe(Mono.java:4072)
esn_james | at reactor.core.publisher.Mono.block(Mono.java:1662)
esn_james | at org.apache.james.modules.mailbox.ResilientClusterProvider.(ResilientClusterProvider.java:57)
esn_james | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
esn_james | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
esn_james | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
esn_james | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
esn_james | at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:126)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
esn_james | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
esn_james | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
esn_james | at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
esn_james | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
esn_james | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
esn_james | at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
esn_james | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
esn_james | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
esn_james | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
esn_james | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:62)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.RealMultibinder$RealMultibinderProvider.doProvision(RealMultibinder.java:198)
esn_james | at com.google.inject.internal.RealMultibinder$RealMultibinderProvider.doProvision(RealMultibinder.java:151)
esn_james | at com.google.inject.internal.InternalProviderInstanceBindingImpl$Factory.get(InternalProviderInstanceBindingImpl.java:113)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
esn_james | at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
esn_james | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
esn_james | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
esn_james | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
esn_james | at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
esn_james | at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
esn_james | at org.apache.james.GuiceJamesServer.start(GuiceJamesServer.java:81)
esn_james | at org.apache.james.CassandraJamesServerMain.main(CassandraJamesServerMain.java:151)
cassandra_1 | INFO [main] 2020-02-06 07:59:19,718 ColumnFamilyStore.java:411 - Initializing system.batches
cassandra_1 | INFO [main] 2020-02-06 07:59:19,744 ColumnFamilyStore.java:411 - Initializing system.paxos
cassandra_1 | INFO [main] 2020-02-06 07:59:19,798 ColumnFamilyStore.java:411 - Initializing system.local
cassandra_1 | INFO [main] 2020-02-06 07:59:19,826 ColumnFamilyStore.java:411 - Initializing system.peers
cassandra_1 | INFO [main] 2020-02-06 07:59:19,874 ColumnFamilyStore.java:411 - Initializing system.peer_events
cassandra_1 | INFO [main] 2020-02-06 07:59:19,903 ColumnFamilyStore.java:411 - Initializing system.range_xfers
cassandra_1 | INFO [main] 2020-02-06 07:59:19,924 ColumnFamilyStore.java:411 - Initializing system.compaction_history
cassandra_1 | INFO [main] 2020-02-06 07:59:19,940 ColumnFamilyStore.java:411 - Initializing system.sstable_activity
cassandra_1 | INFO [main] 2020-02-06 07:59:19,968 ColumnFamilyStore.java:411 - Initializing system.size_estimates
cassandra_1 | INFO [main] 2020-02-06 07:59:19,988 ColumnFamilyStore.java:411 - Initializing system.available_ranges
cassandra_1 | INFO [main] 2020-02-06 07:59:20,082 ColumnFamilyStore.java:411 - Initializing system.transferred_ranges
cassandra_1 | INFO [main] 2020-02-06 07:59:20,123 ColumnFamilyStore.java:411 - Initializing system.views_builds_in_progress
cassandra_1 | INFO [main] 2020-02-06 07:59:20,245 ColumnFamilyStore.java:411 - Initializing system.built_views
cassandra_1 | INFO [main] 2020-02-06 07:59:20,263 ColumnFamilyStore.java:411 - Initializing system.hints
cassandra_1 | INFO [main] 2020-02-06 07:59:20,294 ColumnFamilyStore.java:411 - Initializing system.batchlog
cassandra_1 | INFO [main] 2020-02-06 07:59:20,326 ColumnFamilyStore.java:411 - Initializing system.prepared_statements
cassandra_1 | INFO [main] 2020-02-06 07:59:20,375 ColumnFamilyStore.java:411 - Initializing system.schema_keyspaces
cassandra_1 | INFO [main] 2020-02-06 07:59:20,401 ColumnFamilyStore.java:411 - Initializing system.schema_columnfamilies
cassandra_1 | INFO [main] 2020-02-06 07:59:20,420 ColumnFamilyStore.java:411 - Initializing system.schema_columns
cassandra_1 | INFO [main] 2020-02-06 07:59:20,442 ColumnFamilyStore.java:411 - Initializing system.schema_triggers
cassandra_1 | INFO [main] 2020-02-06 07:59:20,466 ColumnFamilyStore.java:411 - Initializing system.schema_usertypes
cassandra_1 | INFO [main] 2020-02-06 07:59:20,493 ColumnFamilyStore.java:411 - Initializing system.schema_functions
cassandra_1 | INFO [main] 2020-02-06 07:59:20,506 ColumnFamilyStore.java:411 - Initializing system.schema_aggregates
cassandra_1 | INFO [main] 2020-02-06 07:59:20,525 ViewManager.java:137 - Not submitting build tasks for views in keyspace system as

Can someone help me figure out what went wrong with cassandra and james

Hi,

Only means that Cassandra is not started and that James will wait a bit before trying to connect it again “Next retry scheduled in PT5S ms”.

Regards,
Raphaël.