Why does my maven break into closed repository? - maven

I have configured many repositories, as I found in
MAVEN_HOME/conf/settings.xml
I was thinking this will increase availability of packages for my workplace.
Unfortunately it creates some additional problems. For example, I have configured repository
<repository>
<id>lhogie.i3s.maven.repo</id>
<name>Luc Hogie Maven repository</name>
<url>http://www.i3s.unice.fr/~hogie/maven_repository/</url>
</repository>
which website is currently down or is unstable.
Nevertheless, my Maven is trying to download something from this repository again and again, receiving permission denied and then trying again. It does this even for those packages, which are calmly present on central repository.
Why?
Why doesn't it try other repositories if knocked out of one of them?
SAMPLE OF STDOUT
Downloading: http://www.i3s.unice.fr/~hogie/maven_repository/org/eclipse/jetty/toolchain/jetty-toolchain/1.4/jetty-toolchain-1.4.pom
ш■э 25, 2014 4:18:22 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
ш■э 25, 2014 4:18:22 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
ш■э 25, 2014 4:18:43 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
ш■э 25, 2014 4:18:43 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
ш■э 25, 2014 4:19:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
ш■э 25, 2014 4:19:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect

Probably because Maven doesn't want to hide problems from you. I don't know the algorithm which Maven uses but I think it just tries all repos in order until it finds what it looks for. So you can simply add Maven Central as the first repo and it will stop early.
But a better solution is usually to install a proxy server in your local network. It will keep a mirror of all the packages that you use. You can then tell Maven to ask the proxy (so you don't have to keep N repos in the same state in all settings.xml of many developers) plus doing the first build for a new developer (or for you when you have to wipe your local repo) will be much faster.

Related

Maven artifact transfer fails in AWS due to Connection reset errors

Facing some issues when building with Maven in AWS ECS. Not entirely sure what the problem is at the moment.
FYI this build runs on a docker container on an EC2 host
telnet is fine.
[root#host ~]# telnet repo.maven.apache.org 443
Trying 151.101.60.215...
Connected to repo.maven.apache.org.
Escape character is '^]'.
For the most part it downloads up to a point.
07:52:10 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) # hybris-package ---
07:52:10 [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
07:52:10 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
07:52:10 Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.pom
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection reset
07:52:13 May 09, 2018 7:52:13 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
07:52:13 INFO: Retrying request to {s}->https://repo.maven.apache.org:443
07:52:13
Bit perplexed, traffic would be routed via the NAT gateways. There are some interesting articles on the use of NAT's but none of which purport to reasoning enough to effect this simple use case.
Any ideas folks?

Radoop: java.net.ConnectException: Connection refused: connect

I have installed Rapidminer , Radoop , Hadoop and Hive for Single node cluster and performed Radoop Connection and got error like this.
[Jan 28, 2017 12:28:27 AM]: Connection test for 'Kanni' started.
[Jan 28, 2017 12:28:27 AM]: Using Radoop version 7.3.0.
[Jan 28, 2017 12:28:27 AM]: Running tests: [Hive connection, Fetch dynamic settings, Java version, HDFS, MapReduce, Radoop temporary directory, MapReduce staging directory, Spark assembly jar existence, UDF jar upload, Create permanent UDFs]
[Jan 28, 2017 12:28:27 AM]: Running test 1/10: Hive connection
[Jan 28, 2017 12:28:27 AM]: Hive server 2 connection (localhost:10000) test started.
[Jan 28, 2017 12:28:28 AM] SEVERE: Test failed: Hive connection
[Jan 28, 2017 12:28:28 AM]: Cleaning after test: Hive connection
[Jan 28, 2017 12:28:28 AM]: Total time: 1.031s
[Jan 28, 2017 12:28:28 AM] SEVERE: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default:
java.net.ConnectException: Connection refused: connect
[Jan 28, 2017 12:28:28 AM] SEVERE: Hive server 2 connection test failed. Please check that the server/daemon runs and is accessible on the address and port you specified.
[Jan 28, 2017 12:28:28 AM] SEVERE: Test failed: Hive connection
[Jan 28, 2017 12:28:28 AM] SEVERE: Connection test for 'Kanni' failed.
can anyone help me tpo get rid of this problem!
Check your Ports which are necessary to be opend for the connection between Radoop and RapidMiner. (NameNode, DataNode ...)
Is Hadoop running on the same system as RapidMiner or in a Cloud like Azure?
Can you as well share your logs with us so we can have a closer look?

InvocationTargetException in jenkins machine while running selenium RemoteWebdriver

I made a setup to run selenium scripts during jenkins build. Jenkins is available in linux machine and selenium-server-standalone-2.39.0.jar is running in the jenkins machine.
The selenium grid will run the scripts in windows machine and the code looks like,
DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
desiredCapabilities.setBrowserName("chrome");
desiredCapabilities.setPlatform(Platform.ANY);
WebDriver driver = new RemoteWebDriver(new URL("http://example.com:5555/wd/hub"), desiredCapabilities);
I also have the below setup in jenkins,
maven is used to run the selenium test suite and the junit test report are published.
Sometime the jenkins machine is going down with the below error,
Jun 24, 2015 4:15:57 AM hudson.node_monitors.ResponseTimeMonitor$1 monitor
WARNING: Making NewSlave offline because it’s not responding
Jun 24, 2015 4:44:04 AM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: it.transientActions in /job/Selenium_GRID/4/console. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
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 java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at com.chikli.hudson.plugin.naginator.NaginatorActionFactory.createFor(NaginatorActionFactory.java:20)
at hudson.model.Run.getTransientActions(Run.java:362)
... 122 more
Jun 24, 2015 5:15:42 AM hudson.model.Run execute
This is the selenium server log,
Jun 22, 2015 6:46:04 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Connection refused
Jun 22, 2015 6:47:12 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Connection timed out
Jun 22, 2015 6:47:12 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy onEvent
WARNING: Marking the node as down. Cannot reach the node for 2 tries.
Jun 22, 2015 6:48:20 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Connection refused
Jun 22, 2015 6:48:20 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy onEvent
WARNING: Unregistering the node. It's been down for 67828 milliseconds.
Jun 22, 2015 6:48:20 PM org.openqa.grid.internal.Registry removeIfPresent
WARNING: Proxy 'host :http://xxx.xxx.y.z:5555' was previously registered. Cleaning up any stale test sessions.
The problem is that, jenkins is going down when the selenium scripts got failed or sometimes when viewing the failed test results in jenkins test report.Can anyone please suggest why this issue is occuring and how to resolve this issue?
Is this issue occuring due to the selenium server running in jenkins machine or any other reason?

TeamCIty Server on EC2 Linux instance dies before it's done starting up

I'm installing TeamCity in EC2, starting with the Server then moving on the agents. I'm starting with the Amazon Linux AMI, running on a micro instance. Then I did:
sudo yum update
wget http://download.jetbrains.com/teamcity/TeamCity-7.1.1.tar.gz
tar -xvzf TeamCity-7.1.1.tar.gz
cd TeamCity
bin/teamcity-server.sh start
When I start it using bin/teamcity-server.sh start, things happen. I can connect using a web browser which shows the 'TeamCity is starting' page. The teamcity-server.log shows a bunch of activity, unzipping plugins etc.
But then suddently, the server process just disappears. The port's no longer listened to, ps shows no java process running, and the browser can't connect.
There's no error messages in the catalina or teamcity logs. After much trial and error though, I ran bin/teamcity-server.sh run (instead of start) to get console output, and got the following:
Using CATALINA_BASE: /home/ec2-user/TeamCity
Using CATALINA_HOME: /home/ec2-user/TeamCity
Using CATALINA_TMPDIR: /home/ec2-user/TeamCity/temp
Using JRE_HOME: /usr/lib/jvm/jre
Using CLASSPATH: /home/ec2-user/TeamCity/bin/bootstrap.jar:/home/ec2-user/TeamCity/bin/tomcat-juli.jar
Nov 1, 2012 7:22:25 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Nov 1, 2012 7:22:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8111"]
Nov 1, 2012 7:22:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2742 ms
Nov 1, 2012 7:22:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 1, 2012 7:22:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Nov 1, 2012 7:22:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/ec2-user/TeamCity/webapps/ROOT
Log4J configuration file /home/ec2-user/TeamCity/bin/../conf/teamcity-server-log4j.xml will be monitored with interval 10 seconds.
Nov 1, 2012 7:22:30 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8111"]
Nov 1, 2012 7:22:30 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3786 ms
=======================================================================
TeamCity 7.1.1 (build 24074) initialized, OS: Linux, JRE: 1.6.0_24-b24
TeamCity is running in professional mode
bin/teamcity-server.sh: line 18: 4231 Killed ./catalina.sh $1
I promise that I did not kill the process! I can find my way around in Linux well enough, but I'm not at all sure where to go next to find out why or what killed the process. Can anyone help?
After some further scanning of .sh files to see how TeamCity was starting itself up, I noticed that it was grabbing a fair amount of memory for it's java process (either 512m or 750m depending on which line you use).
The EC2 micro instance only has 613m of RAM total. When I realized this, I tried the whole process again with a larger instance, and things worked fine.
I'm still curious if there's a better way I could've known what was causing catalina to die, so if anyone wants to answer with that information...

Handshaking not happening between master and slave in jenkins

How to solve this error? Error occurred since I make master ip to public and assign DNS.
Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://10.10.1.162:8080/jenkins/, http://dem
Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to demo.sigmainfo.in:8050
Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jul 27, 2012 12:44:58 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: The server rejected the connection:
java.lang.Exception: The server rejected the connection:
at hudson.remoting.Engine.onConnectionRejected(Engine.java:258)
at hudson.remoting.Engine.run(Engine.java:233)
I have seen so many thread regarding this, but didn't get any answer properly.
I connected using headless slave agent and put HOST:PORT in advanced setting of configuration of slave. Master is linux and slave is windows 7.
From Comments:
=================================
Since you are having problems with the public IP & DNS, can you make sure that routing for the public IP and DNS is allowed on your network. Just to be sure this is not a firewall issue. Are you on a corporate network? In that case, your corporate firewall may be blocking certain ports on all IP addresses.

Resources