栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ububtu sudo apt-get update

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ububtu sudo apt-get update

1. Error in the certificate verification [IP: xxx:xxx:xxx:443] 无法安全地用该源进行更新,所以默认禁用该源。
heze@heze:/etc/apt/sources.list.d$ sudo apt-get update
命中:1 http://mirrors.aliyun.com/ubuntu focal InRelease
命中:2 http://mirrors.163.com/ubuntu bionic InRelease                                                                                                  
命中:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                          
命中:4 http://mirrors.163.com/ubuntu bionic-security InRelease                                                            
命中:6 http://mirrors.aliyun.com/ubuntu focal-security InRelease                                                          
命中:7 http://mirrors.aliyun.com/ubuntu focal-updates InRelease                               
命中:8 http://cn.archive.ubuntu.com/ubuntu focal InRelease                                                                           
命中:9 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease                                                                     
忽略:5 https://pkg.jenkins.io/debian-stable binary/ InRelease                                                   
命中:10 http://mirrors.aliyun.com/ubuntu focal-backports InRelease                                              
错误:11 https://pkg.jenkins.io/debian-stable binary/ Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: xxx:xxx:xxx::xxx 443]
正在读取软件包列表... 完成                          
E: 仓库 “http://pkg.jenkins.io/debian-stable binary/ Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
尝试解决: 安装 https 相关包
 1. sudo apt install apt-transport-https
 2. sudo apt install ca-certificates
 3. sudo apt-get update
2. ubuntu jenkins 修改默认启动端口(8080 => 9090)

有很多博客记录修改方式是:

1. 修改 sudo vim /etc/init.d/jenkins 
# Verify that the jenkins port is not already in use, winstone does not exit
# even for BindException
 check_tcp_port "http" "${HTTP_PORT}" "8080" "${HTTP_HOST}" "0.0.0.0" || return 2

2. 修改 sudo vim /etc/default/jenkins
# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8080

比较尴尬,并没有生效。

=====================================================================

一样的朋友可以试下下面的方式:

1. ps -def | grep java   (查看 java 相关进程信息 )

heze@heze:/etc/default$ ps -def | grep java
jenkins    91470       1 99 09:54 ?        00:00:31 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
heze       91625   88963  0 09:54 pts/1    00:00:00 grep --color=auto java

2. systemctl status jenkins (查看 jenkins 状态)

heze@heze:/etc/default$ systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
     Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-05-01 09:47:07 CST; 4min 7s ago
   Main PID: 90383 (java)
      Tasks: 49 (limit: 9341)
     Memory: 401.8M
     CGroup: /system.slice/jenkins.service
             └─90383 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080

3. sudo vim /lib/systemd/system/jenkins.service

# Port to listen on for HTTP requests. Set to -1 to disable.
# To be able to listen on privileged ports (port numbers less than 1024),
# add the CAP_NET_BIND_SERVICE capability to the AmbientCapabilities
# directive below.
Environment="JENKINS_PORT=9090"

4. sudo systemctl restart jenkins

heze@heze:/etc/default$ sudo systemctl restart jenkins
Warning: The unit file, source configuration file or drop-ins of jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.

5. systemctl daemon-reload

6. sudo systemctl restart jenkins

7. ps -def | grep java

jenkins    91470       1 99 09:54 ?        00:00:31 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=9090
heze       91625   88963  0 09:54 pts/1    00:00:00 grep --color=auto java
3. …

后续问题再记录

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/851125.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号