Linux无法解析gitlib的地址--修改dns
搞的一个js鉴权认证,先跳转到 gitlib,登录后跳转到我们公司测试接口的页面;
公司gitlib地址:gitlab.cmread.com
[INFO][2018-12-17 15:29:00,189][com.migu.reading.auditweb.filter.AuditFilter]3E53B9035909B5ACF59E4ABEB8772EC8 get code 32cb5fcecba8c58f7cddb7ec17fca19cdde9e29f4d07610215bd7007f32b3dd0
[INFO][2018-12-17 15:29:00,189][com.migu.reading.auditweb.filter.AuditFilter]build authorize request with code:32cb5fcecba8c58f7cddb7ec17fca19cdde9e29f4d07610215bd7007f32b3dd0 and client secret
[ERROR][2018-12-17 15:29:40,500][com.migu.reading.auditweb.filter.AuditFilter]get accessToken failed.
org.apache.oltu.oauth2.common.exception.OAuthSystemException: java.net.UnknownHostException: gitlab.cmread.com
at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:108)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:65)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:55)
at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:71)
at com.migu.reading.auditweb.filter.AuditFilter.getGitlabUserInfo(AuditFilter.java:340)
at com.migu.reading.auditweb.filter.AuditFilter.callBack(AuditFilter.java:272)
at com.migu.reading.auditweb.filter.AuditFilter.doFilter(AuditFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.migu.reading.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:27)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at com.huawei.openas.monitor.valve.RequestCounterValve.invoke(RequestCounterValve.java:128)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: gitlab.cmread.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at org.apache.oltu.oauth2.client.URLConnectionClient.execute(URLConnectionClient.java:85)
... 29 more
[INFO][2018-12-17 15:29:40,514][com.migu.reading.auditweb.filter.AuditFilter]isNeedAuthorized pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/
[INFO][2018-12-17 15:29:40,518][com.migu.reading.auditweb.filter.AuditFilter]3E53B9035909B5ACF59E4ABEB8772EC8:{"name":"unknown","id":"0","username":"unknown"}
[INFO][2018-12-17 15:29:41,670][com.migu.reading.auditweb.filter.AuditFilter]isNeedLog pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/
[INFO][2018-12-17 15:29:41,674][com.migu.reading.auditweb.cdr.CDRLog]set cdrlogcdrlog path/home/iufs/apache-tomcat/webapps/iufs/REPORT
[INFO][2018-12-17 15:29:41,676][com.migu.reading.auditweb.cdr.CDRLog]Set cdrlog temp pathcdrlog temp path/home/iufs/apache-tomcat/webapps/iufs/REPORT
[DEBUG][2018-12-17 15:29:41,676][com.migu.reading.auditweb.cdr.CDRLog]logFileNamePre isOP
[INFO][2018-12-17 15:29:41,764][com.migu.reading.auditweb.filter.AuditFilter]isNeedAuthorized pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/head.html
[INFO][2018-12-17 15:29:41,765][com.migu.reading.auditweb.filter.AuditFilter]3E53B9035909B5ACF59E4ABEB8772EC8:{"remoteIP":"10.73.158.228","rspStr":"status=0","name":"unknown","rspTime":"1545031781670","id":"0","reqTime":"1545031780519","url":"/iufs/interfacejsp/","username":"unknown"}
[INFO][2018-12-17 15:29:41,769][com.migu.reading.auditweb.filter.AuditFilter]isNeedLog pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/head.html
[INFO][2018-12-17 15:29:42,268][com.migu.reading.auditweb.filter.AuditFilter]isNeedAuthorized pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/send.jsp
[INFO][2018-12-17 15:29:42,268][com.migu.reading.auditweb.filter.AuditFilter]3E53B9035909B5ACF59E4ABEB8772EC8:{"remoteIP":"10.73.158.228","rspStr":"status=0;Accept-Ranges=bytes;ETag=W/\"350-1534325362000\";Last-Modified=Wed, 15 Aug 2018 09:29:22 GMT","name":"unknown","rspTime":"1545031781768","id":"0","reqTime":"1545031781765","url":"/iufs/interfacejsp/head.html","username":"unknown"}
[INFO][2018-12-17 15:29:42,270][com.migu.reading.auditweb.filter.AuditFilter]isNeedAuthorized pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/actions.jsp
[INFO][2018-12-17 15:29:42,272][com.migu.reading.auditweb.filter.AuditFilter]3E53B9035909B5ACF59E4ABEB8772EC8:{"remoteIP":"10.73.158.228","rspStr":"status=0;Accept-Ranges=bytes;ETag=W/\"350-1534325362000\";Last-Modified=Wed, 15 Aug 2018 09:29:22 GMT","name":"unknown","rspTime":"1545031781768","id":"0","reqTime":"1545031781765","url":"/iufs/interfacejsp/head.html","username":"unknown"}
[INFO][2018-12-17 15:29:42,486][com.migu.reading.auditweb.filter.AuditFilter]isNeedLog pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/send.jsp
[INFO][2018-12-17 15:29:42,645][com.migu.reading.auditweb.filter.AuditFilter]isNeedLog pattern:/iufs/interfacejsp.* url:/iufs/interfacejsp/actions.jsp
错误日志
大概意思就是无法解析gitlib的域名;
解决方法有两种:
1、辑etc下的resoly.conf文件(如果没有就新建一个)
vi /etc/resolv.conf
添加一行配置:
nameserver 8.8.8.8
保存修改的配置,重启网络服务;
service network restart
这样就可以了。
2、修改linux的hosts配置,添加配置项;
hosts文件在etc下;
vi /etc/hosts
在hosts文件里配置一个gitlib的映射;
112.13.170.217 gitlab.cmread.com
重启服务即可;
Linux无法解析gitlib的地址--修改dns的更多相关文章
- Linux基础二(修改ip地址、修改网关、修改DNS服务器、重新启动网络配置)
网络的初始化 .ip地址的修改(临时生效) 使用ifconfig命令 ifconfig 网卡名 ip地址 netmask 子网掩码 [root@localhost /]# ifconfig eth1 ...
- 域名无法解析 Linux临时或永久修改DNS
最近给VPS重装了系统,因为服务商不提供DHCP,所以只好手动设置IP和DNS Server.悲催的是系统重装的时候忘记了输入DNS Server,最后导致进去系统后,各种域名无法解析. Linux中 ...
- LINUX的DNS怎么设置?linux下如何修改DNS地址
LINUX的DNS怎么设置?linux下如何修改DNS地址 https://jingyan.baidu.com/article/870c6fc32c028eb03fe4be30.html Linux下 ...
- Cent0S 6.7直接在/etc/resolv.conf文件下修改DNS地址重启不生效问题【转】
CentOS 6.7/Linux下设置IP地址 1:临时修改: 1.1:修改IP地址 # ifconfig eth0 192.168.2.104 1.2:修改网关地址 # route add defa ...
- Linux 如何查看修改DNS配置
DNS服务器介绍 DNS是计算机域名系统(Domain Name System 或Domain Name Service) 的缩写,它是由域名解析器和域名服务器组成的.域名服务器是指保存有该网络中所有 ...
- centos 修改DNS,网关,IP地址
1.CentOS 修改DNS 修改对应网卡的DNS的配置文件 # vi /etc/resolv.conf 修改以下内容 nameserver 8.8.8.8 #google域名服务器 nameser ...
- 全球免费公共 DNS 解析服务器 IP 地址列表推荐 (解决无法上网/加速/防劫持)
除了宽带提供商的 DNS 以外,像阿里云.腾讯云.Google.百度.IBM.CNNIC 等一些有足够实力的大型互联网公司也非常慷慨地为公众提供了免费的 DNS 解析服务器.异次元这就搜集了全球范围内 ...
- DNS解析污染原理——要么修改包,要么直接丢弃你的网络包
DNS/域名解析 可以看到dns解析是最初的一步,也是最重要的一步.比如访问亲友,要知道他的正确的住址,才能正确地上门拜访. dns有两种协议,一种是UDP(默认),一种是TCP. udp 方式,先回 ...
- linux 虚拟机设置好固定ip 修改了 dns 网络需要设置成桥接模式
linux 虚拟机设置好固定ip 修改了 dns 网络需要设置成桥接模式 可以修复网络连接(浏览器返回 server not found)
随机推荐
- SY-SUBRC
一般是对read table和select语句使用. loop at g_it_data where level < <wa_data>-level and seq < < ...
- 使用GitHub管理代码
第一步:注册GitHub账户. 第二步:下载GitHub desktop. 第三步:打开软件界面之后请使用鼠标点击左上角的“file”选项按钮,选择添加本地文件. 第四步:导入文件 第五步:在左下角大 ...
- day 06 列表去重, 数据类型的补充,编码,深浅copy
因为重要,所以放前面 列表去重 l1 = [1, 2, 3, 4, 5] l2 = [3, 4, 5, 6, 7] set = list(set(l1 + l2)) # set自动去重,然后变成lis ...
- webpack浅析---入口篇
webpack有四个核心概念: 入口(entry) 输出(output) loader 插件(plugins) webpack-merge将环境.构建目标.运行时合并 入口: 入口起点是指webpac ...
- springboot 日志2
SpringBoot关于日志的官方文档 1.简述 SpringBoot官方文档关于日志的整体说明 本博客基于SpringBoot_1.3.6大家请先简单看下这篇英文的官方文档,文中有说 Sprin ...
- mysql5.7 新增的json字段类型
一.我们先创建一个表,准备点数据 CREATE TABLE `json_test` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'I ...
- centos7下swoole1.9的安装与HttpServer的使用
一.下载swoole源码包 https://github.com/swoole/swoole-src/releases 如:swoole-src-1.9.6.tar.gz 二.编译安装 > yu ...
- 梦殇 chapter six
如行尸走肉般的坐在教室,看著书上密密麻麻的字,心却久久不能平静. 自己已经不再是当初那个懵懂,无知的小女孩了.仰望天空45度,让眼泪流回眼睛. 是该告别彷徨,告别懵懂的年纪了. 早些年许下的诺言,如今 ...
- js验证前后密码是否一致,为什么当我输入不一致密码时,不会弹出警告啊
<form name="form" action="#"><input type="password" id=" ...
- overflow 在float浮动标签里的作用
overflow可以使浮动元素回归文档流,但是浮动元素却仍然具有浮动的属性 <!DOCTYPE html> <html lang="en"> <hea ...