我试图在此guide之后安装cygnus-common,但是创建cygnus-common jar(包括依赖项)总是会产生一个空jar。 Apache-Flume安装没有任何问题。我已按照指南尝试增加Maven JVM的内存,但这并没有帮助。
~/fiware-cygnus/cygnus-common$ mvn clean compile exec:exec
assembly:single
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-common 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cygnus-common ---
[INFO] Deleting /home/cygnus/fiware-cygnus/cygnus-common/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cygnus-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cygnus-common ---
[INFO] Compiling 50 source files to /home/cygnus/fiware-cygnus/cygnus-common/target/classes
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ cygnus-common ---
[INFO]
[INFO] --- maven-assembly-plugin:2.6:single (default-cli) @ cygnus-common ---
[INFO] Building jar: /home/cygnus/fiware-cygnus/cygnus-common/target/cygnus-common-1.1.0-jar-with-dependencies.jar
Killed
这里是结果文件
~/fiware-cygnus/cygnus-common$ ls -lrth target/
total 12K
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 generated-sources
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 classes
drwxrwxr-x 2 cygnus cygnus 4.0K Jun 13 14:57 archive-tmp
-rw-rw-r-- 1 cygnus cygnus 0 Jun 13 14:58 cygnus-common-1.1.0-jar-with-dependencies.jar
之前曾询问类似的question,未记录任何解决方案。针对该问题的唯一建议是缺少磁盘空间,内存或权限。磁盘空间绝对不是问题,我增加了Maven JVM的内存,并且用户拥有正确的权限。
修改
所以我按照@frb的建议在调试模式下运行mvn compile
,这是内存问题
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 257024000 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2827), pid=48868, tid=140567873734400
[1]: http://fiware-cygnus.readthedocs.io/en/latest/cygnus-common/installation_and_administration_guide/install_from_sources/index.html#section3 "guide"
使用top
我可以看到当进程被杀死时内存使用率超过70%。该系统具有~1.7Gb,远高于规定的requirements,并且它是64位系统。
我将系统内存增加到3Gb并且构建成功,因此硬件要求可能会更新吗?
答案 0 :(得分:1)
将系统内存增加到3Gb解决了这个问题,并且jar已成功创建。