rpm安装jenkins启动后报错 UnknownHostException: centos68-192-168-18-4: Name or service not known 10C
  1. jenkins 版本 jenkins-2.164.1-1.1.noarch.rpm
  2. rpm安装方式安装成功后通过service jenkins start启动报错
  3. hostname和/etc/hosts都已修改centos68
[root@centos68 work]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 centos68
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 centos68
127.0.0.1 centos68-192-168-18-4
192.168.18.4 centos68

  1. 错误:
[root@centos68 jenkins]# tail -200f /var/log/jenkins/jenkins.log 
Running from: /usr/lib/jenkins/jenkins.war
webroot: $user.home/.jenkins
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @428ms to org.eclipse.jetty.util.log.JavaUtilLog
Mar 26, 2019 2:58:18 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 11.0.1+13-LTS
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /jenkins, did not find org.eclipse.jetty.jsp.JettyJspServlet
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Mar 26, 2019 2:58:18 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: node0 Scavenging every 660000ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/root/.jenkins/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@66b72664{Jenkins v2.164.1,/jenkins,file:///root/.jenkins/war/,AVAILABLE}{/root/.jenkins/war}
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@76b0ae1b{HTTP/1.1,[http/1.1]}{0.0.0.0:2155}
Mar 26, 2019 2:58:19 PM org.eclipse.jetty.server.Server doStart
INFO: Started @1369ms
Mar 26, 2019 2:58:19 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Mar 26, 2019 2:58:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Mar 26, 2019 2:58:19 PM hudson.PluginManager loadDetachedPlugins
INFO: Upgrading Jenkins. The last running version was 2.150.1. This Jenkins is version 2.164.1.
Mar 26, 2019 2:58:19 PM hudson.PluginManager loadDetachedPlugins
INFO: Upgraded Jenkins from version 2.150.1 to version 2.164.1. Loaded detached plugins (and dependencies): [jaxb.hpi]
Mar 26, 2019 2:58:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Mar 26, 2019 2:58:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Mar 26, 2019 2:58:20 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Mar 26, 2019 2:58:20 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 3 ms
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@3bf691fa: display name [Root WebApplicationContext]; startup date [Tue Mar 26 14:58:21 CST 2019]; root of context hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@3bf691fa]: org.springframework.beans.factory.support.DefaultListableBeanFactory@6a2e76fa
Mar 26, 2019 2:58:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6a2e76fa: defining beans [authenticationManager]; root of factory hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@101e1204: display name [Root WebApplicationContext]; startup date [Tue Mar 26 14:58:21 CST 2019]; root of context hierarchy
Mar 26, 2019 2:58:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@101e1204]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1a7623e2
Mar 26, 2019 2:58:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1a7623e2: defining beans [filter,legacy]; root of factory hierarchy
Mar 26, 2019 2:58:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Mar 26, 2019 2:58:21 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Mar 26, 2019 2:58:21 PM javax.jmdns.impl.HostInfo newHostInfo
WARNING: Could not intialize the host network interface on nullbecause of an error: centos68-192-168-18-4: centos68-192-168-18-4: Name or service not known
java.net.UnknownHostException: centos68-192-168-18-4: centos68-192-168-18-4: Name or service not known
        at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1642)
        at javax.jmdns.impl.HostInfo.newHostInfo(HostInfo.java:75)
        at javax.jmdns.impl.JmDNSImpl.<init>(JmDNSImpl.java:407)
        at javax.jmdns.JmDNS.create(JmDNS.java:60)
        at hudson.DNSMultiCast$1.call(DNSMultiCast.java:33)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.UnknownHostException: centos68-192-168-18-4: Name or service not known
        at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
        at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1515)
        at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
        at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1505)
        at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1637)
        ... 10 more



1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
跨服务器上传数据一直出现UnknownHostException: loaclhost

# 萌新学习,在跨服务器上传数据时,一直报着个错,求大神们指教 ``` com.sun.jersey.api.client.ClientHandlerException: java.net.UnknownHostException: loaclhost Caused by: java.net.UnknownHostException: loaclhost 2018-9-15 15:37:48 org.apache.catalina.core.StandardWrapperValve invoke **严重: Servlet.service() for servlet [springMVC] in context with path [/ssm] threw exception [Request processing failed; nested exception is com.sun.jersey.api.client.ClientHandlerException: java.net.UnknownHostException: loaclhost] with root cause java.net.UnknownHostException: loaclhost** at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.<init>(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler$1$1.getOutputStream(URLConnectionClientHandler.java:238) at com.sun.jersey.api.client.CommittingOutputStream.commitStream(CommittingOutputStream.java:117) at com.sun.jersey.api.client.CommittingOutputStream.write(CommittingOutputStream.java:83) at com.sun.jersey.core.impl.provider.entity.ByteArrayProvider.writeTo(ByteArrayProvider.java:95) at com.sun.jersey.core.impl.provider.entity.ByteArrayProvider.writeTo(ByteArrayProvider.java:59) at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) at com.sun.jersey.api.client.Client.handle(Client.java:652) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) at com.sun.jersey.api.client.WebResource.put(WebResource.java:223) at com.yihengjie.controller.UploadController.uploadPic(UploadController.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) ``` ## 存数据的服务器配置: ``` <Server port="8003" shutdown="SHUTDOWN"> <Connector port="8004" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <Connector port="8006" protocol="AJP/1.3" redirectPort="8443" /> ``` ## 执行存储的代码: ``` public class SSMUtils { public static final String pic_HOST="http://loaclhost:8004/ssm_image"; } ``` ``` @Controller @RequestMapping("/upload") public class UploadController { @RequestMapping("/uploadPic") public void uploadPic(HttpServletRequest request, String fileName,PrintWriter out) { // 把request转换成多部件请求 MultipartHttpServletRequest mh = (MultipartHttpServletRequest) request; CommonsMultipartFile cm = (CommonsMultipartFile) mh.getFile(fileName); byte[] fbytes = cm.getBytes(); //准备图片名称算法 String newFileName=""; SimpleDateFormat adf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); newFileName = adf.format(new Date()); Random rd = new Random(); for(int i=0;i<3;i++){ newFileName = newFileName+rd.nextInt(10); } //获取文件名 String sur = cm.getOriginalFilename(); //截取文件的扩展名 String suffix = sur.substring(sur.lastIndexOf(".")); //创建jersy服务器 Client client = Client.create(); WebResource resource = client.resource(SSMUtils.pic_HOST+"/upload/"+newFileName+suffix); resource.put(String.class, fbytes); //准备回显图片路径地址 String fullPath=SSMUtils.pic_HOST+"/upload/"+newFileName+suffix; String relativePath="/upload/"+newFileName+suffix; String result = "{\"fullPath\":\""+fullPath+"\",\"relativePath\":\""+relativePath+"\"}"; out.print(result); } ```

Docker 中java程序对外请求,报错:Root Cause exception : java.net.UnknownHostException

1、在虚拟机中centos7 系统中,安装了Docker环境,想实现在docker中运行 “java -jar test.jar”,其中test.jar的main函数中会对外发起http请求,url=“http://plm.xxx.com:9091/xxx”,初始启动运行镜像文件就报错: ``` java.net.UnknownHostException: PLM at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901 ``` 2、我配置的dockfile 文件为: ``` From centos MAINTAINER liubin ADD test.jar test.jar ADD jdk-7u80-linux-x64.tar.gz /home/jdk/ ENV JAVA_HOME /home/jdk/jdk1.7.0_80 ENV PATH $JAVA_HOME/bin:$PATH ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar ENTRYPOINT ["java","-jar","test.jar"] ``` 3、直接尝试在centos环境中运行java -jar test.jar不会报异常,我的/etc/hosts文件中配置了PLM相关地址 ``` 127.0.0.1 node1 localhost ::1 node1 localhost 192.168.2.18 plm.xxx.com plmapp PLM #与请求地址相关的域名 192.168.2.113 ode1 192.168.2.128 AAASPLMIFS ``` 4、我的问题是docker 中运行java程序报这个UnknownHostException,是不是需要在Dockerfile中配置其它内容。 不好意思,最近没有积分呀、

Jenkins构建maven项目失败报错:

ERROR: Failed to parse POMs hudson.util.IOException2: Failed to access https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=C:\Jdk1.7 at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:352) at hudson.tools.JDKInstaller.locate(JDKInstaller.java:298) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:121) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:106) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:149) at hudson.model.JDK.forNode(JDK.java:111) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:745) at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:157) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:573) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:423) at hudson.model.Run.run(Run.java:1362) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: java.net.UnknownHostException: cds.sun.com at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1672) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:340) ... 14 more Caused by: java.net.UnknownHostException: cds.sun.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160) 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:275) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2691) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:291) at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:334) ... 14 more Finished: FAILURE 好像是连不上cds.sun.com的原因, 不理解怎么改

Jenkins+ant报错, uname: command not found

Started by user anonymous Building in workspace /Users/lixiuming/.jenkins/job/extras No emails were triggered. [extras] $ /Users/lixiuming/Ant/bin/ant -Dtest=Test /Users/lixiuming/Ant/bin/ant: line 28: uname: command not found /Users/lixiuming/Ant/bin/ant: line 29: uname: command not found /Users/lixiuming/Ant/bin/ant: line 65: sed: command not found /Users/lixiuming/Ant/bin/ant: line 125: uname: command not found Buildfile: /Users/lixiuming/.jenkins/job/extras/build.xml BUILD SUCCESSFUL Total time: 0 seconds Archiving artifacts An attempt to send an e-mail to empty list of recipients, ignored. Email was triggered for: Always Sending email for trigger: Always Sending email to: 460154849@qq.com 1602211058@qq.com Finished: SUCCESS

linux上安装rabbitmq失败,install的时候报错 error: unpacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.3/ebin/gm.beam;5eb66d33: cpio: read

install的时候报错 error: unpacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.3/ebin/gm.beam;5eb66d33: cpio: read

#jenkins #詹金斯 #pipeline 脚本中执行linux命令报错:line 2: syntax error near unexpected token `('。

pipeline 脚本中执行linux命令报错: 1. linux命令:sh "python3 /home/pipline/DisasteRecoveryV1.1/main.py ${pool} ${province}" 2. 报错:line 2: syntax error near unexpected token `('。 命令只有1行,且没有"(",还是报了这个错误,为什么啊? 如果将脚本改成:sh 'python3 /home/pipline/DisasteRecoveryV1.1/main.py "${pool}" "${province}"',就不会报错,但是参数又传不进来,两个参数传进来都是空字符。 pipeline script如下: ``` stage('选择切换省份和资源池') { steps{ script{ def province = '' province = input message: '请选择省份', parameters: [choice(choices: '安徽\n北京\n福建, name: 'provinces')] def pool = '' pool = input message: '请选择资源', parameters: [choice(choices: '河北\n河南, description: '-', name: 'pool')] echo "选择省份:${province},选择资源:${pool}。" sh "python3 /home/pipline/DisasteRecoveryV1.1/main.py ${pool} ${province}" } } } ```

jenkins编译工程报错,请问这种错误怎样查找原因呢?

![图片说明](https://img-ask.csdn.net/upload/201611/19/1479546123_212692.png)

Jenkins系统管理界面报错

登录Jenkins,点击“系统管理”然后就报错了,报错界面的内容如下,哪位遇到过这种情况,着急!!!求帮助 Stack trace javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files/Jenkins/war/WEB-INF/lib/jenkins-core-1.596.jar!/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly:45:20: <j:otherwise> cached miss for hudson.lifecycle.WindowsServiceLifeccle at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Program%20Files/Jenkins/war/WEB-INF/lib/jenkins-core-1.596.jar!/hudson/model/UpdateCenter/CoreUpdateMonitor/message.jelly:45:20: <j:otherwise> cached miss for hudson.lifecycle.WindowsServiceLifeccle at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99) at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)

jekins构建失败 报错 error: cannot find symbol ,自己电脑没问题

## 问题 自己电脑上能运行,推代码后在jekins上执行 gradlew assemble ,构建失败,错误如下。看信息是说 BaseAnalysisInit 这个类找不到,请问这是什么原因造成的? ``` 12:26:17 /var/lib/jenkins/workspace/java-sync/db-sync/src/main/java/com/gunma/sync/db/interceptor/DefaultDataInterceptor.java:271: error: cannot find symbol 12:26:17 protected class DefaultAnalysisInit extends BaseAnalysisInit { 12:26:17 ^ 12:26:17 symbol: class BaseAnalysisInit 12:26:17 location: class DefaultDataInterceptor 12:26:17 1 error 12:26:17 11 warnings 12:26:17 FAILED 12:26:17 12:26:17 FAILURE: Build failed with an exception. 12:26:17 12:26:17 * What went wrong: 12:26:17 Execution failed for task ':db-sync:compileJava'. 12:26:17 > Compilation failed; see the compiler error output for details. 12:26:17 12:26:17 * Try: 12:26:17 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 12:26:17 12:26:17 * Get more help at https://help.gradle.org 12:26:17 12:26:17 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. 12:26:17 See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings 12:26:17 12:26:17 BUILD FAILED in 19s 12:26:17 7 actionable tasks: 1 executed, 6 up-to-date 12:26:18 Build step 'Invoke Gradle script' changed build result to FAILURE 12:26:18 Build step 'Invoke Gradle script' marked build as failure 12:26:18 Finished: FAILURE ```

Jenkins运行MSBuild报错

Jenkins运行MSBuild,报C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe doesn't exist错 我已经配置了MSBuild,各位大侠帮忙看看哪里错了。 ![图片说明](https://img-ask.csdn.net/upload/201609/25/1474771360_119173.jpg)

mac安装Jenkins报错,页码显示脱机

1、官网下载war包,通过终端java命令:java - jar jenkins.war 2、在安装过程中有红色报错信息: 五月 07, 2019 12:36:26 下午 hudson.PluginManager doCheckUpdatesServer 严重: Error checking update sites for 1 attempt(s). Last exception was: SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 3、然后用localhost:8080打开页面,显示Jenkins处于脱机状态 哪位大神出来帮忙解决解决

jenkins系统配置无法保存:Malformed GitHub Plugin configuration (no protocol: )

jenkins进行系统配置之后,点击“应用”异常: ![图片说明](https://img-ask.csdn.net/upload/201910/17/1571295702_918108.png) 点击保存: ![图片说明](https://img-ask.csdn.net/upload/201910/17/1571279184_823793.png) 请教各位大神,这是什么原因?

jenkins安装完成以后尴尬了,该怎么解决?

**按照官方网站一步步安装,解决个别错误,修改端口号启动** udo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key yum install jenkins 安装完成后,有如下相关目录: (1)/usr/lib/jenkins/:jenkins安装目录,WAR包会放在这里。 (2) /etc/sysconfig/jenkins:jenkins配置文件,“端口”,“JENKINS_HOME”等都可以在这里配置。 (3)/var/lib/jenkins/:默认的JENKINS_HOME。 (4)/var/log/jenkins/jenkins.log:Jenkins日志文件。 第一种启动方法,切换到jenkins.war存放的目录,输入如下命令: $ java -jar jenkins.war 修改端口号8089 java -jar jenkins.war --httpPort=8089 ## **然后。。。** ![图片说明](https://img-ask.csdn.net/upload/201709/28/1506591192_44316.png) **我做了什么,谁能告诉我密码是什么,在哪修改**

jenkins集成,启动slave agent 报错,提示端口问题

![![图片说明](https://img-ask.csdn.net/upload/201712/05/1512435402_313554.png)图片说明](https://img-ask.csdn.net/upload/201712/05/1512435396_223776.png)

Jenkins打包项目报错,JDK1.8

``` [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.400 s [INFO] Finished at: 2019-12-31T17:08:37+08:00 [INFO] Final Memory: 32M/117M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project cmdbunion_eureka: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile: org/codehaus/plexus/compiler/util/scan/InclusionScanException [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.8.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/DATA/repo/repository/org/apache/maven/plugins/maven-compiler-plugin/3.8.1/maven-compiler-plugin-3.8.1.jar [ERROR] urls[1] = file:/DATA/repo/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar [JENKINS] Archiving /DATA/var/lib/jenkins/workspace/cmdbunion_parent/cmdbunion_eureka/pom.xml to com.travelsky/cmdbunion_eureka/0.0.1-SNAPSHOT/cmdbunion_eureka-0.0.1-SNAPSHOT.pom [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] -----------------------------------------------------: org.codehaus.plexus.compiler.util.scan.InclusionScanException [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [JENKINS] Archiving /DATA/var/lib/jenkins/workspace/cmdbunion_parent/cmdbunion_titsm/pom.xml to com.travelsky/cmdbunion_titsm/0.0.1-SNAPSHOT/cmdbunion_titsm-0.0.1-SNAPSHOT.pom [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :cmdbunion_eureka ``` ![图片说明](https://img-ask.csdn.net/upload/201912/31/1577783774_342114.png) ![图片说明](https://img-ask.csdn.net/upload/201912/31/1577783814_821416.png)

jdk1.8换成11,启动项目报错java.net.MalformedURLException: unknown protocol: jrt

jdk11 Information:Internal caches are corrupted or have outdated format, forcing project rebuild: Module 'messystem' production: **java.net.MalformedURLException: unknown protocol: jrt** 解决:据说jdk11完美兼容以前jdk,但是项目是使用1.8 编写,报错, 在project structure->modules-> ![在这里插入图片描述](https://img-blog.csdnimg.cn/2018122312124235.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM2OTIyOTI3,size_16,color_FFFFFF,t_70) 最后还是将项目jdk换回1.8, 11的新特性还是使用deemo去体验比较好,不要轻易将其用在低版本的jdk编写的项目中,这样的体验可能会有代价的,还好我这个只是启动不起来,如果是启动之后的运行过程中,出现什么问题,那就是GG了. 如果哪位朋友有不回恢复jdk1.8就能解决这个报错的,还望留言指教!! 注:1.8一切正常,只是更改项目jdk为11,没有更改任何代码,启动报错

Jenkins构建失败,没有生成jtl

报错日志: Started by user anonymous Building on master in workspace /Users/Shared/Jenkins/Home/job/extras [extras] $ /Users/lixiuming/Ant/bin/ant Buildfile: /Users/Shared/Jenkins/Home/job/extras/build.xml run: [echo] funcMode = false [jmeter] Executing test plan: /Users/Shared/Jenkins/Home/job/script/TestSentence1.jmx ==> /Users/Shared/Jenkins/Home/job/extras/result/Test201801020249.jtl [jmeter] 2018-01-02 14:49:32,219 main ERROR FileManager (jmeter.log) java.io.FileNotFoundException: jmeter.log (Permission denied) java.io.FileNotFoundException: jmeter.log (Permission denied) 。。。。。。。。。。 _message_xalan: xslt-report: BUILD FAILED /Users/Shared/Jenkins/Home/job/extras/build.xml:150: input file /Users/Shared/Jenkins/Home/job/extras/result/Test201801020249.jtl does not exist

jenkins构建项目报编译错误问题

用jenkins构建项目时,报编译问题:[ERROR] COMPILATION ERROR [INFO] ------------------------------------------------------------- [ERROR] Failure executing javac, but could not parse the error: Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Jenkins无法启动的问题

Jenkins下面配置了很多自动发布的程序。今天早上忽然之间就启动不了了。报错如下。请大神帮忙分析原因。 Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins 09-Apr-2016 10:40:45.446 SEVERE [localhost-startStop-1] hudson.util.BootFailure.publish Failed to initialize Jenkins hudson.util.NoTempDir: java.io.IOException: No such file or directory at hudson.WebAppMain.contextInitialized(WebAppMain.java:195) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4738) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5181) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1816) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createTempFile(File.java:2024) at java.io.File.createTempFile(File.java:2070) at hudson.WebAppMain.contextInitialized(WebAppMain.java:192) ... 13 more

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

将一个接口响应时间从2s优化到 200ms以内的一个案例

一、背景 在开发联调阶段发现一个接口的响应时间特别长,经常超时,囧… 本文讲讲是如何定位到性能瓶颈以及修改的思路,将该接口从 2 s 左右优化到 200ms 以内 。 二、步骤 2.1 定位 定位性能瓶颈有两个思路,一个是通过工具去监控,一个是通过经验去猜想。 2.1.1 工具监控 就工具而言,推荐使用 arthas ,用到的是 trace 命令 具体安装步骤很简单,大家自行研究。 我的使用步骤是...

学历低,无法胜任工作,大佬告诉你应该怎么做

微信上收到一位读者小涛的留言,大致的意思是自己只有高中学历,经过培训后找到了一份工作,但很难胜任,考虑要不要辞职找一份他能力可以胜任的实习工作。下面是他留言的一部分内容: 二哥,我是 2016 年高中毕业的,考上了大学但没去成,主要是因为当时家里经济条件不太允许。 打工了三年后想学一门技术,就去培训了。培训的学校比较垃圾,现在非常后悔没去正规一点的机构培训。 去年 11 月份来北京找到了一份工...

JVM内存结构和Java内存模型别再傻傻分不清了

JVM内存结构和Java内存模型都是面试的热点问题,名字看感觉都差不多,网上有些博客也都把这两个概念混着用,实际上他们之间差别还是挺大的。 通俗点说,JVM内存结构是与JVM的内部存储结构相关,而Java内存模型是与多线程编程相关,本文针对这两个总是被混用的概念展开讲解。 JVM内存结构 JVM构成 说到JVM内存结构,就不会只是说内存结构的5个分区,而是会延展到整个JVM相关的问题,所以先了解下

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Google 与微软的浏览器之争

浏览器再现“神仙打架”。整理 | 屠敏头图 | CSDN 下载自东方 IC出品 | CSDN(ID:CSDNnews)从 IE 到 Chrome,再从 Chrome 到 Edge,微软与...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

立即提问
相关内容推荐