error writefile failed = 0x3 (3) - visual-studio-2010

I'm trying to Create my Own Test Certificate
I run the below line visual studio 2010 command prompt in admin mode.
makecert -sv Test.pvk -n ""CN=Test file" Test.cer -b 01/01/2011 -e 01/01/2015 -r
Error: WrtieFile failed => 0x5<5>
it is getting error and says
error writefile failed = 0x3 (3)
what is the wrong with my code?

you have typo in your commands please check near ""CN=Test file" should be like "CN=Test file"
like below
makecert -sv Test.pvk -n "CN=Test file" Test.cer -b 01/01/2011 -e 01/01/2015 -r
Error: WrtieFile failed => 0x5<5>

Related

Apache JMeter error when running a test from CMD

I'm trying to run a JMeter test script from the CMD prompt but I keep getting this error:
An error occurred: The file C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\templates\LoginPage.jmx -l C:\Users\xxxxx\Documents\Results\Jmeter.csv -e -o C:\Users\xxxxx\Documents\Results\report.csv doesn't exist or can't be opened
This is the command I'm running:
C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin>jmeter -n -t "C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\templates\LoginPage.jmx -l "C:\Users\xxxxx\Documents\Results\Jmeter.csv" -e -o "C:\Users\xxxxx\Documents\Results\report.csv"
I'm just testing it out so ignore the folder location etc
Any ideas?
Here is the problem:
C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin>jmeter
^ ka-boom
you need to change the > to \ and the command should start working as expected
Full commmand just in case:
C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\jmeter -n -t "C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\templates\LoginPage.jmx" -l "C:\Users\xxxxx\Documents\Results\Jmeter.csv" -e -o "C:\Users\xxxxx\Documents\Results\report.csv"
More information:
How Do I Run JMeter in Non-GUI Mode?
Generating Reports
This is the command you provided:
C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin>jmeter -n -t "C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\templates\LoginPage.jmx -l "C:\Users\xxxxx\Documents\Results\Jmeter.csv" -e -o "C:\Users\xxxxx\Documents\Results\report.csv"
If we break it up into multiple lines and strip off the prompt, for clarity, we get:
jmeter ^
-n ^
-t "C:\Users\xxxxx\Downloads\apache-jmeter-5.5\apache-jmeter-5.5\bin\templates\LoginPage.jmx ^
-l "C:\Users\xxxxx\Documents\Results\Jmeter.csv" ^
-e ^
-o "C:\Users\xxxxx\Documents\Results\report.csv"
You will notice that the filename passed after -t is missing a quote at the end.

plink Unable to read from standard input: The handle is invalid

Batch file on WS 2008R2 Enterprise SP1, calling plink.exe (v.0.70.0.0), executing in ubuntu 16.04.4, intermittent failure Unable to read from standard input: The handle is invalid.
echo -e "youGuessedIt\n" | sudo -S nginx -t -c /home/userNoOne/Documents/nginx.conf &> /home/userNoOne/Documents/nginxResult.txt
echo -e "youGuessedIt\n" | sudo -S tail /var/log/nginx/error.log.1 >> /home/userNoOne/Documents/nginxResult.txt
echo -e "youGuessedIt\n" | sudo -S tail /var/log/nginx/error.log >> /home/userNoOne/Documents/nginxResult.txt
There is a known bug with Plink.exe that documents this failure. I'm looking for the simplest work-around:
https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/win-plink-stdin-handle-invalid.html

Sending mail using shell command in Ruby

I'm trying to send an email using shell command in my ruby script.
I use command
%x{echo "sometext" | mail -s "Account report #{file_tmp}" -a /home/linux/reports/#{file} #{address[0]}}
and I get
Send options without primary recipient specified. Usage: mail
-eiIUdEFntBDNHRVv~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users sh:
line 2: send_report#gmail.com: command not found
Why an email address is taken as second line of command and how to fix it?
Try stripping newlines on the file variable:
%x{echo "sometext" | mail -s "Account report #{file_tmp}" -a /home/linux/reports/#{file.strip} #{address[0]}}

execute .sh script from cygwin on windows task scheduler

I am trying to execute this .sh script on cygwin on windows machine but receiving this error.
this is the script:
fetchReviewImages.sh
====================
#!/bin/bash
mysql -u root -pjavahot -B -e "SELECT camera_name, id FROM inteliviz.cameras;" --skip-column-names | while read CAM_NAME CAM_ID
do
/xampp/htdocs/getReviewImages.py $CAM_ID
done
Cygwin error:
===============
$ C:/cygwin/bin/sh.exe -l -c "C:/xampp/htdocs/fetchReviewImages.sh"
C:/xampp/htdocs/fetchReviewImages.sh: line 3: mysql: command not found

How to solve too many parameters error when using makecert?

I am following step 2 in this tutorial.
After entering this command,
makecert -r -pe -n "CN=PC-Name" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
I a getting ERROR: Too many parameters
How to solve this issue? Help please
The command looks like the following:
Makecert -r -pe -n CN="www.example.com" -b 05/10/2010 -e 12/22/2011 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localmachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
If you copy the sample command from the MSDN page above and run it via the command-line, you'll get error "Too many parameters". It turns out the dash used in the MSDN post above is actually character: \u2013 (DASH-EN) and not minus \u002D and it's the minus character that the tool is expecting.
So to make this work, simply replace the hyphen with the minus sign when keying in the command as defined above. In the above sample, I have replaced the incorrect character with the correct one so feel free to just copy and paste it.

Resources