异常信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (default) on project ranger: Too many files with unapproved license: 1 See RAT report in: /home/zhangjc/ysten/git/apache-ranger-1.2.0/target/rat.txt -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (default) on project ranger: Too many files with unapproved license: 1 See RAT report in: /home/zhangjc/ysten/git/apache-ranger-1.2.0/target/rat.txt
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

解决方法:增加-Drat.skip=true参数 ,跳过licensing检查。

阅读全文 »

直接上配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
server {
server_name 192.168.72.31;
listen 8001;

charset utf-8;

proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;

location / {
proxy_set_header Host $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;

proxy_pass http://hue;
}
}

upstream hue {
hash $cookie_sessionid;

server 192.168.72.22:8888 max_fails=3;
server 192.168.72.31:8888 max_fails=3;
}

重点是调整upstream hash的策略。因为Hue是需要保持session的,同一个session的请求需要发送到同一台后端服务器上。简单的可以采用ip_hash策略,这个策略存在两个重要的问题:

阅读全文 »

如果使用开发分支代码如master分支)编译安装,需要自己编译语言文件。例如Hue安装目录为“/opt/hue”,则安装后执行以下命令:

1
2
$ cd /opt/hue
$ make locales

如果需要则重启Hue即可。是否需要重启我没有验证:)

阅读全文 »

在编译Hue的时候出现错误信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Running '/home/zhangjc/ysten/git/ysten-hue/build/env/bin/hue makemigrations --noinput' with None
Traceback (most recent call last):
File "/home/zhangjc/ysten/git/ysten-hue/build/env/bin/hue", line 33, in <module>
sys.exit(load_entry_point('desktop', 'console_scripts', 'hue')())
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/manage_entry.py", line 225, in entry
execute_from_command_line(sys.argv)
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/site-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models()
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/home/zhangjc/ysten/git/ysten-hue/build/env/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/models.py", line 47, in <module>
from useradmin.models import User, Group, get_organization
File "/home/zhangjc/ysten/git/ysten-hue/apps/useradmin/src/useradmin/models.py", line 56, in <module>
from desktop.lib.connectors.models import _get_installed_connectors, Connector
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/connectors/models.py", line 29, in <module>
from desktop.lib.connectors.types import get_connectors_types
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/connectors/types.py", line 24, in <module>
from desktop.lib.exceptions_renderable import PopupException
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/exceptions_renderable.py", line 31, in <module>
import desktop.lib.django_util
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/django_util.py", line 42, in <module>
import desktop.lib.thrift_util
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/thrift_util.py", line 49, in <module>
from desktop.lib.thrift_.http_client import THttpClient
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/thrift_/http_client.py", line 26, in <module>
from desktop.lib.rest.http_client import HttpClient
File "/home/zhangjc/ysten/git/ysten-hue/desktop/core/src/desktop/lib/rest/http_client.py", line 32, in <module>
from urllib3.contrib import pyopenssl
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 62, in <module>
from ..packages import six
ImportError: cannot import name 'six' from 'urllib3.packages' (/usr/lib/python3/dist-packages/urllib3/packages/__init__.py)

错误原因:根据错误信息可以看到是“/usr/lib/python3/dist-packages/urllib3”这个包的问题。正确的应该是引用“build/env/lib/python3.7/site-packages/”下的包。查看”/usr/lib/python3/dist-packages/urllib3”下的包信息,发现包版本比较低。

阅读全文 »

自定义安装Python3后在命令行使用方向键时出现以下问题:

1
2
3
4
5
$ python3
Python 3.7.4 (default, Dec 11 2019, 17:40:08)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ^[[A^[[B^[[C^[[D

解决方法是安装readline:

阅读全文 »

例如如下错误:

1
2
3
4
5
6
7
$ python3 git.py 
Traceback (most recent call last):
File "git.py", line 1, in <module>
from git import Repo
File "/home/a/git.py", line 1, in <module>
from git import Repo
ImportError: cannot import name 'Repo' from 'git' (/home/a/git.py)

这种错误基本都是因为Python脚本的名称与模块的名称重复导致的。像我这个例子中就是因为git.pyGitPython模块中的文件名一样导致的。

阅读全文 »

本次问题解决纯属蒙对了,原理不清楚。

当我从一台CentOS 7.3的服务器通过ssh登录另外一台CentOS 6.8的服务器时出现以下错误信息:

1
2
[root@192-168-72-75 .ssh]# ssh -p65522 bddev@192.168.72.208
no matching cipher found: client arcfour server chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
阅读全文 »

默认打开中断后字体显示如下:VS 字体设置前效果

打开设置,搜索配置项terminal.integrated.fontFamily,修改配置为monospace。修改后效果如下:VS 字体设置后效果

在CentOS7.4中通过源码的方式安装Requests时,报错信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# pip3 install .
Processing /data/setup/psf-requests-fab1fd1
ERROR: Command errored out with exit status 1:
command: /opt/Python-3.7.2/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-nuwyypgj/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-nuwyypgj/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /tmp/pip-req-build-nuwyypgj/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/Python-3.7.2/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
from setuptools.dist import Distribution, Feature
File "/opt/Python-3.7.2/lib/python3.7/site-packages/setuptools/dist.py", line 31, in <module>
from setuptools import windows_support
File "/opt/Python-3.7.2/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/opt/Python-3.7.2/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.5: cannot open shared object file: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

其实在CentOS7.4下已经存在libffi.so.6,解决方法是创建软连接,如下:

阅读全文 »
0%