library initialization failed - unable to allocate file descriptor table - out of memorylibrary
initialization failed - unable to allocate file descriptor table - out of memory
在这里记录下解决方案。
通过重写 Docker 的 ExecStart 的参数解决
sudo systemctl edit docker
进入后,添加或者修改对应参数
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --default-ulimit nofile=65536:65536 -H fd://
最后重启 Docker
sudo systemctl daemon-reload
sudo systemctl restart docker
]]>ssh-keygen -t rsa -C "email"
生成密钥,在 coding
添加公钥后 clone 代码出现如下问题git@e.coding.net: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
将密钥复制到本地电脑上进行测试,发现可以成功 clone 项目。
通过搜索发现 csdn 没有一个答案能解决问题(全是重复的文章),最后在国外网站找到了解决办法
不使用 rsa 算法生成密钥,使用更安全的 ECDSA 或 ED25519 生成
ssh-keygen -t ed25519 -C "email"
在 coding
重新添加后,成功 clone 了项目。感觉可能是 OpenSSH 版本问题,有时间再测测看。
Prop being mutated: "placement"
警告,完整警告:[Vue warn]: Avoid mutating a prop directly since the value will be
overwritten whenever the parent component re-renders.
Instead, use a data or computed property based on the prop's value.
Prop being mutated: "placement"
锁定组件,发现是 el-date-picker 组件抛出的警告。通过在 github 上搜索,最终找到了答案
问题出在了这个 PR #21806 增加了 props placement 用来适应位置,但是之前的代码 created 时有给 placement 赋值。
this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;
说白了之前 placement 是 data 的对象,现在变成 props 了,然后修改就报错了
想要解决这个问题,可以修改版本到 2.15.8
npm uninstall element-ui
npm install element-ui@2.15.8 -s
]]>是 jenkins 远程执行 java -jar 的时候报错:
nohup: failed to run command 'java': No such file or directory
java 程序也不能成功运行
在执行脚本前先执行 source /etc/profile
刷新环境变量。
source /etc/profile && nohup java -jar **.jar > nohup.out 2>&1 &
参考:https://blog.csdn.net/u013189824/article/details/85338221
解决完第一个问题后,出现 jenkins 部署不会自动停止的问题,只能等 jenkins 超时退出。虽然远程服务器 java 进程成功启动了,但是 jenkins 都是不稳定的构建。
ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 120,000 ms]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
通过从网上整合资料,终于是找到了解决办法,解决办法可以参考我的配置
source /etc/profile
cd /home/eladmin
BUILD_ID=DONTKILLME
nohup bash /home/eladmin/start.sh
点击高级,勾选 pty
参考: https://blog.51cto.com/u_15316348/3217477 、 https://blog.csdn.net/sinat_29821865/article/details/119906879
再次构建,完美解决
]]>eladmin
项目部分依赖更新了下,其中 sass
版本号更新为 1.43.4
后出现了如下问题,项目能启动,但是伴随大量警告具体错误如下
INFO Starting development server...
10% building 2/2 modules 0 activeℹ 「wds」: Project is running at http://localhost:8013/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/jie/Documents/work/me/front/eladmin-web/public
ℹ 「wds」: 404s will fallback to /index.html 40% building 150/198 modules 48 active ...ules/element-ui/lib/mixins/migrating.jsDeprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(1, 5)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
489 │ $--group-option-flex: 0 0 (1/5) * 100% !default;
│ ^^^
╵
node_modules/element-ui/packages/theme-chalk/src/common/var.scss 489:28 @import
node_modules/element-ui/packages/theme-chalk/src/common/transition.scss 1:9 @import
node_modules/element-ui/packages/theme-chalk/src/base.scss 1:9 @import
node_modules/element-ui/packages/theme-chalk/src/index.scss 1:9 @import
src/assets/styles/element-variables.scss 25:9 root stylesheet
Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($--tooltip-arrow-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
32 │ margin-right: #{$--tooltip-arrow-size / 2};
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/element-ui/packages/theme-chalk/src/popper.scss 32:21 @content
node_modules/element-ui/packages/theme-chalk/src/mixins/mixins.scss 74:5 b()
node_modules/element-ui/packages/theme-chalk/src/popper.scss 4:1 @import
node_modules/element-ui/packages/theme-chalk/src/select-dropdown.scss 3:9 @import
node_modules/element-ui/packages/theme-chalk/src/select.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/pagination.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/index.scss 2:9 @import
src/assets/styles/element-variables.scss 25:9 root stylesheet
Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($--tooltip-arrow-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
51 │ margin-right: #{$--tooltip-arrow-size / 2};
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/element-ui/packages/theme-chalk/src/popper.scss 51:21 @content
node_modules/element-ui/packages/theme-chalk/src/mixins/mixins.scss 74:5 b()
node_modules/element-ui/packages/theme-chalk/src/popper.scss 4:1 @import
node_modules/element-ui/packages/theme-chalk/src/select-dropdown.scss 3:9 @import
node_modules/element-ui/packages/theme-chalk/src/select.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/pagination.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/index.scss 2:9 @import
src/assets/styles/element-variables.scss 25:9 root stylesheet
Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($--tooltip-arrow-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
70 │ margin-bottom: #{$--tooltip-arrow-size / 2};
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/element-ui/packages/theme-chalk/src/popper.scss 70:22 @content
node_modules/element-ui/packages/theme-chalk/src/mixins/mixins.scss 74:5 b()
node_modules/element-ui/packages/theme-chalk/src/popper.scss 4:1 @import
node_modules/element-ui/packages/theme-chalk/src/select-dropdown.scss 3:9 @import
node_modules/element-ui/packages/theme-chalk/src/select.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/pagination.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/index.scss 2:9 @import
src/assets/styles/element-variables.scss 25:9 root stylesheet
Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($--tooltip-arrow-size, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
89 │ margin-bottom: #{$--tooltip-arrow-size / 2};
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/element-ui/packages/theme-chalk/src/popper.scss 89:22 @content
node_modules/element-ui/packages/theme-chalk/src/mixins/mixins.scss 74:5 b()
node_modules/element-ui/packages/theme-chalk/src/popper.scss 4:1 @import
node_modules/element-ui/packages/theme-chalk/src/select-dropdown.scss 3:9 @import
node_modules/element-ui/packages/theme-chalk/src/select.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/pagination.scss 4:9 @import
node_modules/element-ui/packages/theme-chalk/src/index.scss 2:9 @import
src/assets/styles/element-variables.scss 25:9 root stylesheet
Warning: 33 repetitive deprecation warnings omitted.
98% after emitting CopyPlugin
DONE Compiled successfully in 19257ms 10:48:14 AM
App running at:
- Local: http://localhost:8013/
- Network: http://10.88.145.16:8013/
最开始以为是 element-ui
版本问题,修改版本后无果。
网上找到类似问题:
https://github.com/sass/dart-sass/issues/1319
解决办法 sass
版本修改为 1.32.13
"sass": "1.32.13"
]]>docker exec -it 容器名/容器ID /bin/bash
进入容器报错报错信息如下:
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
查看相应镜像发现镜像是使用alpine制作的
再次输入命令
docker exec -it 容器名/容器ID /bin/sh
进入成功
]]>java.sql.SQLException: Incorrect string value: '\xF0\x9F\x87\xB1 \xF0...' for column 'nickname' at row 1
检查后发现粉丝的昵称是特殊字符: ? ? ?
检查数据库后发现编码为:utf8mb4
,修改数据库编码为 utf8mb4mb4
后再次测试,依旧出错。
通过项目日志,获取到具体 Sql
代码
INSERT INTO wx_user ( open_id, nickname, sex, head_img_url, country, province, city, remark,
subscribe, subscribe_time ) VALUES ( '**', '? ? ? ', 1,
'',
'**', '**', '**', '', 1, '2021-07-15 16:03:00' )
手动执行 Sql
代码,居然插入成功了...
通过上面的排查,排除掉了数据库的问题,通过查阅资料,发现可以在 application.yml
的 Durid
参数中设置客户端连接数据库编码
spring:
datasource:
driverClassName: com.mysql.jdbc.Driver
password: **
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/**?useUnicode=true&characterEncoding=utf8mb4&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
username: root
druid:
# 兼容 utf8mb4mb4 编码格式
connection-init-sqls: set names utf8mb4mb4
重启项目,再次尝试,同步成功~
]]>可以通过更改 mysql 的配置文件 my.cnf 或者 my.ini 来更改这一默认值
[mysqld]
max_allowed_packet = 20M
将 mysql-connector-java 版本修改为 5.1.45 即可
]]>09:13:56 npm WARN network SKIPPING OPTIONAL DEPENDENCY: request to https://registry.npm.taobao.org/nan failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org registry.npm.taobao.org:443
09:13:56 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
09:13:56 npm WARN network SKIPPING OPTIONAL DEPENDENCY: request to https://registry.npm.taobao.org/fsevents failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org registry.npm.taobao.org:443
于是经过长达半个小时的搜索也没有找到答案,最后猜测是不是服务器网络或者host有问题
试了下 ping www.baidu.com
[root@localhost ~]# ping www.baidu.com
ping: www.baidu.com: Name or service not known
发现找不到百度的服务器,证明了这台服务器的host存在问题,于是定位到 /etc/resolv.conf
文件打开查看
[root@localhost ~]# vi /etc/resolv.conf
# Generated by NetworkManager
nameserver fd20:25f7:e485::1
添加下DNS到 resolv.conf
文件中
nameserver 114.114.114.114
保存文件,再次 ping www.baidu.com
[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=51 time=36.1 ms
至此问题解决
]]>