问题:Moodle in English: Found more than one record in fetch()

解决:可能是网络问题,数据库表grade_categories产生了一条重复数据,导致课程无法删除、无法添加内容、无法查看成绩

方法:

查找数据表中课程id=77的grade_categories
select * from mdl_grade_categories where course_id=77;
删除重复的数据,只保留一条
delete from mdl_grade_categories where id=75;
这样就可以在网站操作此课程了

问题:hive on spark在测试安装时,报错:FAILED: Execution Error, return code 30041 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to create Spark client for Spark session 62ef334c-f6c4-46fe-b3ea-19f359defbe8

解决:可能是服务器内存不足导致,可以配置hive-site.xml文件,增加hive连接spark时间

方法:

vim hive/conf/hive-site.xml 增加下面配置

<!--Hive和spark连接超时时间-->
<property>
    <name>hive.spark.client.connect.timeout</name>
    <value>100000ms</value>
</property>

拓展:

之前因为把历史服务器和日志服务器放在hadoop02上,与yarn同一台服务器,也出现了这个问题

阅读全文

问题:在python3.9环境下,使用pip安装dogpile.cache模块时报错ImportError: cannot import name 'Lock' from 'dogpile'

解决:在python3.5环境下不会出现此问题,开始以为是python版本的问题,后来发现安装时提示了not install wheel,所以只需要安装wheel即可。也可能是dogpile.core与dogpile.cache冲突,删除dogpile.core即可。

方法:

windows安装 python3.9
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip wheel
.\.venv\Scripts\pip3.9.exe install -r setup/requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
.\.venv\Scripts\pip.exe uninstall dogpile.core

阅读全文

问题:nginx日志中出现了大量其它网站的网址,请求都返回404

解决:nginx配置文件需要更改

方法:

在nginx的配置文件中加上

if ($host !~ '^it.xiaomantu.com$'){
    return 444;
}

出现这种问题的原因是你的服务器被别人用来做代理了,只需要禁止除你的网址其它网址都直接返回错误码,就不会现在在日志中了

阅读全文

问题:Android Studio build打包apk时,需要生成签名,生成签名时报错:警告: PKCS12 密钥库不支持其他存储和密钥口令。正在忽略用户指定的-keypass值

解决:签名的密码和key的密码要一致

方法:

1、选择签名存放路径及签名名称

2、输出签名密码、确认密码

3、设置别名

4、输入别名密码、确认密码(这四个密码要一致,我之前就是设置成两个密码报错的)

5、设置开发者名