Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x architecture support #193

Closed
PeterYHChen opened this issue Oct 22, 2019 · 7 comments
Closed

s390x architecture support #193

PeterYHChen opened this issue Oct 22, 2019 · 7 comments

Comments

@PeterYHChen
Copy link

PeterYHChen commented Oct 22, 2019

Help docs here https://github.com/linux-on-ibm-z/docs/wiki/Building-Apache-Cassandra-3.11
It would be great if s390x arch is supported for this docker cassandra image

@tianon
Copy link
Member

tianon commented Oct 22, 2019

There are some notes about this over in #116 (where ppc64le support was added) where I'd tested this and it was not working, so it sounds like it's worth testing again. 👍

@tianon
Copy link
Member

tianon commented Oct 23, 2019

Getting a totally new issue trying to run an image built from the latest 3.11 directory on s390x:

Unrecognized VM option 'UseCondCardMark'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

@tianon
Copy link
Member

tianon commented Oct 23, 2019

If I add -e JVM_OPTS='-XX:+IgnoreUnrecognizedVMOptions', I get closer to the blocker we'd seen previously:

CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.deserializeLargeSubset (Lorg/apache/cassandra/io/util/DataInputPlus;Lorg/apache/cassandra/db/Columns;I)Lorg/apache/cassandra/db/Columns;
CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.serializeLargeSubset (Ljava/util/Collection;ILorg/apache/cassandra/db/Columns;ILorg/apache/cassandra/io/util/DataOutputPlus;)V
CompilerOracle: dontinline org/apache/cassandra/db/Columns$Serializer.serializeLargeSubsetSize (Ljava/util/Collection;ILorg/apache/cassandra/db/Columns;I)I
CompilerOracle: dontinline org/apache/cassandra/db/commitlog/AbstractCommitLogSegmentManager.advanceAllocatingFrom (Lorg/apache/cassandra/db/commitlog/CommitLogSegment;)V
CompilerOracle: dontinline org/apache/cassandra/db/transform/BaseIterator.tryGetMoreContents ()Z
CompilerOracle: dontinline org/apache/cassandra/db/transform/StoppingTransformation.stop ()V
CompilerOracle: dontinline org/apache/cassandra/db/transform/StoppingTransformation.stopInPartition ()V
CompilerOracle: dontinline org/apache/cassandra/io/util/BufferedDataOutputStreamPlus.doFlush (I)V
CompilerOracle: dontinline org/apache/cassandra/io/util/BufferedDataOutputStreamPlus.writeExcessSlow ()V
CompilerOracle: dontinline org/apache/cassandra/io/util/BufferedDataOutputStreamPlus.writeSlow (JI)V
CompilerOracle: dontinline org/apache/cassandra/io/util/RebufferingInputStream.readPrimitiveSlowly (I)J
CompilerOracle: inline org/apache/cassandra/db/rows/UnfilteredSerializer.serializeRowBody (Lorg/apache/cassandra/db/rows/Row;ILorg/apache/cassandra/db/SerializationHeader;Lorg/apache/cassandra/io/util/DataOutputPlus;)V
CompilerOracle: inline org/apache/cassandra/io/util/Memory.checkBounds (JJ)V
CompilerOracle: inline org/apache/cassandra/io/util/SafeMemory.checkBounds (JJ)V
CompilerOracle: inline org/apache/cassandra/utils/AsymmetricOrdering.selectBoundary (Lorg/apache/cassandra/utils/AsymmetricOrdering/Op;II)I
CompilerOracle: inline org/apache/cassandra/utils/AsymmetricOrdering.strictnessOfLessThan (Lorg/apache/cassandra/utils/AsymmetricOrdering/Op;)I
CompilerOracle: inline org/apache/cassandra/utils/BloomFilter.indexes (Lorg/apache/cassandra/utils/IFilter/FilterKey;)[J
CompilerOracle: inline org/apache/cassandra/utils/BloomFilter.setIndexes (JJIJ[J)V
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare (Ljava/nio/ByteBuffer;[B)I
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compare ([BLjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/ByteBufferUtil.compareUnsigned (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/lang/Object;JI)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/lang/Object;JILjava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/FastByteOperations$UnsafeOperations.compareTo (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I
CompilerOracle: inline org/apache/cassandra/utils/vint/VIntCoding.encodeVInt (JI)[B
INFO  [main] 2019-10-23 00:02:54,432 YamlConfigurationLoader.java:89 - Configuration location: file:/etc/cassandra/cassandra.yaml
INFO  [main] 2019-10-23 00:02:55,206 Config.java:496 - Node configuration:[allocate_tokens_for_keyspace=null; authenticator=AllowAllAuthenticator; authorizer=AllowAllAuthorizer; auto_bootstrap=true; auto_snapshot=true; back_pressure_enabled=false; back_pressure_strategy=org.apache.cassandra.net.RateBasedBackPressure{high_ratio=0.9, factor=5, flow=FAST}; batch_size_fail_threshold_in_kb=50; batch_size_warn_threshold_in_kb=5; batchlog_replay_throttle_in_kb=1024; broadcast_address=172.17.0.5; broadcast_rpc_address=172.17.0.5; buffer_pool_use_heap_if_exhausted=true; cas_contention_timeout_in_ms=1000; cdc_enabled=false; cdc_free_space_check_interval_ms=250; cdc_raw_directory=null; cdc_total_space_in_mb=0; client_encryption_options=<REDACTED>; cluster_name=Test Cluster; column_index_cache_size_in_kb=2; column_index_size_in_kb=64; commit_failure_policy=stop; commitlog_compression=null; commitlog_directory=/var/lib/cassandra/commitlog; commitlog_max_compression_buffers_in_pool=3; commitlog_periodic_queue_size=-1; commitlog_segment_size_in_mb=32; commitlog_sync=periodic; commitlog_sync_batch_window_in_ms=NaN; commitlog_sync_period_in_ms=10000; commitlog_total_space_in_mb=null; compaction_large_partition_warning_threshold_mb=100; compaction_throughput_mb_per_sec=16; concurrent_compactors=null; concurrent_counter_writes=32; concurrent_materialized_view_writes=32; concurrent_reads=32; concurrent_replicates=null; concurrent_writes=32; counter_cache_keys_to_save=2147483647; counter_cache_save_period=7200; counter_cache_size_in_mb=null; counter_write_request_timeout_in_ms=5000; credentials_cache_max_entries=1000; credentials_update_interval_in_ms=-1; credentials_validity_in_ms=2000; cross_node_timeout=false; data_file_directories=[Ljava.lang.String;@6f3b5d16; disk_access_mode=auto; disk_failure_policy=stop; disk_optimization_estimate_percentile=0.95; disk_optimization_page_cross_chance=0.1; disk_optimization_strategy=ssd; dynamic_snitch=true; dynamic_snitch_badness_threshold=0.1; dynamic_snitch_reset_interval_in_ms=600000; dynamic_snitch_update_interval_in_ms=100; enable_materialized_views=true; enable_scripted_user_defined_functions=false; enable_user_defined_functions=false; enable_user_defined_functions_threads=true; encryption_options=null; endpoint_snitch=SimpleSnitch; file_cache_round_up=null; file_cache_size_in_mb=null; gc_log_threshold_in_ms=200; gc_warn_threshold_in_ms=1000; hinted_handoff_disabled_datacenters=[]; hinted_handoff_enabled=true; hinted_handoff_throttle_in_kb=1024; hints_compression=null; hints_directory=null; hints_flush_period_in_ms=10000; incremental_backups=false; index_interval=null; index_summary_capacity_in_mb=null; index_summary_resize_interval_in_minutes=60; initial_token=null; inter_dc_stream_throughput_outbound_megabits_per_sec=200; inter_dc_tcp_nodelay=false; internode_authenticator=null; internode_compression=dc; internode_recv_buff_size_in_bytes=0; internode_send_buff_size_in_bytes=0; key_cache_keys_to_save=2147483647; key_cache_save_period=14400; key_cache_size_in_mb=null; listen_address=172.17.0.5; listen_interface=null; listen_interface_prefer_ipv6=false; listen_on_broadcast_address=false; max_hint_window_in_ms=10800000; max_hints_delivery_threads=2; max_hints_file_size_in_mb=128; max_mutation_size_in_kb=null; max_streaming_retries=3; max_value_size_in_mb=256; memtable_allocation_type=heap_buffers; memtable_cleanup_threshold=null; memtable_flush_writers=0; memtable_heap_space_in_mb=null; memtable_offheap_space_in_mb=null; min_free_space_per_drive_in_mb=50; native_transport_flush_in_batches_legacy=true; native_transport_max_concurrent_connections=-1; native_transport_max_concurrent_connections_per_ip=-1; native_transport_max_frame_size_in_mb=256; native_transport_max_threads=128; native_transport_port=9042; native_transport_port_ssl=null; num_tokens=256; otc_backlog_expiration_interval_ms=200; otc_coalescing_enough_coalesced_messages=8; otc_coalescing_strategy=DISABLED; otc_coalescing_window_us=200; partitioner=org.apache.cassandra.dht.Murmur3Partitioner; permissions_cache_max_entries=1000; permissions_update_interval_in_ms=-1; permissions_validity_in_ms=2000; phi_convict_threshold=8.0; prepared_statements_cache_size_mb=null; range_request_timeout_in_ms=10000; read_request_timeout_in_ms=5000; request_scheduler=org.apache.cassandra.scheduler.NoScheduler; request_scheduler_id=null; request_scheduler_options=null; request_timeout_in_ms=10000; role_manager=CassandraRoleManager; roles_cache_max_entries=1000; roles_update_interval_in_ms=-1; roles_validity_in_ms=2000; row_cache_class_name=org.apache.cassandra.cache.OHCProvider; row_cache_keys_to_save=2147483647; row_cache_save_period=0; row_cache_size_in_mb=0; rpc_address=0.0.0.0; rpc_interface=null; rpc_interface_prefer_ipv6=false; rpc_keepalive=true; rpc_listen_backlog=50; rpc_max_threads=2147483647; rpc_min_threads=16; rpc_port=9160; rpc_recv_buff_size_in_bytes=null; rpc_send_buff_size_in_bytes=null; rpc_server_type=sync; saved_caches_directory=/var/lib/cassandra/saved_caches; seed_provider=org.apache.cassandra.locator.SimpleSeedProvider{seeds=172.17.0.5}; server_encryption_options=<REDACTED>; slow_query_log_timeout_in_ms=500; snapshot_before_compaction=false; ssl_storage_port=7001; sstable_preemptive_open_interval_in_mb=50; start_native_transport=true; start_rpc=false; storage_port=7000; stream_throughput_outbound_megabits_per_sec=200; streaming_keep_alive_period_in_secs=300; streaming_socket_timeout_in_ms=86400000; thrift_framed_transport_size_in_mb=15; thrift_max_message_length_in_mb=16; thrift_prepared_statements_cache_size_mb=null; tombstone_failure_threshold=100000; tombstone_warn_threshold=1000; tracetype_query_ttl=86400; tracetype_repair_ttl=604800; transparent_data_encryption_options=org.apache.cassandra.config.TransparentDataEncryptionOptions@78b1cc93; trickle_fsync=false; trickle_fsync_interval_in_kb=10240; truncate_request_timeout_in_ms=60000; unlogged_batch_across_partitions_warn_threshold=10; user_defined_function_fail_timeout=1500; user_defined_function_warn_timeout=500; user_function_timeout_policy=die; windows_timer_interval=1; write_request_timeout_in_ms=2000]
INFO  [main] 2019-10-23 00:02:55,208 DatabaseDescriptor.java:373 - DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap
INFO  [main] 2019-10-23 00:02:55,208 DatabaseDescriptor.java:431 - Global memtable on-heap threshold is enabled at 2009MB
INFO  [main] 2019-10-23 00:02:55,208 DatabaseDescriptor.java:435 - Global memtable off-heap threshold is enabled at 2009MB
INFO  [main] 2019-10-23 00:02:55,548 RateBasedBackPressure.java:123 - Initialized back-pressure with high ratio: 0.9, factor: 5, flow: FAST, window size: 2000.
INFO  [main] 2019-10-23 00:02:55,549 DatabaseDescriptor.java:735 - Back-pressure is disabled with strategy org.apache.cassandra.net.RateBasedBackPressure{high_ratio=0.9, factor=5, flow=FAST}.
INFO  [main] 2019-10-23 00:02:56,072 JMXServerUtils.java:246 - Configured JMX server at: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:7199/jmxrmi
INFO  [main] 2019-10-23 00:02:56,092 CassandraDaemon.java:476 - Hostname: 9fb4ed8bfcfe
INFO  [main] 2019-10-23 00:02:56,092 CassandraDaemon.java:483 - JVM vendor/version: OpenJDK 64-Bit Zero VM/1.8.0_232
INFO  [main] 2019-10-23 00:02:56,093 CassandraDaemon.java:484 - Heap size: 7.850GiB/7.850GiB
INFO  [main] 2019-10-23 00:02:56,094 CassandraDaemon.java:489 - Code Cache Non-heap memory: init = 163840(160K) used = 107328(104K) committed = 163840(160K) max = 33554432(32768K)
INFO  [main] 2019-10-23 00:02:56,095 CassandraDaemon.java:489 - Metaspace Non-heap memory: init = 0(0K) used = 16879688(16484K) committed = 17350656(16944K) max = -1(-1K)
INFO  [main] 2019-10-23 00:02:56,095 CassandraDaemon.java:489 - Par Eden Space Heap memory: init = 83886080(81920K) used = 83886080(81920K) committed = 83886080(81920K) max = 83886080(81920K)
INFO  [main] 2019-10-23 00:02:56,095 CassandraDaemon.java:489 - Par Survivor Space Heap memory: init = 10485760(10240K) used = 10485736(10239K) committed = 10485760(10240K) max = 10485760(10240K)
INFO  [main] 2019-10-23 00:02:56,096 CassandraDaemon.java:489 - CMS Old Gen Heap memory: init = 8334082048(8138752K) used = 1164328(1137K) committed = 8334082048(8138752K) max = 8334082048(8138752K)
INFO  [main] 2019-10-23 00:02:56,097 CassandraDaemon.java:491 - Classpath: /etc/cassandra:/usr/share/cassandra/lib/HdrHistogram-2.1.9.jar:/usr/share/cassandra/lib/ST4-4.0.8.jar:/usr/share/cassandra/lib/airline-0.6.jar:/usr/share/cassandra/lib/antlr-runtime-3.5.2.jar:/usr/share/cassandra/lib/asm-5.0.4.jar:/usr/share/cassandra/lib/caffeine-2.2.6.jar:/usr/share/cassandra/lib/cassandra-driver-core-3.0.1-shaded.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.9.jar:/usr/share/cassandra/lib/commons-lang3-3.1.jar:/usr/share/cassandra/lib/commons-math3-3.2.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrent-trees-2.4.0.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.4.jar:/usr/share/cassandra/lib/disruptor-3.0.1.jar:/usr/share/cassandra/lib/ecj-4.4.2.jar:/usr/share/cassandra/lib/guava-18.0.jar:/usr/share/cassandra/lib/high-scale-lib-1.0.6.jar:/usr/share/cassandra/lib/hppc-0.5.4.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.13.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.13.jar:/usr/share/cassandra/lib/jamm-0.3.0.jar:/usr/share/cassandra/lib/javax.inject.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jcl-over-slf4j-1.7.7.jar:/usr/share/cassandra/lib/jctools-core-1.2.1.jar:/usr/share/cassandra/lib/jflex-1.6.0.jar:/usr/share/cassandra/lib/jna-4.2.2.jar:/usr/share/cassandra/lib/joda-time-2.4.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/jstackjunit-0.0.1.jar:/usr/share/cassandra/lib/libthrift-0.9.2.jar:/usr/share/cassandra/lib/log4j-over-slf4j-1.7.7.jar:/usr/share/cassandra/lib/logback-classic-1.1.3.jar:/usr/share/cassandra/lib/logback-core-1.1.3.jar:/usr/share/cassandra/lib/lz4-1.3.0.jar:/usr/share/cassandra/lib/metrics-core-3.1.5.jar:/usr/share/cassandra/lib/metrics-jvm-3.1.5.jar:/usr/share/cassandra/lib/metrics-logback-3.1.5.jar:/usr/share/cassandra/lib/netty-all-4.0.44.Final.jar:/usr/share/cassandra/lib/ohc-core-0.4.4.jar:/usr/share/cassandra/lib/ohc-core-j8-0.4.4.jar:/usr/share/cassandra/lib/reporter-config-base-3.0.3.jar:/usr/share/cassandra/lib/reporter-config3-3.0.3.jar:/usr/share/cassandra/lib/sigar-1.6.4.jar:/usr/share/cassandra/lib/slf4j-api-1.7.7.jar:/usr/share/cassandra/lib/snakeyaml-1.11.jar:/usr/share/cassandra/lib/snappy-java-1.1.1.7.jar:/usr/share/cassandra/lib/snowball-stemmer-1.3.0.581.1.jar:/usr/share/cassandra/lib/stream-2.5.2.jar:/usr/share/cassandra/lib/thrift-server-0.3.7.jar:/usr/share/cassandra/apache-cassandra-3.11.4.jar:/usr/share/cassandra/apache-cassandra-thrift-3.11.4.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/cassandra/stress.jar::/usr/share/cassandra/lib/jamm-0.3.0.jar
INFO  [main] 2019-10-23 00:02:56,103 CassandraDaemon.java:493 - JVM Arguments: [-XX:+IgnoreUnrecognizedVMOptions, -Xloggc:/var/log/cassandra/gc.log, -ea, -XX:+UseThreadPriorities, -XX:ThreadPriorityPolicy=42, -XX:+HeapDumpOnOutOfMemoryError, -Xss256k, -XX:StringTableSize=1000003, -XX:+AlwaysPreTouch, -XX:-UseBiasedLocking, -XX:+UseTLAB, -XX:+ResizeTLAB, -XX:+UseNUMA, -XX:+PerfDisableSharedMem, -Djava.net.preferIPv4Stack=true, -XX:+UseParNewGC, -XX:+UseConcMarkSweepGC, -XX:+CMSParallelRemarkEnabled, -XX:SurvivorRatio=8, -XX:MaxTenuringThreshold=1, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:CMSWaitDuration=10000, -XX:+CMSParallelInitialMarkEnabled, -XX:+CMSEdenChunksRecordAlways, -XX:+CMSClassUnloadingEnabled, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintHeapAtGC, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -XX:+PrintPromotionFailure, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=10, -XX:GCLogFileSize=10M, -Xms8047M, -Xmx8047M, -Xmn100M, -XX:+UseCondCardMark, -XX:CompileCommandFile=/etc/cassandra/hotspot_compiler, -javaagent:/usr/share/cassandra/lib/jamm-0.3.0.jar, -Dcassandra.jmx.local.port=7199, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/jmxremote.password, -Djava.library.path=/usr/share/cassandra/lib/sigar-bin, -Dcassandra.libjemalloc=/usr/lib/s390x-linux-gnu/libjemalloc.so.1, -XX:OnOutOfMemoryError=kill -9 %p, -Dlogback.configurationFile=logback.xml, -Dcassandra.logdir=/var/log/cassandra, -Dcassandra.storagedir=/var/lib/cassandra, -Dcassandra-foreground=yes]
ERROR [main] 2019-10-23 00:02:56,183 NativeLibraryLinux.java:64 - Failed to link the C library against JNA. Native methods will be unavailable.
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-s390x/libjnidispatch.so) not found in resource path ([file:/etc/cassandra/, file:/usr/share/cassandra/lib/HdrHistogram-2.1.9.jar, file:/usr/share/cassandra/lib/ST4-4.0.8.jar, file:/usr/share/cassandra/lib/airline-0.6.jar, file:/usr/share/cassandra/lib/antlr-runtime-3.5.2.jar, file:/usr/share/cassandra/lib/asm-5.0.4.jar, file:/usr/share/cassandra/lib/caffeine-2.2.6.jar, file:/usr/share/cassandra/lib/cassandra-driver-core-3.0.1-shaded.jar, file:/usr/share/cassandra/lib/commons-cli-1.1.jar, file:/usr/share/cassandra/lib/commons-codec-1.9.jar, file:/usr/share/cassandra/lib/commons-lang3-3.1.jar, file:/usr/share/cassandra/lib/commons-math3-3.2.jar, file:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar, file:/usr/share/cassandra/lib/concurrent-trees-2.4.0.jar, file:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.4.jar, file:/usr/share/cassandra/lib/disruptor-3.0.1.jar, file:/usr/share/cassandra/lib/ecj-4.4.2.jar, file:/usr/share/cassandra/lib/guava-18.0.jar, file:/usr/share/cassandra/lib/high-scale-lib-1.0.6.jar, file:/usr/share/cassandra/lib/hppc-0.5.4.jar, file:/usr/share/cassandra/lib/jackson-core-asl-1.9.13.jar, file:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.13.jar, file:/usr/share/cassandra/lib/jamm-0.3.0.jar, file:/usr/share/cassandra/lib/javax.inject.jar, file:/usr/share/cassandra/lib/jbcrypt-0.3m.jar, file:/usr/share/cassandra/lib/jcl-over-slf4j-1.7.7.jar, file:/usr/share/cassandra/lib/jctools-core-1.2.1.jar, file:/usr/share/cassandra/lib/jflex-1.6.0.jar, file:/usr/share/cassandra/lib/jna-4.2.2.jar, file:/usr/share/cassandra/lib/joda-time-2.4.jar, file:/usr/share/cassandra/lib/json-simple-1.1.jar, file:/usr/share/cassandra/lib/jstackjunit-0.0.1.jar, file:/usr/share/cassandra/lib/libthrift-0.9.2.jar, file:/usr/share/cassandra/lib/log4j-over-slf4j-1.7.7.jar, file:/usr/share/cassandra/lib/logback-classic-1.1.3.jar, file:/usr/share/cassandra/lib/logback-core-1.1.3.jar, file:/usr/share/cassandra/lib/lz4-1.3.0.jar, file:/usr/share/cassandra/lib/metrics-core-3.1.5.jar, file:/usr/share/cassandra/lib/metrics-jvm-3.1.5.jar, file:/usr/share/cassandra/lib/metrics-logback-3.1.5.jar, file:/usr/share/cassandra/lib/netty-all-4.0.44.Final.jar, file:/usr/share/cassandra/lib/ohc-core-0.4.4.jar, file:/usr/share/cassandra/lib/ohc-core-j8-0.4.4.jar, file:/usr/share/cassandra/lib/reporter-config-base-3.0.3.jar, file:/usr/share/cassandra/lib/reporter-config3-3.0.3.jar, file:/usr/share/cassandra/lib/sigar-1.6.4.jar, file:/usr/share/cassandra/lib/slf4j-api-1.7.7.jar, file:/usr/share/cassandra/lib/snakeyaml-1.11.jar, file:/usr/share/cassandra/lib/snappy-java-1.1.1.7.jar, file:/usr/share/cassandra/lib/snowball-stemmer-1.3.0.581.1.jar, file:/usr/share/cassandra/lib/stream-2.5.2.jar, file:/usr/share/cassandra/lib/thrift-server-0.3.7.jar, file:/usr/share/cassandra/apache-cassandra-3.11.4.jar, file:/usr/share/cassandra/apache-cassandra-thrift-3.11.4.jar, file:/usr/share/cassandra/apache-cassandra-3.11.4.jar, file:/usr/share/cassandra/stress.jar, file:/, file:/usr/share/cassandra/lib/jamm-0.3.0.jar])
	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:866) ~[jna-4.2.2.jar:4.2.2 (b0)]
	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826) ~[jna-4.2.2.jar:4.2.2 (b0)]
	at com.sun.jna.Native.<clinit>(Native.java:140) ~[jna-4.2.2.jar:4.2.2 (b0)]
	at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:84) ~[jna-4.2.2.jar:4.2.2 (b0)]
	at org.apache.cassandra.utils.NativeLibraryLinux.<clinit>(NativeLibraryLinux.java:55) ~[apache-cassandra-3.11.4.jar:3.11.4]
	at org.apache.cassandra.utils.NativeLibrary.<clinit>(NativeLibrary.java:93) [apache-cassandra-3.11.4.jar:3.11.4]
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:196) [apache-cassandra-3.11.4.jar:3.11.4]
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:620) [apache-cassandra-3.11.4.jar:3.11.4]
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:732) [apache-cassandra-3.11.4.jar:3.11.4]
INFO  [main] 2019-10-23 00:02:56,187 StartupChecks.java:140 - jemalloc seems to be preloaded from /usr/lib/s390x-linux-gnu/libjemalloc.so.1
WARN  [main] 2019-10-23 00:02:56,188 StartupChecks.java:169 - JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info.
ERROR [main] 2019-10-23 00:02:56,192 CassandraDaemon.java:749 - The native library could not be initialized properly. 

@PeterYHChen
Copy link
Author

@tianon if you read https://github.com/linux-on-ibm-z/docs/wiki/Building-Apache-Cassandra-3.11, the Step 2 mention to replace snappy java and jna to those that supports s390x. Have you tried it?

  • Replace Snappy-Java
cd $SOURCE_ROOT/cassandra
rm lib/snappy-java-1.1.1.7.jar
wget -O lib/snappy-java-1.1.2.6.jar http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2.6/snappy-java-1.1.2.6.jar 
  • Build and replace JNA
cd $SOURCE_ROOT/
git clone https://github.com/java-native-access/jna.git
cd jna
git checkout 4.2.2
ant
rm $SOURCE_ROOT/cassandra/lib/jna-4.2.2.jar
cp build/jna.jar $SOURCE_ROOT/cassandra/lib/jna-4.2.2.jar

@PeterYHChen
Copy link
Author

What I did is like running this script

wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/ApacheCassandra/3.11.4/build_cassandra.sh

# Build Cassandra
bash build_cassandra.sh   [Provide -t option for executing build with tests]

and copy the jna file out directly instead of doing all the detail steps.

@yosifkit
Copy link
Member

The problem with that is that we don't currently build cassandra from source in the images since upstream provides apt packaging at http://www.apache.org/dist/cassandra/debian. We do manually download and install the Architecture: all deb files directly on some architectures that the apt repo doesn't list.

case "$dpkgArch" in \
amd64|i386) \
# arches officialy included in upstream's repo metadata
echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' > /etc/apt/sources.list.d/cassandra.list; \
apt-get update; \
;; \
*) \
# we're on an architecture upstream doesn't include in their repo Architectures
# but their provided packages are "Architecture: all" so we can download them directly instead
\
# save a list of installed packages so build deps can be removed cleanly
savedAptMark="$(apt-mark showmanual)"; \
\
# fetch a few build dependencies
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates \
dpkg-dev \
; \
# we don't remove APT lists here because they get re-downloaded and removed later
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies)
apt-mark showmanual | xargs apt-mark auto > /dev/null; \
apt-mark manual $savedAptMark; \
\
# download the two "arch: all" packages we need
tempDir="$(mktemp -d)"; \
for pkg in cassandra cassandra-tools; do \
deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \
wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \
done; \
\
# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be)
ls -lAFh "$tempDir"; \
( cd "$tempDir" && dpkg-scanpackages . > Packages ); \
grep '^Package: ' "$tempDir/Packages"; \
echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \
# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes")
# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
# ...
# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied)
apt-get -o Acquire::GzipIndexes=false update; \
;; \
esac; \
\
apt-get install -y \
cassandra="$CASSANDRA_VERSION" \
cassandra-tools="$CASSANDRA_VERSION" \
; \

@tianon
Copy link
Member

tianon commented May 31, 2022

I've tested this again and thanks to #238 (and possibly Cassandra upstream changes?) this now works fine on 4.0! I'll be pushing a commit shortly.

@tianon tianon closed this as completed in dee264d May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants