Confluent local start gives config.json: No such file or directory - apache-kafka

When I start confluent local start I get /users/myusername/.confluent/config.json: No such file or directory.
Does anyone have any idea how to solve this?

you need to create the .confluent directory

1)Install the Confluent CLI, confluent, using the following script. The parameter must be in your PATH (e.g. /usr/local/bin).
On Microsoft Windows, an appropriate Linux environment may need to be installed in order to have the curl and sh commands available, such as the Windows Subsystem for Linux https://learn.microsoft.com/en-us/windows/wsl/about.
curl -L --http1.1 https://cnfl.io/cli | sh -s -- -b /path-to-cli
and then go to the path-to-cli folder and run below command
./confluent local start

Related

Not able to run yq commands via rundeck job definitions

I installed snap package of yq and it is showing under /home/ubuntu/ I want to convert yaml file to json using yq. I used this command cat file.yaml | yq . -o=json > file.json to convert the file under location /home/ubuntu/ and this command is working when I run via command line.
But if I try to run this same command in bash shell script in my rundeck job definition, its giving below error.
Sorry, home directories outside of /home are not currently supported. See https://forum.snapcraft.io/t/11209 for details
My Rundeck version is Rundeck 2.6.9-1 and it is running on ubuntu 18
Updated Answer:
I reproduced your issue, and it's a snap package limitation (described here and also commented by Charles Duffy in your original question), Rundeck home it's defined at /var/lib/rundeck path.
So, the best way is to uninstall the snap yq package (as root: snap remove yq) and install it in the traditional way:
As root:
Download and put the yq binary in the /usr/local/bin path:
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
Give it the rights permissions:
chmod a+x /usr/local/bin/yq
Then, your job should work.

cannot execute binary file centos?

I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/

jupyter-scala install behind a proxy

I'm trying to install jupyter-scala to get a scala kernel working with jupyterlab. I'm behind a proxy and it's timing out. I have the http(s)_proxy host and port environment variables set properly.
Following the instructions here: https://github.com/alexarchambault/jupyter-scala#jupyter-installation
Looking into jupyter-scala and coursier, I cannot find where I can set proxy settings. Anyone know?
Thanks!
The command run: sh -x -vvvv jupyter-scala and the interesting bit + the error:
/tmp/coursier.e5brtL0K launch -r sonatype:releases -r sonatype:snapshots -i ammonite -I ammonite:org.jupyter-scala:ammonite-runtime_2.11.11:0.8.3-1 -I ammonite:org.jupyter-s
cala:scala-api_2.11.11:0.4.2 org.jupyter-scala:scala-cli_2.11.11:0.4.2 -- --id scala --name Scala
Error while downloading https://oss.sonatype.org/content/repositories/releases/io/get-coursier/coursier-cli_2.11/1.0.0-RC1/coursier-cli_2.11-1.0.0-RC1-standalone.jar: Connecti
on timed out (Connection timed out), ignoring it
also when i run wget https://oss.sonatype.org/content/repositories/releases/io/get-coursier/coursier-cli_2.11/1.0.0-RC1/coursier-cli_2.11-1.0.0-RC1-standalone.jar the jar downloads so the url is fine.
An (ugly) solution is to download the jar by hand and then using the following command line to launch coursier:
java -Dhttps.proxyHost=proxy -Dhttps.proxyPort=80 \
-cp coursier-cli_2.11-1.0.0-RC1-standalone.jar coursier.cli.Coursier

AWS EC2 and rvm ssh

I have created user for my AWS ec2 VPS (deployer)
When i am logging with:
ssh -i ~/.ssh/aws/*...*.pem ubuntu#ec2*...*.amazonaws.com
command rvm use 2.0.0 is working correctly
=>
ubuntu#ip-***:~$ rvm list
rvm rubies
=* ruby-2.0.0-p247 [ x86_64 ]
# => - current
# =* - current && default
# * - default
ubuntu#ip-***:~$ rvm which
ubuntu#ip-***:~$
But when i use su - deployer i have got:
deployer#ip***:/home/ubuntu$ rvm
The program 'rvm' is currently not installed. You can install it by typing:
sudo apt-get install ruby-rvm
I would like to understand how correctly write command for ssh login.
I have tried:
ssh -i ~/.ssh/aws/*.pem *ubuntu#ec2***.amazonaws.com -t 'bash --login -c "rvm"'
but received "Connection to ec2-*.amazonaws.com closed".
Within my local machine rvm functioning correctly. I have added
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
into my ~/.bash_profile
I have spent 3-5 hours studying stackoverflow topics related to this issue, but still not understand what am i doing wrong.
Any help will be highly appreciated! Thanks in advance!
I've run into this problem before and there are 2 ways to solve it.
The first way is to log in directly as the deployer user to the instance. This might mean having to create a ssh keypair (see ssh-keygen -t rsa). Then you can log in with ssh deployer#ec2.instance.address This way the rvm will be loaded directly to the deployed user's shell.
A second way is not to use the dash when su to the deployed user account.
When you use the dash then you load your own bashrc vs that particular user's bashrc.
So sudo su deployer
you nee to use:
su - deployer
it will ensure you use login shell

Register and run PostgreSQL 9.0 as Windows Service

For a while i have my db running on a command window because im not figuring out how to run it as a windows service.
Since i have the zip file version downloaded. how can i register the pg_ctl command as a windows service?
By the way, im using the following line to start the server:
"D:/Program Files/PostgreSQL/9.0.4/bin/pg_ctl.exe" -D "D:/Program Files/PostgreSQL/9.0.4/db_data" -l logfile start
Thanks in advance.
Use the register parameter for the pg_ctl program.
The data directory should not be stored in Program Files, the location of %ProgramData% is e.g. a good choice.
pg_ctl.exe register -N PostgreSQL -U some_windows_username -P windows_password -D "%ProgramData%/db_data" ...
In newer versions of Postgres, a separate Windows account is no longer necessary, so the following is also sufficient
pg_ctl.exe register -N PostgreSQL -D "%ProgramData%/db_data" ...
Details are in the manual: http://www.postgresql.org/docs/current/static/app-pg-ctl.html
You need to make sure the directory D:/Program Files/PostgreSQL/9.0.4/db_data has the correct privileges for the windows user you specify with the -U flag.
Btw: it is a bad idea to store program data in Program Files. You should move the data directory somewhere outside of Program Files because Program Files is usually highly restricted for regular users - with a very good reason.
Just run 'Command Prompt' as windows administrator and run the below command:
pg_ctl.exe register -N PostgreSQL -D "D:/Program Files/PostgreSQL/9.0.4/db_data"
You don't need to specify a User and Password, as previous answers have suggested.