I am receiving the following error upon running
$puppet agent --test
$err: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass rails_var2 to Class[class_name] at /etc/puppet/modules/module_name/manifests/init.pp:1 on node node_name
And What I'm seeing is that the init.pp does pass rails_var2 to the class_name.
class class_name ( $rails_var, $rails_var2 )
Which is defined within apache::vhost
apache::vhost { "somename.${rails_var}":
...
variable_app_env => $rails_var2
What could be going wrong here?
Related
When I set the scenario in gatling to run during 1 hour the execution result throw me the next error:
i.g.h.a.AsyncHandlerActor - Request 'List' failed: status.find.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 502
I tried to add .disableCaching and .shareConnections in httpConf configuration but I'm in the same situation.
Scenario configuration:
val filter = scenario("FilterSearch").during(1 hours){exec(Login.login, FilterSearchPurchase.search)}
User injection:
setUp(
filter.inject(splitUsers(50) into(atOnceUsers(10)) separatedBy(5 minutes)).protocols(httpConf)
)
When I try to execute without .during() everything goes correctly.
Thanks.
I have below code and I am getting error:
Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in C:\xampp\htdocs\ldap.php on line 17
<?php
$ldapconfig['host'] = "dsua1.company.com";
$ldapconfig['port'] = 636;
$ldapconfig['basedn'] = "cn=userid,ou=Applications,ou=Company,ou=Services,dc=iM-2,dc=com";
$ldapconfig['binddn'] = "userid";
$ldapconfig['bindpw'] = "password";
$ldapconn=ldap_connect($ldapconfig['host'],$ldapconfig['port']);
ldap_bind($ldapconn, $ldapconfig['binddn'], $ldapconfig['bindpw']);
?>
Since you specified port 636, I assume that you need an SSL-connection to the server. This is achieved by:
ldap_connect("ldaps://".$ldapconfig['host']."/");
Otherwise it would try to send plaintext data which would not be accepted on an SSL-socket.
Furthermore, try this after ldap_connect() and before ldap_bind():
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
Sometimes an error occurs when an incorrect protocol version is used, 3 is common now, but not standard for the ldap_* PHP function family.
I am trying to build a simple asynchronous web service with Apache and mod_perl. But every time I try to return HTTP status 202 (Accepted), I get an error.
Below a very simple example (non-asynchronous):
package MyHandler;
use Apache2::Const '-compile' => qw 'OK HTTP_ACCEPTED HTTP_OK';
use Apache2::RequestRec;
use CGI;
sub handler {
my $r = shift;
print "Hallo";
$r->content_type('text/plain');
$r->status(Apache2::Const::HTTP_ACCEPTED);
return Apache2::Const::HTTP_ACCEPTED;
}
1;
I get the error
calling the handler in my browser on localhost, I get the output but also an error:
Hallo
Accepted
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
I also get an error with Apache2::Const::HTTP_OK, the only one that works without error is Apache2::Const::OK.
My apache error log makes no mention of this error.
With mod_perl2 you do not return HTTP status codes (this is why it is necessary to use $r->status() so set the HTTP status code.
Instead, you return a value depending on what you want the server to do. The most common would be Apache2::Const::OK. This tells the server your handler has finished successfully. This constant, if I recall correctly, has an integer value of 0, not 200.
Returning an HTTP status code from a mod_perl handler will be interpreted as an error.
https://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values
Different handler groups are supposed to return different values.
Make sure that you always explicitly return a wanted value and don't rely on the result of last expression to be used as the return value -- things will change in the future and you won't know why things aren't working anymore.
The only value that can be returned by all handlers is Apache2::Const::OK, which tells Apache that the handler has successfully finished its execution.
Apache2::Const::DECLINED is another return value that indicates success, but it's only relevant for phases of type RUN_FIRST.
HTTP handlers may also return Apache2::Const::DONE which tells Apache to stop the normal HTTP request cycle and fast forward to the PerlLogHandler, followed by PerlCleanupHandler. HTTP handlers may return any HTTP status, which similarly to Apache2::Const::DONE will cause an abort of the request cycle, by also will be interpreted as an error. Therefore you don't want to return Apache2::Const::HTTP_OK from your HTTP response handler, but Apache2::Const::OK and Apache will send the 200 OK status by itself.
Try NOT printing anything BEFORE you set your content-type header.
I have some problem with WLST find
when I am trying to find some Mbean or Attr
even if they are located in the current pwd() I got the same error:
wls:/base_domain/domainRuntime/ServerRuntimes/AdminServer> find('State')
Find is not supported for this tree
And I can not find anything against MBean tree.
How to solve this find problem? please help.
The find() command is not accessible from within domainRuntime() but you can use it with serverRuntime and serverConfig. Instead if you want to see server states, simply do a connect() and then make calls to get each individual server MBean and then get the State.
def checkHealth(serverName):
while 1:
slBean = getServerBean(serverName)
status = slBean.getState()
print 'Status of Managed Server is '+ status
def getServerBean(svrName):
domainRuntime()
slrBean = cmo.lookupServerLifecycleRuntime(svrName)
return slcBean
http://docs.oracle.com/cd/E23943_01/web.1111/e13813/reference.htm#i1064028
I'm executing this simple code in a pig script:
REGISTER /home/myuser/mongodb/mongo-2.10.1.jar
REGISTER /opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p0.30/lib/mongo-hadoop-cdh4-1.2.0/mongo-hadoop-core_cdh4.3.0-1.2.0.jar
REGISTER /opt/cloudera/parcels/CDH-4.5.0-1.cdh4.5.0.p0.30/lib/mongo-hadoop-cdh4-1.2.0/mongo-hadoop-pig_cdh4.3.0-1.2.0.jar
set mapred.map.tasks.speculative.execution false;
set mapred.reduce.tasks.speculative.execution false;
col = LOAD 'mongodb://localhost:27017/mydb.mycollection' using com.mongodb.hadoop.pig.MongoLoader ('id:chararray, companyId:chararray, ts:chararray', 'id');
STORE col INTO 'mongodb://localhost:27017/mydb.mycollection2' USING com.mongodb.hadoop.pig.MongoInsertStorage ('', '');
it returns the following error:
Location Config: Configuration: For URI: file:/tmp/temp449583595/tmp-109467318
2014-04-04 14:30:40,913 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2017: Internal error creating job configuration.
Details at logfile: /home/myuser/pig/pig_1396614639609.log
the end of file pig_1396614639609.log:
... at org.apache.hadoop.util.RunJar.main(RunJar.java:208) Caused
by: java.lang.IllegalArgumentException: Invalid URI Format. URIs must
begin with a mongodb:// protocol string. at
com.mongodb.hadoop.pig.MongoInsertStorage.setStoreLocation(MongoInsertStorage.java:159)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:576)
... 17 more
I don't know where is the error so that mongodb protocol string "mongodb://" is well-written.
I have a similar issue when running LOAD and STORE using mongo-hadoop on the same Pig script.
It throws
java.net.UnknownHostException: localhost:27017 is not a valid Inet address
at org.apache.hadoop.net.NetUtils.verifyHostnames(NetUtils.java:587)
at org.apache.hadoop.mapred.JobInProgress.initTasks(JobInProgress.java:734)
at org.apache.hadoop.mapred.JobTracker.initJob(JobTracker.java:3890)
at org.apache.hadoop.mapred.EagerTaskInitializationListener$InitJob.run(EagerTaskInitializationListener.java:79)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
I didn't investigate further, but either is a bug or some parameter related to locking. I don't know.
If I run the same code, but loading and storing in different scripts it runs without a problem.