Closed Aqualon closed 3 years ago
What does echo $JAVA_HOME
say on your system?
This variable is not set on my system.
EDIT: Tried running it via JAVA_HOME=/usr/local/Cellar/openjdk@8/1.8.0+275/ cassandra -f
and it also fails with the same crash.
Try setting the JAVA_HOME
variable to the install location of the adoptopenjdk cask
JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home cassandra -f
starts cassandra fine
As workaround to still be able to use brew services
I edited /usr/local/Cellar/cassandra/3.11.9_1/homebrew.mxcl.cassandra.plist
file to contain (UPDATE: the really working version setting JAVA_HOME
env variable the correct way.)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.cassandra</string>
<key>EnvironmentVariables</key>
<dict>
<key>JAVA_HOME</key>
<string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/cassandra/bin/cassandra</string>
<string>-f</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local/var/lib/cassandra</string>
</dict>
</plist>
This should at least persist until a cassandra update gets installed.
can you teach me step by step to fix that, i installed Cassandra and had "64-Bit Server VM warning: Cannot open file /usr/local/Cellar/cassandra/3.11.9_1/libexec/logs/gc.log due to No such file or directory" when started cassandra. I set JAVA_HOME, edit file homebrew.mxcl.cassandra.plist, but it still did'nt work, pls help me
@tranvuongthien that's just a warning and no error, whats the output of JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home cassandra -f
for you? In the end it should say something like INFO [main] 2021-01-07 09:47:19,541 CassandraDaemon.java:650 - Startup complete
Have the same error on Apple Silicon.
Not quite as relevant, since Cassandra is not yet bottled for ARM, and therefore not supported. In fact, no openjdk
-based formulae are supported yet for ARM.
Hopefully, that'll be rectified soon, though: https://github.com/Homebrew/homebrew-core/pull/65670
But Azul Zulu already works brilliant on M1. Can we temporary replace openjdk@8 dependency with zulu@8 ?
Not in homebrew/core. That's discussed somewhere in this thread: https://github.com/Homebrew/brew/issues/7857
Same problem still there with cassandra 3.11.10 and openjdk 1.8.0+282.
I tried to install suggested as brew install --build-from-source cassandra It successfully installed, but I cannot start cassandra after the installation. I dont know if i am missing something or anybody having the same issue?
@MacBook-Pro ~ % brew install --build-from-source cassandra
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/9976a
Already downloaded: /Users/arrennbaral/Library/Caches/Homebrew/downloads/d8844da849e8898f5db143aabb6f28de2d5fe7e8d124afaa3c543a5d54b3163d--xcode.patch
==> Downloading https://cdn.azul.com/zulu/bin/zulu7.42.0.13-ca-jdk7.0.282-macosx
Already downloaded: /Users/arrennbaral/Library/Caches/Homebrew/downloads/4b249391d5268af07ee53bf92b453584ae6ed2ba6680bc5a22a6179a6cdd3f74--zulu7.42.0.13-ca-jdk7.0.282-macosx_x64.tar.gz
==> Downloading https://openjdk-sources.osci.io/openjdk8/openjdk8u282-ga.tar.xz
Already downloaded: /Users/arrennbaral/Library/Caches/Homebrew/downloads/ada8bfa0597910ef687e1b313915c0b3d81d0a75babe0de6d9e0a889b7d4caf8--openjdk8u282-ga.tar.xz
==> Downloading https://files.pythonhosted.org/packages/b2/40/4e00501c204b457f10
Already downloaded: /Users/Library/Caches/Homebrew/downloads/96184832975d570c3f54c37496b73256589ffb7c33c65edc3542bc2b474b6951--setuptools-44.1.1.zip
==> Downloading https://files.pythonhosted.org/packages/47/04/5fc6c74ad114032cd2
Already downloaded: /Users//Library/Caches/Homebrew/downloads/991138ddcf40267021cd87f35a0573287201a890bd378ccdbb122b50334b258d--futures-3.3.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f4
Already downloaded: /Users/l/Library/Caches/Homebrew/downloads/e99698a932bde9f5fb8ca552923ae339984f284e1c7764df95c12175f573c0d7--six-1.15.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/ae/58/35e3f0cd290039ff86
Already downloaded: /Users//Library/Caches/Homebrew/downloads/e27d635b5d2d6c3612e7f8b8a20f7fcbe75427972caaf8809ef2ac7bbf905be2--thrift-0.9.3.tar.gz
==> Downloading https://files.pythonhosted.org/packages/0b/15/523f6008d32f05dd3c
Already downloaded: /Users//Library/Caches/Homebrew/downloads/e85631dbbf140427c0cd27288ef13e53dc194138dd4dbb7161a61fb175c1817e--cql-1.4.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/cd/22/7bf65cfd5d60f3c916
Already downloaded: /Users//Library/Caches/Homebrew/downloads/f6e2fcb9e1a53ce4304530294a61f7923d764f17e78a02d873f4203342cd2c88--cassandra-driver-3.24.0.tar.gz
==> Downloading https://www.apache.org/dyn/closer.lua?path=cassandra/3.11.10/apa
==> Downloading from https://mirrors.gigenet.com/apache/cassandra/3.11.10/apache
######################################################################## 100.0%
==> Installing dependencies for cassandra: openjdk@8
==> Installing cassandra dependency: openjdk@8
==> Patching
==> Applying xcode.patch
patching file common/autoconf/basics.m4
patching file common/autoconf/flags.m4
patching file common/autoconf/generated-configure.sh
Hunk #1 succeeded at 1897 (offset 2 lines).
Hunk #2 succeeded at 14009 (offset 1 line).
Hunk #3 succeeded at 26774 (offset 23 lines).
Hunk #4 succeeded at 26837 (offset 23 lines).
Hunk #5 succeeded at 41295 (offset 23 lines).
Hunk #6 succeeded at 41394 (offset 23 lines).
Hunk #7 succeeded at 41420 (offset 23 lines).
Hunk #8 succeeded at 41485 (offset 23 lines).
Hunk #9 succeeded at 42170 (offset 23 lines).
Hunk #10 succeeded at 42259 (offset 23 lines).
Hunk #11 succeeded at 48934 (offset 23 lines).
patching file common/autoconf/libraries.m4
patching file common/autoconf/platform.m4
patching file common/autoconf/toolchain.m4
patching file hotspot/make/bsd/makefiles/gcc.make
patching file hotspot/make/bsd/makefiles/jsig.make
patching file hotspot/src/os/aix/vm/decoder_aix.hpp
patching file hotspot/src/os/bsd/vm/decoder_machO.hpp
patching file hotspot/src/os/windows/vm/decoder_windows.hpp
patching file hotspot/src/share/vm/classfile/classLoader.hpp
patching file hotspot/src/share/vm/prims/jvmtiImpl.hpp
patching file hotspot/src/share/vm/runtime/perfData.hpp
patching file hotspot/src/share/vm/utilities/decoder.hpp
patching file hotspot/src/share/vm/utilities/decoder_elf.hpp
patching file jdk/make/lib/CoreLibraries.gmk
Hunk #1 succeeded at 409 (offset -1 lines).
Hunk #2 succeeded at 443 (offset -1 lines).
Hunk #3 succeeded at 504 (offset -1 lines).
patching file jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m
==> common/autoconf/autogen.sh
==> ./configure --with-boot-jdk-jvmargs=-Duser.home=/Users/arrennbaral/Library/C
Last 15 lines from /Users/arrennbaral/Library/Logs/Homebrew/openjdk@8/02.configure:
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking size of int *... 8
configure: The tested number of bits in the target (64) differs from the number of bits expected to be found in the target (32).
configure: I'll retry after setting the platforms compiler target bits flag to -m32
checking size of int *... 0
configure: error: The tested number of bits in the target (0) differs from the number of bits expected to be found in the target (32)
configure exiting with result code 1
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
openjdk 15.0.2 https://github.com/Homebrew/homebrew-core/pull/69460
openjdk@11 11.0.10 https://github.com/Homebrew/homebrew-core/pull/69396
OpenJDK post-install fails without Xcode on M1 https://github.com/Homebrew/homebrew-core/issues/69100
Cassandra 3.11.9_1 crashes in openjdk@8 JVM https://github.com/Homebrew/homebrew-core/issues/66462
OpenJDK is somewhat broken on newer MacOS instances, console is flooded with errors when using JMeter, AdoptOpenJDK has no issues https://github.com/Homebrew/homebrew-core/issues/66953
----------------------------------------------------------
@MacBook-Pro ~ % brew services start cassandra
Error: Formula `cassandra` is not installed.
Yeah, it fails to install. Until it gets proper ARM support in Cassandra and all dependencies there's nothing we can do.
Oh, I see. Thanks for your response.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs cassandra
https://gist.github.com/Aqualon/a4ee11ae1f5177b3116e9440dfea72e5brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
Running cassandra after update to 3.11.9_1 with newly introduced dependency to openjdk@8 #65581
What happened (include command output)
cassandra -f does not start with JVM crash
Command output
What you expected to happen
Cassandra should start normally
Step-by-step reproduction instructions (by running
brew install
commands)Before I had adoptopenjdk8 installed, which ran fine with cassandra 3.11.9. I also went back to cassandra 3.11.9 alone (reverting https://github.com/Homebrew/homebrew-core/commit/b59b446c7c5b7f78cd370c2f34c2e86b4988969b#diff-bd813e04e8768fa9fd61b68856a7700b49e6c8d4ee47db3aeaed43ad3bfc2a42) and it didn't work, but if I went to before openjdk@8 was introduced by also reverting https://github.com/Homebrew/homebrew-core/commit/7124a8e8f3eea250bab6a70a35224056ae0be217#diff-bd813e04e8768fa9fd61b68856a7700b49e6c8d4ee47db3aeaed43ad3bfc2a42 it works again.