小编Aws*_*ike的帖子

使用 Docker,触发 PANIC 的原因:无法找到有效的检查点记录

我试图更好地理解 Docker,但在这样做的过程中,我似乎损坏了我的应用程序的 PostgreSQL 数据库。

我正在使用 Docker Swarm 启动我的应用程序,但在 PostgreSQL 容器中的循环中收到以下错误:

    2021-02-10 15:38:51.304 UTC 120 LOG:  database system was shut down at 2021-02-10 14:49:14 UTC
    2021-02-10 15:38:51.304 UTC 120 LOG:  invalid primary checkpoint record
    2021-02-10 15:38:51.304 UTC 120 LOG:  invalid secondary checkpoint record
    2021-02-10 15:38:51.304 UTC 120 PANIC:  could not locate a valid checkpoint record
    2021-02-10 15:38:51.447 UTC 1 LOG:  startup process (PID 120) was terminated by signal 6
    2021-02-10 15:38:51.447 UTC 1 LOG:  aborting startup due to startup process failure …
Run Code Online (Sandbox Code Playgroud)

postgresql containers docker docker-swarm

13
推荐指数
2
解决办法
9432
查看次数

如何在命令行的路径中运行带有空格的powershell脚本?

所以我尝试了一些不同的方法从命令行运行PowerShell脚本,每一个都返回一个错误.

这是这条路:

C:\Users\test\Documents\test\line space\PS Script\test.ps1
Run Code Online (Sandbox Code Playgroud)

我试过这些:

powershell -File '"C:\Users\test\Documents\test\line space\PS Script\test.ps1"'

powershell "& ""C:\Users\test\Documents\test\line space\PS Script\test.ps1"""

Powershell "& 'C:\Users\test\Documents\test\line space\PS Script\test.ps1'"

Powershell -File 'C:\Users\test\Documents\test\line space\PS Script\test.ps1'"
Run Code Online (Sandbox Code Playgroud)

我收到所有这些错误:

&:术语"C:\ Users\test\Documents\test\line space\PS Script \"不被识别为cmdlet,函数,脚本文件或可操作程序的名称.检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试.

处理-File''C:\ Users\test\Documents\test\line space\PS Script \''失败:不支持给定路径的格式.为-File参数指定有效路径.

任何帮助将不胜感激!

powershell scripting cmd

9
推荐指数
3
解决办法
2万
查看次数

如何在Powershell中的一个语句中使用-replace两次

我试图在Powershell中使用-replace函数两次,但我能完成此任务的唯一方法是使用以下代码:

$data = Get-Content c:\test.txt
$data -replace 'A','apple' | Out-File c:\newtest.txt
$data = Get-Content c:\newtest.txt
$data -replace 'B','blue' | Out-File c:\newtest2.txt
Run Code Online (Sandbox Code Playgroud)

我相信应该有一种方法可以整合第2行和第4行,这样我就可以只使用newtest.txt与newtest2.txt中的正确输出.

powershell

1
推荐指数
1
解决办法
282
查看次数