CentOS7执行yum升级后启动R3 Corda demobench节点触发std::bad_cast及core dump求助
std::bad_cast Error in Corda Demobench After CentOS 7 yum upgrade Hey Rob, sorry to hear you're stuck with this frustrating error after updating your CentOS 7 system—this is almost certainly a compatibility clash between the upgraded system libraries and Corda Demobench's underlying binaries. Let's walk through some practical steps to get your nodes running again:
Check and revert to a compatible Java version
Most public Corda Demobench releases rely specifically on OpenJDK 8. Ayum upgrademight have bumped your Java to a newer, incompatible version. First, confirm your current Java setup with:java -versionIf it's not OpenJDK 8, use CentOS's alternatives system to switch back:
sudo alternatives --config javaSelect the OpenJDK 8 option from the list, restart Demobench, and try launching the node again.
Reinstall Demobench and verify system C++ libraries
Thestd::bad_casterror points to a C++ type mismatch, which often happens when libraries likelibstdc++get updated to a version Demobench doesn't support. Uninstall your current Demobench instance, then download the latest CentOS 7-specific release. Before reinstalling, check yourlibstdc++version:rpm -q libstdc++If the version is newer than what Demobench expects, you may need to install a compatible older version (note: be cautious with downgrading system libraries—only do this if you're sure it won't break other apps on your system).
Clear cached node data and start fresh
Old node configurations or cached files from pre-upgrade might conflict with the new system environment. Stop Demobench completely, then delete the node data directory (usually located at~/.corda/demobenchor within your Demobench installation'snodesfolder). Launch Demobench again and create a brand-new node—this eliminates any leftover incompatibilities from your previous setup.Double-check system environment variables
Make sure theyum upgradedidn't alter critical environment variables. Verify thatJAVA_HOMEpoints to your OpenJDK 8 installation:echo $JAVA_HOMEIf it's set incorrectly, update it in your
~/.bashrcor/etc/profilefile, source the file withsource ~/.bashrc, and restart your terminal before running Demobench.
内容的提问来源于stack exchange,提问作者Rob Morton

