Getting Issue while setting up Cassandra in Windows 8.1 - cassandra

Below are steps to Install and configure Cassandra on windows
1) Downloaded Java setup from http://java.com/en/download/win8.jsp , Java Set up version is Version 8 Update 73
2) I have gone to http://cassandra.apache.org/download/ and downloaded apache-cassandra-3.4-bin.tar.gz
3) extract apache-cassandra-3.4-bin.tar.gz in D:\Learning Office work\Learning\Cassandra
4) After extraction it will create a folder called apache-cassandra-3.4
5) Set JAVA_HOME variable in windows 8.1
Steps :
• Go To My Computer
• Right Click on it select Properties
• Click on Security
• Click on environmental varoables
• In The System variable Section click on New
• enter variable name as JAVA_HOME
• enter variable value as C:\Program Files (x86)\Java\jre1.8.0_73
This depends upon in which drive you have installed java
• create a new system variable named, CLASSPATH as like above box, and its value %JAVA_HOME%\jre\lib
• For PATH, if it already exists, select it and choose the Edit option; in the editor add the value;%JAVA_HOME%\bin (the new values are separated by a semicolon from the existing ones)
• To check the system variables is done by opening a new command prompt window (Start -> cmd) and try with following commands.
C:\Users\Catalin>echo %CLASSPATH%
C:\Program Files\Java\jdk1.6.0_16\jre\lib
C:\Users\Catalin>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_16
C:\Users\Catalin>echo %PATH%
• To make your system know of these changes, Restart your computer
6) Create three New Folders anyware(inside the - D:\Learning Office work\Learning\Cassandra /new folder or out of the - D:\Learning Office work\Learning\Cassandra) your in your directory structure with names commitlog, data, saved cache
7) Go to Cassandraa extracted archive and navigate to folder named “conf”
8) Open the file named “cassandra.yaml” in your favorite text editor.
9) In the “Cassandra.yaml” Set the values of
“data_file_directories” to the path of newly created “data” folder.
“commitlog_directory” to the path of newly created “commitlog” folder.
“saved_caches_directory” to the path of newly created “saved cache” folder.
So my values in “cassandra.yaml” look like this:
directories where Cassandra should store data on disk.
data_file_directories:
- D:\Learning Office work\Learning\Cassandra\Data
commit log
commitlog_directory: D:\Learning Office work\Learning\Cassandra\commitlog
saved caches
saved_caches_directory: D:\Learning Office work\Learning\Cassandra\saved_caches
10) Add new environment variable “CASSANDRA_HOME”
Steps :
1) Go To My Computer
2) Right Click on it select Properties
3) Click on Security
4) Click on environmental varoables
5) In The User variable Section click on New
6) enter variable name as CASSANDRA_HOME
7) enter variable value as D:\Learning Office work\Learning\Cassandra\apache-cassandra-3.4
11) Open cmd as Adminstartor and navigated to the D:\Learning Office work\Learning\Cassandra\apache-cassandra-3.4\bin (bin of the Cassandra) type cassandra -f as like below
Once I run above command in CMD I started getting below error

Sounds like you're missing an environment variable.
Add this to your Path environment variable:
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
OR
Change your script to this:
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "your command"

Related

Nodejs fs.copyfile not allowed for copy a file to the destination folder

I am trying to copy a file from one location to another so I'm using this:
fs.copyFile('C:\\Users\\Me\\Documents\\myfile.zip', c:\\myfiles
console.log('file was copied successfully!');
});
I can see that the destination folder is readonly so that's why I'm getting this.
How can I change it's status on my windows pc.
I've tried this but nothing is happening and I still get the error:
fs.chmodSync('c:\\myfiles', 0o755);
How can I fix this issue?
You are using Windows, I guest C:\ is your system disk (where you install the Windows).
If you want to write a file to c:\myfiles , it require you Administrator permission (you can try by way: copy and paste a file to the folder, by hand).
Solution:
Option1: Change your folder, ex: D:\myfiles
Option2: Use windows file manager, change your folder permission (everyone read/write)

Create lnk shortcut from lua (without lfs)

I would like to write a function to create a windows .lnk file from my lua script. I found a function in the LuaFileSystem library . Is there a way to do this without the library? (The reason: I am writing the script for multiple users, would be nice if we don't have to install the library on every machine.)
I appreciate the help!
To make a shortcut (an .lnk file)
-- your .lnk file
local your_shortcut_name = "your_shortcut.lnk"
-- target (file or folder) with full path
local your_target_filespec = [[C:\Windows\notepad.exe]]
local ps = io.popen("powershell -command -", "w")
ps:write("$ws = New-Object -ComObject WScript.Shell;$s = $ws.CreateShortcut('"..your_shortcut_name.."');$s.TargetPath = '"..your_target_filespec.."';$s.Save()")
ps:close()
To make a symlink simply use os.execute"mklink ..."
Use luacom is faster than powershell
local luacom=require'luacom'
local shortcut_file_path='test_create_shortcut.lnk'
local target_file_path=arg[0]
local shellObject=luacom.CreateObject("WScript.Shell")
local shortcut=shellObject:CreateShortcut(shortcut_file_path)
shortcut.TargetPath=target_file_path
shortcut:Save()
assert(io.open(shortcut_file_path)):close()--shortcut file exist now
os.remove(shortcut_file_path)
And use FileSystemObject object (another COM), or Windows shell link file format spec for Kaitai Struct (parse binary file struct to get info on various file format) to retrieve shortcut info. Which 'lfs' can't do now.
see: Create a desktop shortcut with Windows Script Host - Windows Client | Microsoft Docs
LuaCOM User Manual (Version 1.3)

ClickOnce fails on download

OK, I have a similar problem as Download ClickOnce fails from setup.exe and Download ClickOnce fails from setup.exe , where I have deployed a ClickOnce installer for a desktop app I am selling.
Different than those examples, I am using Visual Studio 2012 (Pro Version). Using .Net 3.5. I am deploying on a hosted LINUX machine. It worked for me and other people running Windows 7 & 8, possibly earlier versions of Widnows. Then after running a few tests in Debug mode, I built and deployed in Release mode. Now, the auto-installer breaks when it gets to the spot where it wants to download the .application file. Here's the log file.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Microsoft Visual Basic PowerPacks 10.0', phase BuildList
Attempting to find 'Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=YADDAYADDA' in the Global Assembly Cache
AssemblyCheck: Error querying assembly info: -2147024894
Attempting to find 'Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=YADDAYADDA, processorArchitecture=msil' in the Global Assembly Cache
Assembly found at 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic.PowerPacks.Vs\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.PowerPacks.Vs.dll'
Setting value '11.0.50727.1 {version}' for property 'VBPowerPacksInstalled'
The following properties have been set for package 'Microsoft Visual Basic PowerPacks 10.0':
Property: [VBPowerPacksInstalled] = 11.0.50727.1 {version}
Running checks for command 'VBPowerPacks\VisualBasicPowerPacksSetup.exe'
Result of running operator 'ValueExists' on property 'VBPowerPacksInstalled': true
Result of checks for command 'VBPowerPacks\VisualBasicPowerPacksSetup.exe' is 'Bypass'
'Microsoft Visual Basic PowerPacks 10.0' RunCheck result: No Install Needed
Running checks for package '.NET Framework 3.5 SP1', phase BuildList
Reading value 'SP' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5'
Read integer value 1
Setting value '1 {int}' for property 'DotNet35SP'
The following properties have been set for package '.NET Framework 3.5 SP1': Property: [DotNet35SP] = 1 {int}
Running checks for command 'DotNetFX35SP1\dotNetFx35setup.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet35SP' and value '1': true
Result of checks for command 'DotNetFX35SP1\dotNetFx35setup.exe' is 'Bypass'
'.NET Framework 3.5 SP1' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697205'
Error: An error occurred trying to download 'http://www.mywebsite.com/ProductName/Downloads/oneclick/ProductName.application'.
I've looked at https://msdn.microsoft.com/en-us/library/ms229001.aspx , after which I set the MIME type of .application to x-ms-application. No difference.
When I put the url http://www.mywebsite.com/ProductName/Downloads/oneclick/ProductName.application into my browser, I get the text of the file, rather than a download.
Any thoughts??? Thanks!
OK, the first thing that got me closer to the solution was simply to reboot the PC I was dwonloading onto. This got me further into the install, but I then ran into another problem, the solution to which I found at ClickOnce application replace current installed fliles . Clearing out the folder C:\Users\Charles\AppData\Local\Apps\2.0got me to where I could install and run the app fully.
Window application in C #. My solution, I hope it serves someone. The domain server was damaged, I just changed the IP of the new DNS server. It was not necessary to join that new domain server IP.
The "An error occurred trying to download.." error occurs with one of our click-once apps and the solution is to turn off IE Enhanced Security from Server Manager (Server 2012R2+) on the target machine.

change start menu name during minor version upgrade in installshield

Currently, in program start menu I have as below
Program Menu - [XXX] - Product name
Now , I want to change as
Program Menu - [YYY] - Product name
How to change start menu name during minor version upgrade in installshield?
Is it possible to do this during minor upgrade?
Please Help.
I have achieved something similar for setting the name of my short cut folder based on property decided at run time. I wouldn't know how to change the name of an existing folder though I take it you are looking to rename the folder from something like 'Product v10' to 'Product v11'
When you add the [XXX] directory name, give is a name such as ShortcutCompanyName.
Then add a 'Set Directory' custom action (type 35) that changes sets:
Directory Name : ShortcutCompanyName
Directory Value: [ProgramMenuFolder]\[MyShortCutFolder]
Install UI Sequence: After CostFinalize
Install Exec Sequence: After CostFinalize
Admin UI Sequence: After CostFinalize
Admin Exec Sequence: After CostFinalize
Where [MyShortCutFolder] is a property I have set to the name of the folder I want i.e. XXX or YYY in your case.

How to remove multiple virtual directories?

I need to remove a big amount of virtual directories, some of them don't have associated physical directories.
Ideas?
As you need to remove a large amount, I'm guessing you'll want to use some form of script.
IIS 6.0, using IISvdir.vbs( article # MSDN):
At the command prompt, use the cd command to change to the directory where the Iisvdir.vbs script is installed. The default location for this file is systemroot/system32/iisvdir.vbs.
At the command prompt, type:
cscript iisvdir.vbs /delete "Sample Web Site" VirtualDirectoryName.
Substitute your Web site name and virtual directory name as appropriate. If there are spaces in the Web site name, use quotation marks around the Web site name, as shown in the preceding example.
IIS 7 using AppCmd.exe (article # TechNet):
To remove a virtual directory, use the following syntax:
appcmd delete vdir /vdir.name: string
The variable vdir.namestring is the virtual path of the virtual directory.
For example, to remove a virtual directory named photos from the root application of a site named contoso, type the following at the command prompt, and then press ENTER:
appcmd delete vdir /vdir.name: contoso / photos
To remove a virtual directory named photos from an application named marketing in a site named contoso, type the following at the command prompt, and then press ENTER:
appcmd delete vdir /vdir.name: contoso / marketing / photos
HTH
You could also write an msbuild script to do this and use the msbuild extension pack which is available here. I have used this successfully to do exactly what you are saying for 100s of vdirs in iis 6 AND in iis 7.5.
Its pretty simple and took me longer to write the .proj file than it did to figure out how to do it.
have fun :)
the resultant msbuild target would look like as follows
<Target Name="IIS7VirtualDirectories:Delete">
<MSBuild.ExtensionPack.Web.Iis7Application
TaskAction="Delete"
Website="%(Application.WebsiteName)"
Applications="#(Application)"
MachineName="$(MachineName)"
ContinueOnError="false"/>
<MSBuild.ExtensionPack.Web.Iis7Website
TaskAction="DeleteVirtualDirectory"
Name="%(VirtualDirectory.WebsiteName)"
VirtualDirectories="#(VirtualDirectory)"
ContinueOnError="false"
MachineName="$(MachineName)"/>
</Target>
Where Application and VirtualDirectory are defined in an external proj file :)

Resources