在我们的 Ubuntu 服务器中,我们能够以 Nginx 用户的身份进行克隆,/usr/share/nginx/www
该用户具有www-data:www
-data 所有权,但会收到警告
“警告:无法访问'/root/.config/git/attributes':权限被拒绝”
我们正在执行命令 sudo -u www-data git clone <repo>.
使用 sudo 我们会收到此警告,否则它可以正常工作。
我们能够以 root 用户身份进行克隆并且没有问题。
.gitconfig 仅位于 root 中,请查看内容:
root@geo:~# cat /root/.gitconfig
[user]
name = pc_user
email = pcgeopc@gmail.com
root@geo:~#
Run Code Online (Sandbox Code Playgroud)
任何人都可以请帮助我们。
我们尝试了各种选项,例如/root/.config/
直接手动创建和更改权限等。但没有任何效果。任何人都可以帮我解决这个问题。
也请看这个:
root@geo:/setup/test# ll /setup/
total 16
drwxr-xr-x 4 www-data www-data 4096 Oct 9 00:14 ./
drwxr-xr-x 24 root root 4096 Oct 9 00:14 ../
drwxr-xr-x 3 www-data www-data 4096 Oct 9 00:14 test/
root@geo:/setup/test# sudo -u www-data …
Run Code Online (Sandbox Code Playgroud) 在 JAVA 应用程序上的 Ubuntu 14.04 服务器中,我们收到了 Postgres(使用 Postgresql 9.5)的 Too many Open files 错误。
我们在 /etc/security/limits.conf 中设置以下内容
* soft nofile 16384
* hard nofile 16384
root soft nofile 16384
root hard nofile 16384
postgres soft nofile 16384
postgres hard nofile 16384
Run Code Online (Sandbox Code Playgroud)
还要在 /etc/sysctl.conf 中设置以下内容
kern.maxfiles=20480
kern.maxfilesperproc=18000
Run Code Online (Sandbox Code Playgroud)
另请在以 Postgres 用户身份运行时查看以下结果:
-> ulimit -Hn
16384
-> ulimit -Sn
16384
-> cat /proc/sys/fs/file-max
100268
Run Code Online (Sandbox Code Playgroud)
重新启动服务器并检查 Postgres 的 ulimit 后为 100268。但是在检查 postgres 下打开文件的限制时,它仍然是 1024 和 4096
# cat /proc/1072/limits
Max open files 1024 4096 …
Run Code Online (Sandbox Code Playgroud) 我正在运行管道作业,因此我们需要将参数传递给下游作业,但它不起作用。我们尝试如下:
管道作业:
node {
parameters {
choice(
name: 'OS',
choices:"Windows\nLinux\nMAC",
description: "Choose Environment to build!")
}
stage('Build') {
if("${params.Environment}" == 'Windows')
{
paramAValue = "${params.Environment}"
build job: 'QA-Test-Windows',parameters: [[$class: 'StringParameterValue', name: 'ParamA', value: "$paramAValue"]]
}
}
}
Run Code Online (Sandbox Code Playgroud)
QA-Test-Windows 是一项自由式工作,我们尝试按如下方式访问脚本中的参数,但它不起作用。
Write-output "OS selected for testing is ${params.ParamA}"
Write-output "OS selected for testing is ${ParamA}"
Run Code Online (Sandbox Code Playgroud)
尝试访问变量但它不起作用。任何人都可以帮我解决这个问题。我们尝试将 QA-Test-Windows 自由式作业创建为 Pipelinejob,但在此自由式中有很多构建步骤。
在我们的 k8s 入口配置中,我们将超时设置为 10 分钟并将其应用于所有请求。/my-service/v1/processfile
是否可以仅对两个请求(例如和 )配置超时/my-service/v1/cachewarmup
。
目前我们的配置如下:
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-service
annotations:
nginx.ingress.kubernetes.io/proxy-connect-timeout: '600'
nginx.ingress.kubernetes.io/proxy-send-timeout: '600'
nginx.ingress.kubernetes.io/proxy-read-timeout: '600'
spec:
rules:
- host: my-service-dev1.eus1-devqa.geo.com
http:
paths:
- path: /
backend:
serviceName: my-service-svc
servicePort: 8080
Run Code Online (Sandbox Code Playgroud)
谁能帮我将两个请求的 nginx 入口超时配置为 10 分钟,所有其他请求默认为 1 分钟。
git ×1
gitlab ×1
jenkins ×1
kubernetes ×1
pipelining ×1
postgresql ×1
ubuntu ×1
ubuntu-14.04 ×1
ulimit ×1