George Opritescu

Developer from somewhere

BindException Can't assign requested address Service 'sparkDriver' failed after 16 retries

Received this error:

java.net.BindException: Can't assign requested address: Service 'sparkDriver' failed after 16 retries

Luckily, I found this stackoverflow post, listing instructions:

  • run hostname
  • check if the output is present in /etc/hosts
  • assuming hostname returned potato, you should have in /etc/hosts a line like this:
127.0.0.1 potato
  • run the java code again, and it should pass
Read More

parallel execution with xargs

Useful trick seen in the vagrant-cassandra repo

$ cat <<EOF | xargs -P3 -I"BOXNAME" sh -c "vagrant up --provision BOXNAME"
node0
node1
node2
EOF

This can also be used with bash functions, but first you have to export them:

export -f some_function

cat <<EOF | xargs -P3 -I"BOXNAME" sh -c "some_function BOXNAME"
node0
node1
node2
EOF
Read More

automatically install guest additions in vagrant

This plugin makes it all happen. In my case, it was enough just to do a:

vagrant plugin install vagrant-vbguest

and guest additions were automatically installed.

Read More

docker run command in already executing container

To run bash:

docker exec -it container_id /bin/bash
Read More

find out version of cassandra used

select peer, release_version from system.peers;
Read More

css selector not has child

Example for selecting a’s that don’t have img as children:

table:nth-of-type(14) td:nth-of-type(2) > a:not(:has(>img))
Read More

git log line range

This would show changes to the line range 25-80:

git log -L 25,80:path/to/file
Read More
git

todo list in osx notes app

⇧⌘L will make a line a todo item. (shift command l)

Read More

ansible single host without inventory

Example of provisioning a vagrant machine, without using Vagrantfile:

ansible-playbook --private-key=.vagrant/machines/default/virtualbox/private_key -u vagrant -i "127.0.0.1:2200," playbooks/first.yml
Read More

linux remove user user is currently logged in

$ sudo userdel username
userdel: user username is currently logged in
$ sudo pkill -u username
$ sudo userdel -r username
Read More