In an offline environment Opencast fails to load HTTP resources

Steps to reproduce

After was resolved for 2.1.2, I disabled the Internet connection for our Opencast instances. But they still wanted to fetch a bunch of HTTP resources and thus had to wait some minutes for the timeout to occur. All resources point to Maven repositories. In the attachments is a list of URLs a running locally allinone instance from the r/2.x branch wanted to fetch. Also I think it's strange to load jar files during startup. This was not the case in version 2.1.2 where it only loads the *features.xml files.

Steps to reproduce:
1. Since it is Maven related: I had a clean .m2 directory.
2. Start Opencast with no Internet connection

Actual Results:
Opencast waits for a timeout to occur while fetching Maven resources.

Expected Results:
Opencast has no outgoing connections.

Workaround (if any):
Wait for the timeout.

Activity

Show:
Lars Kiesow
June 7, 2016, 2:07 PM
Stephen Marquard
April 19, 2017, 9:00 AM

Discussion on list:

From: Matthias Neugebauer mtneug@gmail.com
Sent: 19 April 2017 09:22 AM
To: Opencast Users <users@opencast.org>
Subject: [OC Users] Re: Error starting Opencast

Hi Plinio,

We also observed that Opencast fetches Maven resources during startup and filed https://opencast.jira.com/browse/MH-11640. Java sadly does not read the proxy environment variables (http_proxy, https_proxy, and so on), instead you have to pass some additional arguments. For this you can edit the bin/setenv file in the Opencast installation folder:

...

  1. export KARAF_REDIRECT # Enable/set the std/err redirection when using bin/start

export EXTRA_JAVA_OPTS="-Dhttp.proxyHost=my-proxy -Dhttp.proxyPort=80 -Dhttps.proxyHost=my-proxy -Dhttps.proxyPort=80 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1500000 -Dfile.encoding=UTF-8"
...

The arguments in the EXTRA_JAVA_OPTS variable will be appended during startup and Java will use the proxy. I hope that helps.

Regards,
Matthias

Am Donnerstag, 13. April 2017 20:29:00 UTC+2 schrieb Plinio Gañi:
Hello,

I thought I had successfully installed opencast (I am NOT an everyday linux user), but after starting opencast (karaf prompt without error messages), localhost:8080 is not responding.

Looking at the opencast log it seems there is an error while trying to add Features repository from http://repo1.maven.org/maven2/ (Connect to repo1.maven.org:80 [repo1.maven.org/151.101.4.209] failed: connection refused). Here's the log: https://jpst.it/XsIy

Any ideas what could be wrong and how to resolve it?

Thanks a lot in advance!

Best,

Plinio

Greg Logan
March 21, 2018, 5:16 PM

Is this still relevant with the 3.x, 4.x, and develop codebases? AFAIK our builds are entirely self-contained now.

Lars Kiesow
March 21, 2018, 8:30 PM

Hi Greg,
do you have any reason to believe this has changed? Afaik, the only
patch which may have affected the behavior was the Karaf update. And
I'm not sure about that.
–Lars

On Wed, 21 Mar 2018 17:16:48 +0000 (UTC)

Matthias Neugebauer
March 22, 2018, 9:02 AM
Edited

I just tried to start Opencast 4.2 Docker images without an internet connection and immediately got the following exception after starting Opencast, after which the boot process stopped:

2018-03-22 08:28:31,339 | WARN | (AetherBasedResolver:724) - Error resolving artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2: [Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to central (http://repo1.maven.org/maven2/): repo1.maven.org: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.release (http://repository.springsource.com/maven/bundles/release/): repository.springsource.com: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.external (http://repository.springsource.com/maven/bundles/external/): repository.springsource.com, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to gemini (http://zodiac.springsource.com/maven/bundles/release/): zodiac.springsource.com: Name does not resolve]
java.io.IOException: Error resolving artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2: [Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to central (http://repo1.maven.org/maven2/): repo1.maven.org: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.release (http://repository.springsource.com/maven/bundles/release/): repository.springsource.com: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.external (http://repository.springsource.com/maven/bundles/external/): repository.springsource.com, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to gemini (http://zodiac.springsource.com/maven/bundles/release/): zodiac.springsource.com: Name does not resolve]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:720)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:36)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)[6:org.apache.karaf.features.core:4.0.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_151]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:705)[5:org.ops4j.pax.url.mvn:2.5.2]
... 12 more
2018-03-22 08:28:31,346 | ERROR | (BootFeaturesInstaller:126) - Error installing boot features
org.apache.karaf.features.internal.util.MultiException: Error
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:363)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:360)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[6:org.apache.karaf.features.core:4.0.9]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
Caused by: java.io.IOException: Error downloading mvn:org.ops4j.pax.url/pax-url-wrap/2.5.2/jar/uber
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)[6:org.apache.karaf.features.core:4.0.9]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_151]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_151]
... 3 more
Caused by: java.io.IOException: Error resolving artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2: [Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to central (http://repo1.maven.org/maven2/): repo1.maven.org: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.release (http://repository.springsource.com/maven/bundles/release/): repository.springsource.com: Name does not resolve, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to spring.ebr.external (http://repository.springsource.com/maven/bundles/external/): repository.springsource.com, Could not transfer artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2 from/to gemini (http://zodiac.springsource.com/maven/bundles/release/): zodiac.springsource.com: Name does not resolve]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:720)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567)[5:org.ops4j.pax.url.mvn:2.5.2]
at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:36)[6:org.apache.karaf.features.core:4.0.9]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)[6:org.apache.karaf.features.core:4.0.9]
... 7 more
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.ops4j.pax.urlax-url-wrap:jar:uber:2.5.2
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:705)[5:org.ops4j.pax.url.mvn:2.5.2]
... 12 more

Assignee

Lars Kiesow

Reporter

Matthias Neugebauer

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Major
Configure