-
I set up an activemq scaler. I looked at the scaler code and using the URL it constructs I can successfully curl or use a web browser to get a valid response. But in K8s when I describe the scaledobject I see this:
Any idea where that's coming from/what's causing it? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
As I put in the issue created from this discussion, the scaler DOES work with an older ActiveMQ version (5.10.x).. so at some point something broke. |
Beta Was this translation helpful? Give feedback.
-
I was hoping I'd be able to recreate it quickly using just a plain Go program doing mostly the same things the scaler code does, but that was succesful. The only difference was I didn't use the http.NewRequestWithContext, just NewRequest. Question, probably unrelated.. I see the scaler reference "defaultCorsHeader".. which for the AMQ scaler isn't defined vs another scaler I found it in (artemis) which has it defined as |
Beta Was this translation helpful? Give feedback.
-
I don't know if the context "matters" or not, I was just saying that I wrote a quick command-line Go program to mimic what the scaler does as much as possible, but wasn't sure what the values for the context stuff would be so I used "http.NewRequest" rather than "http.NewRequestWithContext". I'll see if I can get a real test working with actual Keda, K8s and AMQ 5.17.3 (unless that's somethig you can do, since I have to learn how to build it, modify it, test it, learn some "go", etc). I'm just looking to spit out the resp.Body that comes back from the REST call to see what it contains.. Since it's finding a "<" I assume its some HTML response that most likely contains some textual error information as to why the call didn't return the JSON Queue data requested. |
Beta Was this translation helpful? Give feedback.
-
I was able to get it so I can build/deploy my own version and start messing around. I'm printing out the contents of the resp.Body now.. this is what the operator is outputting:
Not sure why it's printing twice? I just added these 4 lines (one line above and below mine for context)
Since this is a different error than the "<" character one, I want to make sure I'm doing/deploying things correctly before going much further.. in case the EOF error has something to do with my dev/deploy process.. |
Beta Was this translation helpful? Give feedback.
-
@melisatanrverdi FYI ^^ |
Beta Was this translation helpful? Give feedback.
-
So this now looks more be me being an idiot and having a typo in the YAML. I have it successfuly working with AMQ 5.17.3. I am doing some "long running" tests right now because I did see the "<" error in the operator log "in the middle" of a working test.. but I've isolated myself in case someone else at work was touching anything. I had the encoded user and password backwards in the YAML, so my guess is the "<" character was from an "unauthorized" HTML response from AMQ. I'll continue my tests throughout the day, and if it all works I'll close this. |
Beta Was this translation helpful? Give feedback.
-
This can be closed. All stemmed from the AMQ Scaler sample YAML having:
and me blindly pasting in username first since username always comes first :-) During my hour-long test I did at one point see the operator spit out the "<" invalid character, but then it started working on the next metric request. There was a timeout error, so something must have happened with our AMQ server to cause a blip but the operator/scaler recovered just fine. |
Beta Was this translation helpful? Give feedback.
This can be closed. All stemmed from the AMQ Scaler sample YAML having:
and me blindly pasting in username first since username always comes first :-)
During my hour-long test I did at one point see the operator spit out the "<" invalid character, but then it started working on the next metric request. There was a timeout error, so something must have happened with our AMQ server to cause a blip but the operator/scaler recovered just fine.