Windows 8.1 why does RabbitMQ dont work? - php

Hi i can't run RabbitMQ service or broker
--old non important removed content--
please help me, how can i fix it ? i have instaled newest erlang x64 version
#UPDATE
here after changing the RABBITMQ_BASE i still got this error
how it looks like now:
=CRASH REPORT==== 27-Aug-2014::12:30:52 ===
crasher:
initial call: application_master:init/4
pid: <0.70.0>
registered_name: []
exception exit: {bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{badarg,
[{io_lib,format,
["~-15s: ~s~n",
["home dir",
[67,58,92,85,115,101,114,115,92,82,97,
102,97,322]]],
[{file,"io_lib.erl"},{line,154}]},
{rabbit_misc,format,2,[]},
{rabbit,'-log_banner/0-lc$^1/1-1-',2,[]},
{rabbit,'-log_banner/0-lc$^1/1-1-',2,[]},
{rabbit,log_banner,0,[]},
{rabbit,start,2,[]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,272}]}]}}}}
in function application_master:init/4 (application_master.erl, line 133)
ancestors: [<0.69.0>]
messages: [{'EXIT',<0.71.0>,normal}]
links: [<0.69.0>,<0.7.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1598
stack_size: 27
reductions: 222
neighbours:
and from console
Starting broker...
BOOT FAILED
===========
Error description:
{could_not_start,rabbit,badarg}
Log files (may contain more information):
d:/Program Files (x86)/RabbitMQ Server/rabbitmq_server-3.3.5/base/log/rabbit#
VARDIUS.log
d:/Program Files (x86)/RabbitMQ Server/rabbitmq_server-3.3.5/base/log/rabbit#
VARDIUS-sasl.log
{"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabb
it,badarg}}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
d:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.3.5\sbin>

RabbitMQ is trying to print out the following message:
RabbitMQ 3.3.5. Copyright (C) 2007-2014 GoPivotal, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
## ##
########## Logs: C:/Users/Rafał/AppData/Roaming/RabbitMQ/log/rabbit#VARDIUS.log
###### ## C:/Users/Rafał/AppData/Roaming/RabbitMQ/log/rabbit#VARDIUS-sasl.log
##########
Starting broker...ok
But it fails to do so, because on one hand the filename is given as a Unicode "string", i.e. a list of code points (note the 322 in the middle, which stands for ł), but on the other hand RabbitMQ is trying to print this as a non-Unicode string (using the ~s directive instead of ~ts).
I'd suggest you report this as a bug to the RabbitMQ developers. Meanwhile, you could try running it from a directory whose path doesn't contain non-ASCII characters.

I had the exact same problem. My workaround solution was to insert an additional batch line in rabbitmq-server.bat or rabbitmq-service.bat files:
SET HOMEPATH=\SOME_PATH_WITHOUT_NON_ASCII_CHARACTERS
%HOMEDRIVE%%HOMEPATH% is used as a path where the .erlang.cookie file is stored. I've also set RABBITMQ_BASE to some non-ascii path too, like you did.
This solution was inspired by this SO Answer.

Related

Unable to capture changes to log file via nagios check_logwarn plugin command invoked via PHP exec() triggered via Jenkins

I am using nagios check_logwarn to capture changes to log files.
In order to test my setup, I have been manually adding the following log line to the concerned log file -
[Mon Mar 20 14:24:31 2017] [hphp] [12082:7f238d3ff700:32:000001] []
\nFatal error: entire web request took longer than 10 seconds and timed out in /var/cake_1.2.0.6311-beta
app/webroot/openx/www/delivery/postGetAd.php on line 483
The above should get caught by the following nagios command, because it contains the keyword "Fatal"
/usr/local/nagios/libexec/check_logwarn -d /tmp/logwarn_hiphop_error -p /mnt/log/hiphop/error_`(date +'%Y%m%d')`.log "^.*Fatal*"
Output (as expected) -
Log errors: \nFatal error: entire web request took longer than 10 seconds and timed out in /var/cake_1.2.
0.6311-beta
\nFatal error: entire web request took longer than 10 seconds and timed out in /var/cake_1.2.0.6311-beta
Running this command directly works (case 1), but it seems invoking the same via a PHP exec which is triggered via a Jenkins project is not catching the same (case 2).
Following is the PHP code of case 2 -
$errorLogCommand = '/usr/local/nagios/libexec/check_logwarn -d /tmp/logwarn_hiphop_error -p /mnt/log/hiphop/error_'.$date.'.log "^.*Fatal*"';
$output = exec($errorLogCommand);
file_put_contents('/var/cake_1.2.0.6311-beta/deployment/deployment.log', "\n ".date("Y-m-d H:i:s")." Checked error key words in error_".$date.".log. command -> ".$errorLogCommand, FILE_APPEND);
if($output!="OK: No log errors found")
{
file_put_contents('/var/cake_1.2.0.6311-beta/deployment/deployment.log', "\n ".date("Y-m-d H:i:s")." - Hiphop errors -> ".$output, FILE_APPEND);
$failure=true;
break;
}
else
{
file_put_contents('/var/cake_1.2.0.6311-beta/deployment/deployment.log', "\n ".date("Y-m-d H:i:s")." - No Error found -> ".$output, FILE_APPEND);
}
Following is the output -
2017-03-20 14:16:45 Checked error key words in error_20170320.log. command -> /usr/local/nagios/libexec/
check_logwarn -d /tmp/logwarn_hiphop_error -p /mnt/log/hiphop/error_20170320.log "Fatal"
2017-03-20 14:16:45 - No Error found -> OK: No log errors found
Note that with the same nagios command (/usr/local/nagios/libexec/check_logwarn) as in case 1, log error is not detected in this case, unexpectedly.
Following are my observations of the contents of the internal tracker file which nagios generates - /tmp/logwarn_hiphop_error/mnt_log_hiphop_error_20170320.log -
When error is detected in case 1, following are the changes in the file -
Before running command
# logwarn 1.0.10 state for "/mnt/log/hiphop/error_20170320.log"
INODENUM="1208110246"
LINENUM="110"
POSITION="111627"
MATCHING="true"
After running command
# logwarn 1.0.10 state for "/mnt/log/hiphop/error_20170320.log"
INODENUM="1208110246"
LINENUM="116"
POSITION="112087"
MATCHING="false"
Also, following are the changes to the same file in case 2 -
Before running php file
# logwarn 1.0.10 state for "/mnt/log/hiphop/error_20170320.log"
INODENUM="1208110246"
LINENUM="102"
POSITION="109329"
MATCHING="true"
After
# logwarn 1.0.10 state for "/mnt/log/hiphop/error_20170320.log"
INODENUM="1208110246"
LINENUM="110"
POSITION="111627"
MATCHING="true"
I am not sure why the MATCHING parameter is true in the case 2, whereas in case 1 it is false. In fact, the error matching happened in case 1.
Update
I tried wrapping the command in an escapeshellcmd, to ensure that the regex is not being stripped out -
$output = exec(escapeshellcmd($errorLogCommand));
but still no change in output.
Update 2
Found that I had line breaks in the log line I was manually adding. Removing those fixed it consistently for the case of running the PHP file from command line. However, the problem is still reproducible consistently for the case 2, where I am triggering the project via Jenkins and this file gets called in one of the hooks of AWS code deploy.
Well, it seems this is not going to get solved so easily. The problem got fixed for manual invocation of the PHP file, but on invocation via Jenkins, I am still getting the same problem consistently.
The logwarn documentation mentions support for a negative checking expression.
Please try pre-pending an exclamation mark (!) before the pattern string to exclude rather than include these matches

Deploy PHP using cURL in GAE

I just received a great news that full cURL is supported now.
I followed the instruction to replace "runtime:php" with "runtime:php55" in app.yaml and deployed my php code to Google App Engine using Google App Engine Launcher.
The system responsed error as attached:
..deploy response...............
2015-02-27 23:01:52 Running command: "['C:\\python27_x64\\pythonw.exe', '-u', 'C:\\Program Files\\Google\\Cloud SDK\\google-cloud-sdk\\platform\\google_appengine\\appcfg.py', '--no_cookies', u'--email=jihshiun#gmail.com', '--passin', 'update', 'D:\\Documents\\GAE CloudSite\\Hi']"
Usage: appcfg.py [options] update <directory> | [file, ...]
appcfg.py: error: Error parsing D:\Documents\GAE CloudSite\Hi\app.yaml: Unable to assign value 'php55' to attribute 'runtime':
Value 'php55' for runtime does not match expression '^(?:contrib-dart|dart|go|php|python|python27|java|java7|vm|custom)$'
in "D:\Documents\GAE CloudSite\Hi\app.yaml", line 3, column 10.
2015-02-27 23:02:04 (Process exited with code 2)
.......................
I also tried to add a php.ini with extension = "curl.so" in the file, and the deployment failed too with the same response.
Have I missed something?
Please advise.
I've had the same problem.
You have to update the sdk, download the file corresponding to your plataform and instal it.

Path specified --php_executable_path does not exist -- GAE php HelloWorld

Setup the GAE PHP sandbox on my Linux laptop (running Debian 'Wheezy' 32-bit, latest packages). Setup was done following the 'Installing the SDK' instructions, followed by an attempt at the 'Getting-Started > Hello World' application, following the instructions.
However, when I visit http://local.host.com:8080*, I get the following message, instead of 'Hello World!':
The path specified with the --php_executable_path flag () does not exist.
*Note: SO doesn't allow URL pointing to localhost, so replaced it with local.host.com! It is not a mistake.
On the console where I'd started the app_server, I see the following error-message:
ERROR 2014-04-29 03:34:36,219 php_runtime.py:223] The PHP runtime is not available
Traceback (most recent call last):
File "/home/icarus/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 219, in new_instance
self._check_environment(php_executable_path)
File "/home/icarus/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 148, in _check_environment
'flag (%s) does not exist.' % php_executable_path)
_PHPBinaryError: The path specified with the --php_executable_path flag () does not exist.
Note that I've installed the latest php-5.4.27 (instructions talk of php-5.4.25, but later go on to say in a NOTE that we can get the latest from PHP website), and built it on my machine, successfully as per instructions.
Is the php-5.4.25 hardcoded anywhere, s.t. it is not found, as on my machine I've got php-5.4.27 ? Here is what I see:
$ ls -l ~/php-5.4.27/installdir/bin/php-cgi
-rwxr-xr-x 1 icarus icarus 23195302 Apr 28 22:58 php-cgi
Python installed is 2.7.3, and the google_appengine SDK is latest stable i.e. 1.9.3.
Argh... I ignored to see the plethora of questions already on SO, on this (or nearly this) subject, most perhaps from newbies like me.
Based on this other SO question's answer, I started the SDK like this:
$ google_appengine/dev_appserver.py --php_executable_path=php-5.4.27/installdir/bin/php-cgi work/gae_apps/helloworld/
and finally 'Hello World!' worked as expected. Perhaps, this calls for bit of clarification / elaboration on the 'Getting Started' page ?

Magento patch failing to install

When downloading and running the Magento PHP 5.4 support patch (Magento-CE-v1.7.0.0-1.7.0.2) from http://www.magentocommerce.com/download, running the script using sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh we receive this error:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
: command not found_1.12.0.0_v1.sh: line 7:
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: syntax error near unexpected token `{
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: `_check_installed_tools() {
Strangely, line 7 of the script is blank (here's the head of the file):
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
We tried the download in Windows and Mac, in Firefox and Chrome to rule out any encoding problems caused by the download process. The patch seems to be very new - Added Jan 17, 2014
We're running Magento Community Edition 1.7.0.2
Edit
We've tried running the .sh file with bash as well but receive the same response.
Interestingly when the click "download", Magento shows the .sh source in the browser so we tried various combinations of view-source then save; copying the text from the browser window and saving it to a text file. None of these solved the problem although one changed the error message to:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
/usr/bin/patch: **** malformed patch at line 238:
ERROR: Patch can't be applied/reverted successfully.
Line 238 is the blank comment line here:
+/**
+ * Abstract helper class for {#link Zend_Pdf_FileParser} that provides the
+ * data source for parsing.
+ *
+ * Concrete subclasses allow for parsing of in-memory, filesystem, and other
+ * sources through a common API. These subclasses also take care of error
+ * handling and other mundane tasks.
We also tried the VI step mentioned here - :set ff unix
http://www.magentocommerce.com/boards/viewthread/864518
The error then changed to:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Catalog/Model/Product.php
Hunk #1 FAILED at 1936.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Catalog/Model/Product.php.rej
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php.rej
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Zend/Pdf/FileParserDataSource.php
It turns out that this error is given when the patch file (not the file being patched) has line endings which do not match the system on which it is being run.
eg: You will see this error when:
You are running on Linux
Your patch file has Windows line endings
I changed the patch file to have Unix line endings using Sublime:
View > Line Endings > Unix
See also Error patching Magento 1.7.1 Hunk #1 Failed at

Can't get DocBlox to work with Netbeans

I'm trying to get Netbeans for Mac to integrate with DocBlox for documentation generation. I followed the instructions on the docblox site for integrating with netbeans, but when I actually try to generate documentation I get no output, and the following appears in the output window:
DocBlox version 0.17.2
PHP Warning: mkdir(): Permission denied in /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php on line 120
PHP Stack trace:
PHP 1. {main}() /usr/local/php5-20111115-115202/bin/docblox:0
PHP 2. DocBlox_Task_Project_Run->execute() /usr/local/php5-20111115-115202/bin/docblox:55
PHP 3. DocBlox_Task_Project_Parse->execute() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Run.php:141
PHP 4. DocBlox_Task_Project_Parse->getTarget() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:270
PHP 5. mkdir() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:120
Warning: mkdir(): Permission denied in /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php on line 120
Call Stack:
0.0004 655768 1. {main}() /usr/local/php5-20111115-115202/bin/docblox:0
0.0227 3376320 2. DocBlox_Task_Project_Run->execute() /usr/local/php5-20111115-115202/bin/docblox:55
0.0246 3538264 3. DocBlox_Task_Project_Parse->execute() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Run.php:141
0.0546 3867832 4. DocBlox_Task_Project_Parse->getTarget() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:270
0.0546 3868056 5. mkdir() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:120
ERROR: The given location "Reefknot" is not a folder
DocBlox creates documentation from PHP source files. The simplest way to use it is:
$ docblox run -d <directory to parse> -t <output directory>
This will parse every file ending with .php, .php3 and .phtml in <directory to parse> and then
output a HTML site containing easily readable documentation in <output directory>.
DocBlox will try to look for a docblox.dist.xml or docblox.xml file in your current working directory
and use that to override the default settings if present. In the configuration file can you specify the
same settings (and more) as the command line provides.
Usage:
docblox project:run [options]
-h [--help] Show this help message
-q [--quiet] Silences the output and logging
-c [--config] [STRING] Configuration filename OR "none", when this option is omitted DocBlox tries to load the docblox.xml or docblox.dist.xml from the current working directory
-f [--filename] STRING Comma-separated list of files to parse. The wildcards ? and * are supported
-d [--directory] STRING Comma-separated list of directories to (recursively) parse.
-t [--target] [STRING] Path where to store the generated output (optional, defaults to "output")
-e [--extensions] [STRING] Optional comma-separated list of extensions to parse, defaults to php, php3 and phtml
-i [--ignore] [STRING] Comma-separated list of file(s) and directories that will be ignored. Wildcards * and ? are supported
-m [--markers] [STRING] Comma-separated list of markers/tags to filter, (optional, defaults to: "TODO,FIXME")
-v [--verbose] Provides additional information during parsing, usually only needed for debugging purposes
--title [STRING] Sets the title for this project; default is the DocBlox logo
--template [STRING] Sets the template to use when generating the output
--force Forces a full build of the documentation, does not increment existing documentation
--validate Validates every processed file using PHP Lint, costs a lot of performance
--parseprivate Whether to parse DocBlocks tagged with #internal
--visibility [STRING] Specifies the parse visibility that should be displayed in the documentation (comma seperated e.g. "public,protected")
--defaultpackagename [STRING] name to use for the default package. If not specified, uses "default"
--sourcecode Whether to include syntax highlighted source code
-p [--progressbar] Whether to show a progress bar; will automatically quiet logging to stdout
I have chmoded the target directory to 0777, but still no joy.
Has anybody got any ideas what's going wrong here? I'm running OSX Lion, Netbeans 7.1RC2 and DocBlox 0.17.2 installed via PEAR
Short version
it appears you need to modify the phpdoc batch file of NetBeans as described here: https://github.com/docblox/docblox/issues/195
Explanation
the problem is probably caused by Netbeans passing a title using the shortcut notation (-ti) of phpDocumentor. I am assuming your project is called Reefknot and Netbeans tries to add -ti Reefknot as last argument.
Since DocBlox is unable to handle the double character shortcut notation it will interpret -ti as being -t and as such cause Docblox to try and write to a folder 'Reefknot'.

Categories