Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aws-sdk-java to 1.10.11 #234

Merged
merged 1 commit into from
Aug 24, 2015
Merged

Update aws-sdk-java to 1.10.11 #234

merged 1 commit into from
Aug 24, 2015

Conversation

lusid
Copy link
Contributor

@lusid lusid commented Aug 17, 2015

Fixes #233

Amazon SDK v1.9.34 S3 functionality used by elasticsearch-cloud-aws no longer works after OpenJDK v1.8u60 due to JodaTime issues with timezone. More information here: aws/aws-sdk-java#444

@dadoonet
Copy link
Member

See also elastic/elasticsearch#12859

@lusid lusid closed this Aug 18, 2015
@lusid
Copy link
Contributor Author

lusid commented Aug 18, 2015

Any idea how long it will take for a change like that to go through review and possible make it back to ES 1.5 (or 1.7 at least)?

@dadoonet
Copy link
Member

For now I'm reopening your PR for this repo in case we plan to fix it for 1.7 and previous versions.

@dadoonet dadoonet reopened this Aug 18, 2015
@lusid
Copy link
Contributor Author

lusid commented Aug 18, 2015

Thanks, I appreciate it. Considering this happened using the official ElasticSearch repository in DockerHub and was sparked by them making a modification to all of their base images as far as I can tell (in this case the java:8 repo), I would imagine there will be many others having this problem soon if they aren't already.

@dadoonet dadoonet merged commit 0a8fb47 into elastic:master Aug 24, 2015
dadoonet added a commit that referenced this pull request Aug 24, 2015
Follow up for #234.

Release notes: http://aws.amazon.com/releasenotes/Java/6635368276326731

Closes #236.
(cherry picked from commit 51d70f2)
(cherry picked from commit bc56248)
(cherry picked from commit 9781068)
(cherry picked from commit a6d7787)
dadoonet pushed a commit that referenced this pull request Aug 24, 2015
See #234

(cherry picked from commit 0a8fb47)
dadoonet added a commit that referenced this pull request Aug 24, 2015
Follow up for #234.

Release notes: http://aws.amazon.com/releasenotes/Java/6635368276326731

Closes #236.
(cherry picked from commit 51d70f2)
dadoonet pushed a commit that referenced this pull request Aug 24, 2015
See #234

(cherry picked from commit 0a8fb47)
dadoonet added a commit that referenced this pull request Aug 24, 2015
Follow up for #234.

Release notes: http://aws.amazon.com/releasenotes/Java/6635368276326731

Closes #236.
(cherry picked from commit 51d70f2)
(cherry picked from commit bc56248)
(cherry picked from commit 9781068)
dadoonet pushed a commit that referenced this pull request Aug 24, 2015
See #234

(cherry picked from commit 0a8fb47)
dadoonet added a commit that referenced this pull request Aug 24, 2015
Follow up for #234.

Release notes: http://aws.amazon.com/releasenotes/Java/6635368276326731

Closes #236.
(cherry picked from commit 51d70f2)
(cherry picked from commit bc56248)
dadoonet pushed a commit that referenced this pull request Aug 24, 2015
See #234

(cherry picked from commit 0a8fb47)
dadoonet added a commit that referenced this pull request Aug 24, 2015
@dadoonet
Copy link
Member

Anyone is up to run a test on a test cluster ?

bin/plugin install cloud-aws --url https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-cloud-aws/2.7.1-SNAPSHOT/elasticsearch-cloud-aws-2.7.1-20150824.122206-1.zip

The goal is to run elasticsearch 1.7 with this 2.7.1-SNAPSHOT version using either Java 1.7.0_85 or 1.8u60 (or >)

If you guys tries it, could you report here?

Thanks a lot for your help!

@pvanderlinden
Copy link

@dadoonet

I still have the same issue with the 2-7.1-SNAPSHOT cloud-aws plugin, running elasticsearch 1.7.1, Oracle java 1.8u60

[2015-08-25 10:46:30,036][WARN ][snapshots                ] [Anomalito] failed to create snapshot [abcde:sdfsdf]
org.elasticsearch.snapshots.SnapshotCreationException: [abcde:sdfsdf] failed to create snapshot
    at org.elasticsearch.repositories.blobstore.BlobStoreRepository.initializeSnapshot(BlobStoreRepository.java:260)
    at org.elasticsearch.snapshots.SnapshotsService.beginSnapshot(SnapshotsService.java:290)
    at org.elasticsearch.snapshots.SnapshotsService.access$600(SnapshotsService.java:92)
    at org.elasticsearch.snapshots.SnapshotsService$1$1.run(SnapshotsService.java:211)
    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: Unable to upload object es-test-backup/snapshot-sdfsdf due to AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 645B595151F0F941)
    at org.elasticsearch.cloud.aws.blobstore.DefaultS3OutputStream.upload(DefaultS3OutputStream.java:116)
    at org.elasticsearch.cloud.aws.blobstore.DefaultS3OutputStream.flush(DefaultS3OutputStream.java:90)
    at org.elasticsearch.cloud.aws.blobstore.S3OutputStream.flushBuffer(S3OutputStream.java:71)
    at org.elasticsearch.cloud.aws.blobstore.S3OutputStream.close(S3OutputStream.java:89)
    at org.elasticsearch.repositories.blobstore.BlobStoreRepository.initializeSnapshot(BlobStoreRepository.java:237)
    ... 6 more

@dadoonet
Copy link
Member

@pvanderlinden can you tell me what you have in elasticsearch lib directory and in plugins/cloud-aws directory? Could you run a ls -l in both places?

Thanks!

Also, how did you install your JVM? I mean, download from oracle?

@pvanderlinden
Copy link

@dadoonet
The JVM is from an ubuntu PPA: https://launchpad.net/~webupd8team/+archive/ubuntu/java which does that automaticly for you.

The ls -l:

lib:
total 29208
-rw-r--r-- 1 root root   167735 Jul 29 09:56 antlr-runtime-3.5.jar
-rw-r--r-- 1 root root   448794 Jul 29 09:56 apache-log4j-extras-1.2.17.jar
-rw-r--r-- 1 root root    47359 Jul 29 09:56 asm-4.1.jar
-rw-r--r-- 1 root root    38090 Jul 29 09:56 asm-commons-4.1.jar
-rw-r--r-- 1 root root 14048559 Jul 29 09:56 elasticsearch-1.7.1.jar
-rw-r--r-- 1 root root  6998724 Jul 29 09:56 groovy-all-2.4.4.jar
-rw-r--r-- 1 root root   914597 Jul 29 09:56 jna-4.1.0.jar
-rw-r--r-- 1 root root   794991 Jul 29 09:56 jts-1.13.jar
-rw-r--r-- 1 root root   489884 Jul 29 09:56 log4j-1.2.17.jar
-rw-r--r-- 1 root root  1699875 Jul 29 09:56 lucene-analyzers-common-4.10.4.jar
-rw-r--r-- 1 root root  2563490 Jul 29 09:56 lucene-core-4.10.4.jar
-rw-r--r-- 1 root root    75491 Jul 29 09:56 lucene-expressions-4.10.4.jar
-rw-r--r-- 1 root root   107784 Jul 29 09:56 lucene-grouping-4.10.4.jar
-rw-r--r-- 1 root root   138282 Jul 29 09:56 lucene-highlighter-4.10.4.jar
-rw-r--r-- 1 root root    64021 Jul 29 09:56 lucene-join-4.10.4.jar
-rw-r--r-- 1 root root    36078 Jul 29 09:56 lucene-memory-4.10.4.jar
-rw-r--r-- 1 root root    97173 Jul 29 09:56 lucene-misc-4.10.4.jar
-rw-r--r-- 1 root root   213029 Jul 29 09:56 lucene-queries-4.10.4.jar
-rw-r--r-- 1 root root   391515 Jul 29 09:56 lucene-queryparser-4.10.4.jar
-rw-r--r-- 1 root root   119449 Jul 29 09:56 lucene-sandbox-4.10.4.jar
-rw-r--r-- 1 root root   126794 Jul 29 09:56 lucene-spatial-4.10.4.jar
-rw-r--r-- 1 root root   179011 Jul 29 09:56 lucene-suggest-4.10.4.jar
drwxr-xr-x 2 root root     4096 Aug 14 14:53 sigar
-rw-r--r-- 1 root root   102177 Jul 29 09:56 spatial4j-0.4.1.jar

plugins/cloud-aws/:
total 6456
-rw-r--r-- 1 root root  518808 Aug 25 14:23 aws-java-sdk-core-1.10.12.jar
-rw-r--r-- 1 root root 2166484 Aug 25 14:23 aws-java-sdk-ec2-1.10.12.jar
-rw-r--r-- 1 root root  258578 Aug 25 14:23 aws-java-sdk-kms-1.10.12.jar
-rw-r--r-- 1 root root  594380 Aug 25 14:23 aws-java-sdk-s3-1.10.12.jar
-rw-r--r-- 1 root root   58160 Aug 25 14:23 commons-codec-1.4.jar
-rw-r--r-- 1 root root   62050 Aug 25 14:23 commons-logging-1.1.3.jar
-rw-r--r-- 1 root root   47425 Aug 25 14:23 elasticsearch-cloud-aws-2.7.1-SNAPSHOT.jar
-rw-r--r-- 1 root root  590533 Aug 25 14:23 httpclient-4.3.5.jar
-rw-r--r-- 1 root root  282269 Aug 25 14:23 httpcore-4.3.2.jar
-rw-r--r-- 1 root root   39815 Aug 25 14:23 jackson-annotations-2.5.0.jar
-rw-r--r-- 1 root root  229998 Aug 25 14:23 jackson-core-2.5.3.jar
-rw-r--r-- 1 root root 1143162 Aug 25 14:23 jackson-databind-2.5.3.jar
-rw-r--r-- 1 root root  589289 Aug 25 14:23 joda-time-2.7.jar

@dadoonet
Copy link
Member

@pvanderlinden Everything looks correct to me. I guess that you restarted the node, right?

I heard recently on a similar issue with openJDK 1.7.0.85.

It worked well when using redhead/centos openJDK 1.7.0.85 build 2.6.1.3.el6_6 but not when using openJDK 1.7.0.85 build 2.6.1.3.el6_7

Any chance here you have a similar issue?

@pvanderlinden
Copy link

@dadoonet I restarted the node indeed.

Not sure what your question is? What I had before I upgraded: Oracle Java 1.8u45 with cloud-aws on version 2.5.0, that still works fine in an old test instance. On an other test instance I completely removed java, and all downloaded packages for java, reinstalled, but it is still failing with the same error.

@dadoonet
Copy link
Member

Did you run at some point ES 1.5 + CloudAWS 2.5.0 but with Latest Java Oracle version on the same machine?
Was it working?

I'm trying to understand where the issue is coming from. JVM? Cloud plugin? AWS SDK? ...

@pvanderlinden
Copy link

@dadoonet I tried a couple of things on a test machine and other installations
Working for me: 1.8u45 with ES 1.5/1.7/1.7.1 and plugin 2.5.0/2.7.1-snapshot
Not working for me: 1.8.u60 with ES 1.7/1.7.1 with plugin 2.7.1-snaphot/2.5.0
I did not try ES 1.5 with 1.8u45

@dadoonet
Copy link
Member

Sorry you wrote:

Working for me: 1.8u45 with ES 1.5/1.7/1.7.1 and plugin 2.5.0/2.7.1-snapshot

And then

I did not try ES 1.5 with 1.8u45

You meant you did not try ES 1.5 with 1.8u60, right?

Whatever, I saw this comment today: aws/aws-sdk-java#444 (comment)

Might be the same concern... Will investigate more.

@pvanderlinden
Copy link

I meant that I didn't try ES 1.5 with 1.8u60 indeed.

@dadoonet
Copy link
Member

Ok I know what is wrong. I'll update the SNAPSHOT and report again here. Thanks for your help so far!

@dadoonet
Copy link
Member

Could you try:

bin/plugin install cloud-aws --url https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-cloud-aws/2.7.1-SNAPSHOT/elasticsearch-cloud-aws-2.7.1-20150826.180934-2.zip

Thanks!

@pvanderlinden
Copy link

The new snapshot works fine, create, restore and list snapshot all works again, Thanks.

@dadoonet
Copy link
Member

\o/ Thanks again for your help! I really appreciate. Planning to release soonish now.

dadoonet added a commit that referenced this pull request Aug 26, 2015
Follow up for discussion #234

We need to pull in Joda 2.8.2 and don't rely of the version declared by elasticsearch which is currently 2.7.

It will fix issues seen with recent Java versions. See also aws/aws-sdk-java#444

Closes #239.
(cherry picked from commit 0db449a)
dadoonet added a commit that referenced this pull request Aug 26, 2015
Follow up for discussion #234

We need to pull in Joda 2.8.2 and don't rely of the version declared by elasticsearch which is currently 2.7.

It will fix issues seen with recent Java versions. See also aws/aws-sdk-java#444

Closes #239.
@pvanderlinden
Copy link

Thanks for fixing. This should fix my last problem with the ELK stack hopefully.

@peter-svensson
Copy link

Will there be a release 2.7.1 with this fix anytime soon?

@dadoonet
Copy link
Member

@pliljenberg Definitely yes! Very very soon!

@dadoonet
Copy link
Member

@pliljenberg @pvanderlinden @lusid 2.7.1 and 2.6.1 have been released.

@dbaggott
Copy link

@dadoonet, any chance of getting 2.7.1 into the maven repository? As best as I can see, only 2.7.0 is available. Thanks!

@dadoonet
Copy link
Member

@dbaggott weird! Sounds like it was partially released. Indeed, artifacts are not in maven repo.
Will fix it hopefully tomorrow. Thanks for reporting!

@dbaggott
Copy link

@dadoonet, thank you!

@dbaggott
Copy link

ps you probably already noted this but all of the fixed versions are missing: 2.4.3, 2.5.2, etc

@dadoonet
Copy link
Member

No I didn't. Need to fix that.

@dadoonet
Copy link
Member

@dbaggott I looked at it.

  • 2.4.2 is the latest for 1.4
  • 2.5.1 is the latest for 1.5
  • 2.6.1 is the latest for 1.6: this one is missing
  • 2.7.1 is the latest for 1.7: this one is missing

I just pushed the last 2 versions. It will need some minutes I guess to be synchronized on maven central.

Thanks again for raising that!

@dbaggott
Copy link

Fantastic, thank you. I can confirm that both 2.7.1 and 2.6.1 are now available (despite not showing up in the UI yet).

@smiller171
Copy link

Has this fix been backported to ES 1.5?

@dadoonet
Copy link
Member

No. You should update to elasticsearch 1.7 and update AWS plugin accordingly.

@dadoonet
Copy link
Member

I meant it has been backported but this branch has not been released since.

adrpar pushed a commit to adrpar/elasticsearch-cloud-aws that referenced this pull request Dec 16, 2015
Follow up for elastic#234.

Release notes: http://aws.amazon.com/releasenotes/Java/6635368276326731

Closes elastic#236.
(cherry picked from commit 51d70f2)
(cherry picked from commit bc56248)
(cherry picked from commit 9781068)
(cherry picked from commit a6d7787)
@EdgeCaseBerg
Copy link

@smiller171
I assume you already figured out a solution, but just in case someone else comes along and is really trying to get something to work. I got the snapshot/repository stuff working by doing the following:

  1. Install 2.5.2 snapshot
bin/plugin install cloud-aws --url https://oss.sonatype.org/content/repositories/snapshots/org/elasticsearch/elasticsearch-cloud-aws/2.5.2-SNAPSHOT/elasticsearch-cloud-aws-2.5.2-20150822.225952-55.zip
  1. Download some jar files:
    Joda 2.8.2
    AWS SDK Core 1.10.15
    AWS SDK Core 1.10.15

  2. mv the old versions of those jars out of the plugins/cloud-aws directory and move those new jars in

  3. Restart ES

It worked for me doing this. But I only have to do this for a local environment running Java 8 I have (since we're running Java 7 where our actual cluster is) so I don't think I'd really recommending downloading a snapshot and changing out jars in the plugin directory. It'd probably be a little safer to replace the other AWS jars as well, but like I said, I didn't because on my local environment I didn't need to test any of the other features of the cloud-aws plugin

Sorry for resurrecting an old thread after the solution for people running 1.5 is to migrate to a different version was given by the maintainer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants