Comments (18)
Versions:
[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[aleph "0.2.1-alpha1"]
[gloss "0.2.1-alpha1"]
[compojure "0.6.5"]
Tried upgrading to 0.2.1-rc1 but couldn't not get through the test above without errors.
from aleph.
What version of Aleph are you using?
from aleph.
Zach, you are so fast. Version info above.
from aleph.
You're getting errors from running this in 0.2.1-rc1? That's not good, what are you seeing?
from aleph.
I'll give it a try right now and report the errors here.
from aleph.
Okay, turns out the example above works in 0.2.1-rc1, but when I actually try to subscribe to a redis channel, it errors out.
(ns test.test
(:use aleph.formats
lamina.core))
(def ch1 (aleph.redis/redis-stream {:host "localhost", :port 6379}))
(on-closed ch1 #(println "ch1 closed"))
(aleph.redis/subscribe ch1 "babe")
The last line that subscribes to the redis channel errors out in 0.2.1-rc1, but is fine in 0.2.1-alpha1. So we ended up using alpha1 for now.
from aleph.
What's the error when you try to subscribe?
from aleph.
Sorry, my bad:
2012-05-08 17:24:51,229 WARN lamina.core.pipeline: Unhandled exception in pipeline.
java.lang.IllegalArgumentException: No implementation of method: :read-bytes of protocol: #'gloss.core.protocols/Reader found for class: nil
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:471)
at gloss.core.protocols$fn__2411$G__2406__2418.invoke(protocols.clj:19)
at gloss.core.codecs$header$fn__3168.invoke(codecs.clj:22)
at gloss.core.protocols$compose_callback$reify__2463.read_bytes(protocols.clj:58)
at gloss.core.codecs$header$reify__3170.read_bytes(codecs.clj:26)
at gloss.core.protocols$compose_callback$reify__2463.read_bytes(protocols.clj:56)
at gloss.core.structure$compile_frame$reify__3165.read_bytes(structure.clj:120)
at gloss.io$decode_byte_sequence.invoke(io.clj:130)
at gloss.io$decode_channel$fn__3715$fn__3716.invoke(io.clj:153)
at lamina.core.pipeline$start_pipeline$fn__1046$fn__1064.invoke(pipeline.clj:208)
at lamina.core.pipeline$start_pipeline$fn__1046.invoke(pipeline.clj:207)
at lamina.core.pipeline$start_pipeline.invoke(pipeline.clj:164)
at lamina.core.pipeline$start_pipeline$fn__1046$fn__1050$f__997__auto____1052$fn__1053.invoke(pipeline.clj:196)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:540)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1502)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at lamina.core.pipeline$start_pipeline$fn__1046$fn__1050$f__997__auto____1052.invoke(pipeline.clj:188)
at lamina.core.pipeline$start_pipeline$fn__1046$fn__1050.invoke(pipeline.clj:187)
at lamina.core.queue$r_obs$fn__894.invoke(queue.clj:287)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.ConstantObservable$fn__563.invoke(observable.clj:202)
at lamina.core.observable.ConstantObservable.message(observable.clj:198)
at lamina.core.channel$enqueue.doInvoke(channel.clj:136)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at lamina.core.channel$poll$callback__971$fn__972$fn__973.invoke(channel.clj:213)
at lamina.core.queue$l_obs$fn__898.invoke(queue.clj:293)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.ConstantObservable$fn__563.invoke(observable.clj:202)
at lamina.core.observable.ConstantObservable.message(observable.clj:198)
at lamina.core.channel$enqueue.doInvoke(channel.clj:136)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at lamina.core.pipeline$success_BANG_.invoke(pipeline.clj:87)
at lamina.core.pipeline$read_channel$fn__1119.invoke(pipeline.clj:335)
at lamina.core.queue$r_obs$fn__894.invoke(queue.clj:287)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.ConstantObservable$fn__563.invoke(observable.clj:202)
at lamina.core.observable.ConstantObservable.message(observable.clj:198)
at lamina.core.channel$enqueue.doInvoke(channel.clj:136)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at lamina.core.channel$poll$callback__971$fn__972$fn__973.invoke(channel.clj:213)
at lamina.core.queue$send_to_callbacks.invoke(queue.clj:227)
at lamina.core.queue.EventQueue.enqueue(queue.clj:109)
at lamina.core.queue$setup_observable__GT_queue$fn__879.invoke(queue.clj:235)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.Observable.message(observable.clj:128)
at lamina.core.observable$siphon$fn__601$fn__603.invoke(observable.clj:243)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.Observable.message(observable.clj:128)
at lamina.core.observable$siphon$fn__601$fn__603.invoke(observable.clj:243)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.Observable.message(observable.clj:128)
at lamina.core.observable$siphon$fn__601$fn__603.invoke(observable.clj:243)
at lamina.core.observable$observer$reify__348.on_message(observable.clj:43)
at lamina.core.observable.Observable.message(observable.clj:125)
at lamina.core.channel$enqueue.doInvoke(channel.clj:136)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at aleph.tcp$basic_client_pipeline$fn__5376.invoke(tcp.clj:109)
at aleph.netty$message_stage$reify__3433.handleUpstream(netty.clj:139)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at aleph.netty$upstream_stage$reify__3425.handleUpstream(netty.clj:122)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at aleph.netty$upstream_stage$reify__3425.handleUpstream(netty.clj:122)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at aleph.netty$upstream_stage$reify__3425.handleUpstream(netty.clj:122)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
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:680)
from aleph.
Oh, BTW, when I said it "works" in rc1, I mean the code doesn't error out (unless I add the subscribe statement).
0.2.1-rc1 still seems to not close the original redis-stream when I close ch3.
BTW, your responses are much appreciated.
from aleph.
I'm unable to reproduce your issue with the subscribe statement in rc1, but I was able to determine the cause of the closing issue. The fix is available in 0.2.1-rc2.
Can you confirm that the new version fixes the closing issue for you, and can you provide me with a gist containing code that, when run, will print out the above error?
from aleph.
I'm on it.
from aleph.
Confirmed aleph 0.2.1-rc2 fixed the closing issue for me.
from aleph.
Here is the gist:
core.clj: https://gist.github.com/2634409
project.clj: https://gist.github.com/2634411
from aleph.
(this is run under lein)
from aleph.
Okay! So here's what happened: you were using 1.2.1, and I was using 1.3.
The problem was that there was a recent change in Gloss where enumeration values were meant to be stored as longs, but that was inconsistent in some cases. In 1.3, number lookups are consistent no matter what, but in 1.2 that's not the case. It was only once I used your project.clj with 1.2.1 that I started seeing the problem.
Anyway, it's fixed in 0.2.1-rc3, which is the same as the previous RC except that it points at the latest Gloss. Let me know if you have any other issues.
from aleph.
Also, thank you for bringing this to my attention, and for coming up with a reproducible example that included the project.clj.
from aleph.
Zach, I am out and about now but I will try your fix as soon as I get
home.
Also, I should really be thanking you for your quick fixes - providing a
standalone reproducible case is the least I can do. Much appreciated,
Zach!
from aleph.
Confirmed that if I use aleph-0.2.1-rc3 (which pulls down gloss-0.2.1-rc2), everything works fine. Thanks again Zach!
from aleph.
Related Issues (20)
- "Possibly confusing dependencies found" regression in 0.6.1 HOT 5
- Add support for `wrap-decompression` middleware HOT 9
- Please bump netty versions because of CVE-2023-34462 HOT 1
- Enable endpoint identification (aka hostname verification) for TLS clients by default? HOT 9
- Look into new Ring websocket support for Aleph HOT 2
- Add write backpressure by checking Channel writability
- Add support for aggregating all inbound data before calling server Ring handler HOT 2
- Default rejected-handler will leak buffers in raw stream HTTP servers HOT 1
- Overhaul docstring formatting for consistency HOT 2
- Hide application protocol config from users with `http-versions`
- Who uses Aleph? Add your name to this, we'd like to know HOT 4
- Reconsider `:aleph/`-namespaced keywords HOT 3
- io.netty.channel.AbstractChannelHandlerContext invokeExceptionCaught HOT 2
- 0.7.0-rc1 is crashing without brotli4j dependency #3530 HOT 2
- Treat de/compression asymmetrically in H2
- Track down potential idle-handler refcount testing leak HOT 11
- Question about single server process using both non-ssl and ssl HOT 3
- Support cancellation of HTTP requests HOT 2
- HTTP client connection pool timeout doesn't free up queue HOT 4
- Drop HTTP client connection pool's acquire queue HOT 1
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 aleph.