您的位置:首页 > 运维架构

Storm的编译问题

2018-03-23 09:18 134 查看

Storm的编译问题

在power机器上编译Storm的时候遇到以下问题:

gpg: no default secret key: Bad passphrase
gpg: signing failed: Bad passphrase
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.752 s
[INFO] Finished at: 2018-03-21T15:36:48+08:00
[INFO] Final Memory: 17M/320M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (default) on project apache-storm-bin: Exit code: 2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException error: Bad exit status from /var/tmp/rpm-tmp.o8C8Ug (%build)


经过观察错误信息发现是由于再编译Storm的时候需要使用到gpg加密,解决方法如下:

[root@power bigtop]# gpg --gen-key
gpg (GnuPG) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection?
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
<n>  = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct? (y/N) y

GnuPG needs to construct a user ID to identify your key.

Real name: zhaoshuai
Email address: zhaoshuai@redoop.com
Comment: gpg
You selected this USER-ID:
"zhaoshuai (gpg) <zhaoshuai@redoop.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Enter passphrase                                    x
x                                                     x
x                                                     x
x Passphrase 输入密码 ________________________________________ x
x                                                     x
x       <OK>                             <Cancel>     x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: key C3B7C89E marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   3  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 3u
pub   2048R/C3B7C89E 2018-03-21
Key fingerprint = 7941 2EAF 88F7 D72F 10A5  0765 611A 7414 C3B7 C89E
uid                  zhaoshuai (gpg) <zhaoshuai@redoop.com>
sub   2048R/90B99D38 2018-03-21


执行完上述操作后在bigtop/bigtop-packages/src/common/storm修改do-component-build文件

set -e

echo "-------------- Storm-do-component-build-started -----------"

base_path=`pwd`
build_support_dir=`echo ${base_path%bigtop*}`

. `dirname $0`/bigtop.bom

mvn clean install -DskipTests "$@"

cd ${base_path}
cd storm-dist/binary/
mvn package -Dgpg.passphrase=您的密码 "$@"

cd ${base_path}
cd storm-dist/source/
mvn package -Dgpg.passphrase=您的密码 "$@"


更多精彩文章,详见红象云腾社区
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  CRH Redoop Storm