I'm getting the following error when I try to run HMSET.
I'm not sure what the message means?
No way to dispatch this command to Redis Cluster. Missing key.
HMSET ABC12340112163928690398 XYZ12340112163928690429 b'eyJuY2lfaWQiOiAi='
The field's value is not passed properly - remove the leading "b" (a Pythonic value?) and it should work, i.e.:
HMSET ABC12340112163928690398 XYZ12340112163928690429 'eyJuY2lfaWQiOiAi='
Related
I am trying to create a snapshot first and then convert the snapshot to reference point. Creation of snapshot is successful and I am able to see it in HyperV manager. But when I try to call ConvertToReferencePoint method using Snapshot reference, I am getting NULL for Job output.
After creating snapshot, I am getting the settingsdata associated with it and edit it to rename the snapshot created. I extract the InstanceID field from it and generate the job path which is sent to ConvertToReferencePoint method.
CComVariant((L"Msvm_VirtualSystemSettingData.CreationClassName=\"Msvm_VirtualSystemSettingData\",InstanceID=\"" + snapRef + L"\"").c_str()));
Also DeleteSnapshot and DeleteSnapshotTree methods works fine even though they take Msvm_VirtualSystemSettingData path as parameters. Am I missing something.
Similar topic but different problem
:(WMI) ExecMethod out parameter - ResultingSnapshot is NULL irrespective of the result of the call, Why?
I even tried hardcoding below parameters using WMI Explorer tool.
AffectedSnapshot=\\hostname\ROOT\virtualization\v2:Msvm_VirtualSystemSettingData.InstanceID="Microsoft:5A58EE16-48E8-46E2-8162-065826537142"
ReferencePointSettings=""
ConvertToReferencePoint: NULL response.
Wbem::Parameters inParams;
//inParams.add(L"AffectedSnapshot", CComVariant((L"Msvm_VirtualSystemSettingData.CreationClassName=\"Msvm_VirtualSystemSettingData\",InstanceID=\"" + snapRef + L"\"").c_str()));
inParams.add(L"AffectedSnapshot", CComVariant(L"\\\\IWF1117030\\ROOT\\virtualization\\v2:Msvm_VirtualSystemSettingData.InstanceID=\"Microsoft:5A58EE16-48E8-46E2-8162-065826537142\""));
inParams.add(L"ReferencePointSettings", CComVariant(L""));
Wbem::ParametersPtr outParams(new Wbem::Parameters);
outParams->add(L"Job", CComVariant());
m_wbemServices->execObjectMethod(L"Msvm_VirtualSystemSnapshotService", L"Name=\"" + instanceName + L"\"", L"ConvertToReferencePoint", inParams, outParams);
DeleteSnapshot: Works fine.
std::wstring instanceName = getSingleInstanceNameForWMIClass(L"Msvm_VirtualSystemSnapshotService");
Wbem::Parameters inParams;
inParams.add(L"AffectedSnapshot", CComVariant((L"Msvm_VirtualSystemSettingData.CreationClassName=\"Msvm_VirtualSystemSettingData\",InstanceID=\"" + snapRef + L"\"").c_str()));
Wbem::ParametersPtr outParams(new Wbem::Parameters);
outParams->add(L"Job", CComVariant());
m_wbemServices->execObjectMethod(L"Msvm_VirtualSystemSnapshotService", L"Name=\"" + instanceName + L"\"", L"DestroySnapshot", inParams, outParams);
There is no error message. Just getting NULL value.
If someone has sample code to achieve this please share.
Check how you have created the snapshot in WMI explorer. It should be of type "Recovery" for ConvertToReferencePoint to work.
When I print current config values using println(system.settings.config.root().values())
I got long list of values, cutted:
[SimpleConfigObject({"separator":":"}),
SimpleConfigObject({"home":"/usr/local/Cellar/typesafe-activator/1.3.10"}),
,
SimpleConfigObject({"country":{"format":"UA"},"dir":"/Users/sr/ScalaProjects/akka-http-test","home":"/Users/sr","language":"en","name":"sr"})]
I want to get value of "dir" key.
I try to do it like this:
system.settings.config.getValue("dir")
but got exception:
com.typesafe.config.ConfigException$Missing: No configuration setting
found for key 'dir'
How to get this key?
You might be missing accessing user before accessing dir.
system.settings.config.getConfig("user").getValue("dir")
Note that you are not printing the config keys when printing root().values(), therefore you cannot see the "user" key. You should be able to see the full config block by printing (e.g.)
println(system.settings.config.root().entrySet())
I'm trying to use the erlcloud library for S3 uploads in my app. As a test, I'm trying to get it to list buckets via an iex console:
iex(4)> s3 = :erlcloud_s3.new("KEY_ID", "SECRET_KEY")
...
iex(5)> :erlcloud_s3.list_buckets(s3)
** (ErlangError) erlang error: {:aws_error, {:socket_error, :timeout}}
(erlcloud) src/erlcloud_s3.erl:909: :erlcloud_s3.s3_request/8
(erlcloud) src/erlcloud_s3.erl:893: :erlcloud_s3.s3_xml_request/8
(erlcloud) src/erlcloud_s3.erl:238: :erlcloud_s3.list_buckets/1
I've checked that inets, ssl, and erlcoud are all started, and I know the credentials work fine, because I've tested them in a similar fashion with a Ruby library in irb.
I've tried configuring it with a longer timeout, but no matter how high I set it I still get this error.
Any ideas? Or approaches I could take to debug this?
I could simulate the same error, and could resolve it by replacing double-quote with single-quote.
> iex(4)> s3 = :erlcloud_s3.new('KEY_ID', 'SECRET_KEY')
> iex(5)> :erlcloud_s3.list_buckets(s3)
Assuming the double-quote was used, it may be caused by a type mismatch between string and char-list.
I would like to increase the deploy time, in a stack layer that hosts many apps (AWS Opsworks).
Currenlty I get the following error:
Eror
[2014-05-05T22:27:51+00:00] ERROR: Running exception handlers
[2014-05-05T22:27:51+00:00] ERROR: Exception handlers complete
[2014-05-05T22:27:51+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache/chef-stacktrace.out
[2014-05-05T22:27:51+00:00] ERROR: deploy[/srv/www/lakers_test] (opsworks_delayed_job::deploy line 65) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 600s:
Thanks in advance.
First of all, as mentioned in this ticket reporting a similar issue, the Opsworks guys recommend trying to speed up the call first (there's always room for optimization).
If that doesn't work, we can go down the rabbit hole: this gets called, which in turn calls Mixlib::ShellOut.new, which happens to have a timeout option that you can pass in the initializer!
Now you can use an Opsworks custom cookbook to overwrite the initial method, and pass the corresponding timeout option. Opsworks merges the contents of its base cookbooks with the contents of your custom cookbook - therefore you only need to add & edit one single file to your custom cookbook: opsworks_commons/libraries/shellout.rb:
module OpsWorks
module ShellOut
extend self
# This would be your new default timeout.
DEFAULT_OPTIONS = { timeout: 900 }
def shellout(command, options = {})
cmd = Mixlib::ShellOut.new(command, DEFAULT_OPTIONS.merge(options))
cmd.run_command
cmd.error!
[cmd.stderr, cmd.stdout].join("\n")
end
end
end
Notice how the only additions are just DEFAULT_OPTIONS and merging these options in the Mixlib::ShellOut.new call.
An improvement to this method would be changing this timeout option via a chef attribute, that you could in turn update via your custom JSON in the Opsworks interface. This means passing the timeout attribute in the initial Opsworks::ShellOut.shellout call - not in the method definition. But this depends on how the shellout method actually gets called...
I'm new to whirr and AWS so apologies in advance if I'm asking something silly.
I'm following the directions here to set up whirr and
bin/whirr launch-cluster --config hadoop.properties
fails with the following:
[~/src/cloudera/whirr-0.1.0+23]$ bin/whirr version rvm:ruby-1.8.7-p299
Apache Whirr 0.1.0+23
[~/src/cloudera/whirr-0.1.0+23]$ bin/whirr launch-cluster --config hadoop.properties rvm:ruby-1.8.7-p299
Launching myhadoopcluster cluster
Exception in thread "main" com.google.inject.CreationException: Guice creation errors:
1) No implementation for java.lang.String annotated with #com.google.inject.name.Named(value=jclouds.credential) was bound.
while locating java.lang.String annotated with #com.google.inject.name.Named(value=jclouds.credential)
for parameter 2 at org.jclouds.aws.filters.FormSigner.<init>(FormSigner.java:91)
at org.jclouds.aws.config.AWSFormSigningRestClientModule.provideRequestSigner(AWSFormSigningRestClientModule.java:66)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:410)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:166)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:118)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:100)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at org.jclouds.rest.RestContextBuilder.buildInjector(RestContextBuilder.java:141)
at org.jclouds.compute.ComputeServiceContextBuilder.buildInjector(ComputeServiceContextBuilder.java:53)
at org.jclouds.aws.ec2.EC2ContextBuilder.buildInjector(EC2ContextBuilder.java:101)
at org.jclouds.compute.ComputeServiceContextBuilder.buildComputeServiceContext(ComputeServiceContextBuilder.java:66)
at org.jclouds.compute.ComputeServiceContextFactory.buildContextUnwrappingExceptions(ComputeServiceContextFactory.java:72)
at org.jclouds.compute.ComputeServiceContextFactory.createContext(ComputeServiceContextFactory.java:114)
at org.apache.whirr.service.ComputeServiceContextBuilder.build(ComputeServiceContextBuilder.java:41)
at org.apache.whirr.service.hadoop.HadoopService.launchCluster(HadoopService.java:84)
at org.apache.whirr.service.hadoop.HadoopService.launchCluster(HadoopService.java:61)
at org.apache.whirr.cli.command.LaunchClusterCommand.run(LaunchClusterCommand.java:61)
at org.apache.whirr.cli.Main.run(Main.java:65)
at org.apache.whirr.cli.Main.main(Main.java:91)
My hadoop.properties file has an AWS Access Key and Secret Access Key.
Any pointers on what I might have done wrong and what I need to do to fix this?
Thanks!
Okay so this appears to be a problem with the syntax in my hadoop.properties file. In the process of copying my keys across from the AWS management console, "Whirr.credential" got truncated to "Whirr.cred."
A classic face palm moment!
Anyway, leaving this up so that anyone googling for this error message knows to go triple check their hadoop.properties file!