Apache Artemis-libartemis-native-64.so交付与手动创建-都是相同的

问题描述

Apache Artemis tar.gz附带了一个bin/lib/linux-x86_64/libartemis-native-64.so,直到我手动使用本机源创建该.so文件时我才意识到。

问题:

  • tar附带了一个libartemis-native-64.so-与从运行代理的特定Linux盒上的源代码生成的代码有什么不同吗?
  • 我可以使用tar.gz随附的libartemis-native-64.so本机库吗?
  • 生成的本机lib与交付的本机lib的大小不同。
  • 如果我们需要使用生成的本机库,是否需要简单地替换$ ARTEMIS_HOME / bin / lib / linux *位置下的库?
  • 最后,如何验证代理是否使用了本机库,就我而言,我在日志上看不到任何信息。只看到使用AIO消息。
2020-08-14 12:24:16,226 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2020-08-14 12:24:16,269 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2020-08-14 12:24:16,662 INFO  [org.apache.activemq.artemis.core.server] AMQ221055: There were too many old replicated folders upon startup,removing /brokers/broker1/data/bindings/oldreplica.1
2020-08-14 12:24:16,663 INFO  [org.apache.activemq.artemis.core.server] AMQ222162: Moving data directory /brokers/broker1/data/bindings to /brokers/broker1/data/bindings/oldreplica.3
2020-08-14 12:24:16,667 INFO  [org.apache.activemq.artemis.core.server] AMQ221055: There were too many old replicated folders upon startup,removing /brokers/broker1/data/journal/oldreplica.1
2020-08-14 12:24:16,671 INFO  [org.apache.activemq.artemis.core.server] AMQ222162: Moving data directory /brokers/broker1/data/journal to /brokers/broker1/data/journal/oldreplica.3
2020-08-14 12:24:16,673 INFO  [org.apache.activemq.artemis.core.server] AMQ221055: There were too many old replicated folders upon startup,removing /brokers/broker1/data/paging/oldreplica.1
2020-08-14 12:24:16,674 INFO  [org.apache.activemq.artemis.core.server] AMQ222162: Moving data directory /brokers/broker1/data/paging to /brokers/broker1/data/paging/oldreplica.3
2020-08-14 12:24:16,703 INFO  [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
2020-08-14 12:24:16,706 WARN  [org.apache.activemq.artemis.core.server] AMQ222007: Security risk! Apache ActiveMQ Artemis is running with the default cluster admin user and default password. Please see the cluster chapter in the ActiveMQ Artemis User Guide for instructions on how to change this.
2020-08-14 12:24:16,716 INFO  [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 2,147,483,648
2020-08-14 12:24:16,763 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2020-08-14 12:24:16,763 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP

下面是我遵循的步骤,以防万一。

  • Link下载了本机源文件

  • 按照文档中所述更新了Linux VM(RHEL dist)中的最新软件包

$ sudo yum install libtool gcc-c++ gcc libaio libaio-devel make
  • 将代码提取到apache-artemis-native-1.0.2文件夹中,该文件夹在以下命令中用于创建.so文件。
  $ ./scripts/compile-native.sh
  // This command threw compilation error for missing gnu/stubs.h (which i think is 32-bit dependency)

以上命令在target /文件夹上创建了libartemis-native-64.so。 (由于编译错误,未创建32位库)

  • 我正在研究在borker实例上将此库设置为java.library.path的方法。
  • 在broker1 / bin / artemis shell脚本中引用了java.library.path,指向artemis-2.14.0(提取的tar.gz位置)bin / lib路径。
  • 我将libartemis-nativie-64.so复制到了此位置,假定它将由代理实例拾取。

下面是broker-instance broker1 / bin / artemis内容的内容。

exec "$JAVACMD" \
    $JAVA_ARGS \
    -Xbootclasspath/a:"$LOG_MANAGER:$WILDFLY_COMMON" \
    -Djava.security.auth.login.config="$ARTEMIS_INSTANCE_ETC/login.config" \
    $ARTEMIS_CLUSTER_PROPS \
    -classpath "$CLASSPATH" \
    -Dartemis.home="$ARTEMIS_HOME" \
    -Dartemis.instance="$ARTEMIS_INSTANCE" \
    -Djava.library.path="$ARTEMIS_HOME/bin/lib/linux-$(uname -m)" \
    -Djava.io.tmpdir="$ARTEMIS_INSTANCE/tmp" \
    -Ddata.dir="$ARTEMIS_DATA_DIR" \
    -Dartemis.instance.etc="$ARTEMIS_INSTANCE_ETC" \
    -Djava.util.logging.manager="$ARTEMIS_LOG_MANAGER" \
    -Dlogging.configuration="$ARTEMIS_LOGGING_CONF" \
    $DEBUG_ARGS \
    org.apache.activemq.artemis.boot.Artemis "$@"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...