Comments (27)
Would be nice to incorporate https://www.npmjs.com/package/cbor if possible.
from kinesalite.
For disabling CBOR, see:
from kinesalite.
@schickling sorry, finally got around to doing this! https://github.com/mhart/kinesalite/blob/master/README.md#cbor-protocol-issues-with-the-java-sdk
from kinesalite.
now only if we can get tmccombs pull request approved and merged, that would be awesome
from kinesalite.
Merged and shipped in v3.3.0 – thanks all!
from kinesalite.
@twosider oh great! thanks. Looks like you can also set an environment variable, AWS_CBOR_DISABLE
:
@IainMeeke let me know if that works for you
from kinesalite.
Any idea what URL the SDK is trying to call that it's getting a 404 on?
from kinesalite.
it looks like it is trying to access http://<kinesalite-ip>:4567/
from kinesalite.
But do you know which action it's throwing that 404 for? ie, which one of these: http://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html
from kinesalite.
I've also encountered similar issues. I've tried it with the ListStreams
and PutRecord
actions and have had the result that @IainMeeke described above.
from kinesalite.
I guess this must be something specific to the Java SDK? The latest JavaScript and Python SDKs work fine (and so does the CLI):
$ aws kinesis list-streams --endpoint-url 'http://localhost:4567'
{
"StreamNames": []
}
I don't know enough about the Java SDK to know what they've changed – does it have debugging capabilities or something?
from kinesalite.
The aws cli works with the actions I mentioned above. It's the sdk that appears to have changed something.
from kinesalite.
Is there a chance the Java SDK is trying to talk CBOR to kinesalite instead of JSON? I noticed this in the release notes for 1.11.3:
Amazon Kinesis now supports Concise Binary Object Representation (Cbor) data format
Could it be using that by default? (the Content-Type
would probably be application/x-amz-cbor-1.1
)
This is the first I've heard of Amazon supporting that – kinesalite still only supports application/x-amz-json-1.1
– if this is the case, is there a config setting to change the Java SDK to use JSON?
from kinesalite.
It looks like the 1.11.x sdk does in fact send requests in the application/x-amz-cbor-1.1
format by default
from kinesalite.
Right, that would be it then. Can you see a way to override that for the SDK at least? It will take a bit of work to get kinesalite to support CBOR
from kinesalite.
@mhart works for me! Would be great if you could mention it in the Readme :)
from kinesalite.
+1, AWS_CBOR_DISABLE
works for us, too. Thanks for updating.
from kinesalite.
Hey can you please share a code snippet on how you used this property?
I'm using kinesis client and it seems that cbor is enabled by
default
from kinesalite.
@Liorba just set AWS_CBOR_DISABLE
in your environment variables. Eg, if you're on bash shell in linux:
export AWS_CBOR_DISABLE=1
Then you should be able to use your kinesis client from that session.
from kinesalite.
It appears to have some validation errors with tmccombs fork, and the a fix is available from https://github.com/lyi2012/kinesalite
from kinesalite.
https://github.com/tmccombs Thanks for taking this on! @mhart any thoughts on merging the PR?
from kinesalite.
Note - in order for us to get this working with the Kinesis Client Library we needed to use aws.cborEnabled=false instead in our environment variables.
from kinesalite.
@teracross can you elaborate a little? with the latest release you shouldn't need to set anything
from kinesalite.
Sure, this is the maven dependency that we are using for the Kinesis Client Library in our Java 1.8 project:
<dependency>
<groupId>software.amazon.kinesis</groupId>
<artifactId>amazon-kinesis-client</artifactId>
<version>2.1.3</version>
</dependency>
While trying to communicate with an instance of localstack running on Docker on my Mac, we noticed that we were getting 502 errors from LocalStack when trying to communicate with Kinesis. Using Wireshark we determined that the Kinesis Client Library was sending a request to LocalStack using the cbor based protocol. In response, a 502 error was returned to the Kinesis Client Library from localstack.
This might have to do with the version of the Kinesis Client Library that we are using, but just wanted to document this in case anyone else might encounter the same issue.
from kinesalite.
@teracross are you sure localstack is using the version that has this feature in? It was only released in v3.3.0 2 days ago.
See: #31 (comment)
from kinesalite.
We are not specifying a LocalStack version, so my assumption is that whichever image that is tagged as "latest" is probably being used.
Was not aware that an update for this specific issue was released 2 days ago, so that is a possibility.
from kinesalite.
LocalStack? you are in the wrong place my friend. pretty sure they haven't integrated this change yet
from kinesalite.
Related Issues (20)
- SerializationException thrown when CBOR is enabled in java client
- Invalid base64
- Kinesalite not allowing colon character in tags, though AWS does allow
- Json Unmarshal Exception with AWS java SDK 2.X HOT 3
- Kinesalite allows splitting the same shard multiple times
- kinesis object read from stream have different capitalization than Kinesis
- Does not work with @aws-sdk/client-kinesis (v3) HOT 3
- Reading from kinesalite stream works, but writing to it fails with security token invalid error message HOT 4
- Inaccessible host localhost error when calling the createStream method and using NodeJS 16
- Failed to disable certificate validation, KCL with Kinesalite ssl enabled
- Logstash kinesis-input-plugin with kinesis lite?
- kinesis get-shard-iterator --shard-iterator-type AT_TIMESTAMP not return response HOT 3
- npm audit security report level-sublevel HOT 1
- Amount of shards are always 0 HOT 2
- High cpu
- Error when GetShardIterator by timestamp
- UnknownOperationException thrown by Java AWS SDK during ShardSyncTask HOT 1
- server-crt.pem file is expired
- Creating streams takes rather long HOT 2
- Implement NextToken/MaxRecords for ListShards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinesalite.