今天突然发现应用报错:

MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

- 阅读剩余部分 -

这个问题是因为 AccessClient 长期不更新导致的。

闪退的原因:苹果在 macOS 12.3 中将系统中的 python2 运行库移除了,导致 AccessClient 执行时找不到 python。

解决方案:

  1. 打开应用程序目录,在 AccessClient 图标上右击,选中显示包内容,进入到 Contents/Resources/Scripts 目录下找到 main.scpt 使用脚本编辑器打开(双击即可自动打开,二进制文件不支持文本编辑器),将其中里的 python 改为 python3 ,保存即可。
  2. 在 Terminal 终端里执行 xcode-select –install 安装 xcode 插件,安装过程 20 分钟左右。
  3. 堡垒机打开 Terminal 弹框报错,“tmpXXXXXXXXX.command”无法打开,因为不允许“(null)”在“终端”中打开文稿。此时需要修改 ~/.local/accessclient.conf 配置文件,增加 Terminal 应用程序启动路径 “/System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal”。
  4. 打开 Termial,无法ssh登录,需要在 ~/.ssh 目录下创建/编辑 config 文件,增加一行 HostkeyAlgorithms +ssh-dss,ssh-rsa 即可。

操作过程:

$ ip a
$ sudo vim /etc/netplan/00-installer-config.yaml

# 添加以下配置
renderer: NetworkManager
wifis:
  wlp2s0:
    dhcp4: true
    access-points:
      "你的ssid":
        password: "你的密码"

# 保存退出,重启服务
$ sudo netplan generate
$ sudo netplan apply

笔者参考 https://blog.csdn.net/ainvgkridl/article/details/107817506 配置成功 Ubuntu Server 22.04.1 LTS 版本的无线WIFI 网络,机型是 Intel GNU,五代芯片。

Nginx 出现这个报错的原因通常是 client_max_body_size 的配置问题。

该配置项默认值仅为 1M,所以在上传大于 1M 的文件时报错。

需要在对应的站点 server 里修改此项配置,如下:

server {
    # ... 其他配置
    client_max_body_size 10M;
    # ... 其他配置
}

2024-02-29T10:30:34.png

Adobe 最近搞了个面向未来的播客录音/剪辑工具 Podcast。官方的介绍是:

AI-powered audio recording and editing, all on the web An audio tool for people with stories to tell

翻译过来就是:

人工智能驱动的音频录制和编辑,全部通过 Web 实现为有故事的人提供的音频工具

Podcast 的出现彻底改变了播客的生产流程,因为再也不用像以前一样剪辑音频了,新的方式是直接根据文本来处理。

- 阅读剩余部分 -

今天线上出了一个 bug,看日志是空指针异常:

java.lang.NullPointerException: null

但日志里只有这么多,没有详细的栈信息,也就是说,看起来像是人为抛了一个空的 NullPointerException,但看代码确实没有问题,确实打印了详细信息。

搜了一下,原因如下:

JVM 虚拟机会对异常信息进行优化,当相同异常出现很多次,会认为它是热点异常,忽略掉异常堆栈信息;
通过增加 JVM 参数:-XX:-OmitStackTraceInFastThrow 可解决。

于是搜索所有的这个异常的信息,找到第一条,终于发现了详细的栈信息。

顺利定位到了代码位置,修复了问题。

由于需要测试一个很老的软件,需要在 macOS 上的 /home 目录下创建一个目录,结果报错 Operation not supported。

2024-02-29T10:36:17.png

其实这是 macOS 的安全模块限制的。

解决方案就是关闭这个限制,方法如下:

编辑 /etc/auto_master 文件,将下面这行注释掉:

2024-02-29T10:36:34.png

然后执行 sudo automount 命令重载一下配置即可。


2024-02-29T10:36:51.png

EPS File Viewer 是一款免费的 eps 文件的查看器,官网地址是 http://www.epsfileviewer.com/

官方介绍:

EPS File Viewer is a free viewer for EPS files, simple and fast, no need to install any other program, this standalone software can quickly open a EPS file (file extension: *.eps) and display file image. "How to open eps file?", this software is the answer. It supports Zoom-in and Zoom-out feature, users can zoom in to get a close-up view or zoom out to see more details at a reduced size. In addition, this software supports "Save as JPG" function, this feature can convert EPS format file to JPG image, that means users can use this software as a EPS converter.

中文翻译:

- 阅读剩余部分 -