-
Notifications
You must be signed in to change notification settings - Fork 54
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
Running Hydra on AWS Elasticache #92
Comments
@waglik where do you see that error? Not sure I follow. Please provide more information on how you're running your application that uses Hydra and perhaps an example of your config file. |
@cjus I've created simple hydra application and then wrapped it into Docker image. When I run it locally on Redis running on local host it is fine. But when I run Docker image on AWS ESC it fails when starting. Reason is that AWS ElastiCache (this is my Redis instance) does not allow CONFIG command. here is my config file
Error happens when npm start is called. My guess is that it is happening here :
|
@waglik one thing you could try is backing the config into the service - not ideal - but good for seeing whether this is the only issue. Just create a JS object for your config and pass it into the hydra.init() call. Are you using hydra or hydraExpress? If hydraExpress then just pass the JavaScript object representing your config to hydraExpress.init. |
@waglik also, are you also using AWS Elastic Container Service? ECS? |
@cjus I am using just hydra (not hydraExpress). I've added couple of loggers so I am pretty confident that this fails in the init method. If I remove config.init() it works fine. Yes I am using ECS. I also checked connection with telnet so this is not an issue. Stack tracke :
|
@waglik Are you saying that if you don't use config.init() to load a config file then you don't have an issue? Does your redis url looking something like this? You can try to format your config this way:
Let me know if that makes a difference. |
@cjus I've added some more logging. Code looks like that :
Output is :
I'm using xyz-cluster.rmz72x.0001.euc1.cache.amazonaws.com cluster link and in config.json :
|
I'm not sure why it is trying to execute a CONFIG command. I couldn't find any calls to it in the node-redis module source, and we're not calling it directly from Hydra or Hydra Express. I can't see how it could have anything to do with loading config.json. @waglik, your code and config look OK to me. We're also using AWS Elasticache and haven't run into this issue. As a test to help narrow this down, could you try connecting to redis directly after config.init? E.g. something like: const redis = require('redis');
const config = require('fwsp-config');
config.init('./config/config.json')
.then(() => {
let client = redis.createClient(config.hydra.redis);
client.time(redis.print);
}); That should print out two values, e.g.
|
@waglik @emadum I think the issue might be that
Also see: https://github.com/flywheelsports/fwsp-config/blob/master/index.js#L18 |
@cjus just tried and gives same result. Beside same docker image works locally against Redis running on my localhost. So I am confident that issue is with AWS Redis and not with the code itself. From what I found AWS Redis does not allow calling CONFIG command. Is hydra calling that command inside init() method? |
@waglik did you see my comment above? |
@emadum no, sorry. I've made changes you suggested and I got :
code :
|
@waglik what version of node are you using? |
@waglik Hydra requires Node 6.2.1 or greater. |
@waglik Would you be interested in doing a skype call? I'm at cjustini34 |
@cjus I really appreciate that. I've sent you skype invite, let me know when is a good time. I am in EET time zone most of the time. |
@waglik accepted. I should be able to do a call during your evenings. |
@waglik I'm still interested in a skype call if you have time ;-) |
@cjus I am sorry I missed the notifications. I will ping you today. thanks! |
An update on this ticket. @waglik and I had a skype call to discuss and I'm in the process of setting up an AWS ECS cluster for testing this issue. |
Hi I'm looking into using hydra, it will be running on AWS - I just noticed this issue and wanted to check in and see if this is still an ongoing problem? :) |
@j3ddesign I never did get to test this. If you try it let us know what you find and we'll offer support. Recommend you sign up for our slack channel where others are on-hand to weigh in. |
I am trying to run Hydra app with AWS Elasticache but unfortunately I got
error. It is caused by the fact that config command is restricted on AWS ElastiCache. Is there a way to start hydra without calling config command?
The text was updated successfully, but these errors were encountered: