Hubot not responding to Ping - macos

Installed hubot but it's not responding to Pinging on OSX. Sample error:
bin/hubot
botname> [Sun May 22 2016 00:24:06 GMT-0400 (EDT)] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (https://github.com/github/hubot-scripts/issues/1113) in favor of packages for each script.
Your hubot-scripts.json is empty, so you just need to remove it.
[Sun May 22 2016 00:24:06 GMT-0400 (EDT)] ERROR hubot-heroku-alive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web-url | cut -d= -f2)
[Sun May 22 2016 00:24:06 GMT-0400 (EDT)] INFO hubot-redis-brain: Using default redis on localhost:6379

Related

How to Backup & Restore ElasticSearch

I have been trying the following methods to Backup & Restore an ElasticSearch cluster from one server to another with little success. I have not used a backup process thus far and I would like to move my whole ElasticSearch cluster from a small 2GB cluster to 15GB cluster. I used the following methods.
Using taskrabit/elasticsearch-dump - I was successfully able to export the complete database to backup.json file, however when restoring the backup.json, it gave me the following output. After researching the output further I understood that the bulk input of the plug-in was not fully developed.
./bin/elasticdump --all=true --input=/home/user/backup.json --output=http://192.168.0.213:9200/ --type=data
Thu, 09 Feb 2017 06:43:29 GMT | starting dump
Thu, 09 Feb 2017 06:43:29 GMT | got 61 objects from source file (offset: 0)
Thu, 09 Feb 2017 06:43:29 GMT | sent 61 objects to destination elasticsearch, wrote 0
Thu, 09 Feb 2017 06:43:29 GMT | got 0 objects from source file (offset: 61)
Thu, 09 Feb 2017 06:43:29 GMT | Total Writes: 0
Thu, 09 Feb 2017 06:43:29 GMT | dump complete
Using elasticsearch-tools (es-export-bulk & es-import bulk) I again was able to backup the json successfully. But the import failed once again with an error:
"statusCode":400,"response":"{"error":{
I used the examples from es-bulk-export
Using the ElasticSearch built-in Snapshot & Restore.
curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{
"type": "fs",
"settings": {"location": "/home/shawn/backup", "compress": true}
}'
I believe I'm missing something as the execution gives me the following error. Do I need to create /_snapshot/my_backup? If so how?
{"error":{"root_cause":[
{"type":"repository_exception",
"reason":"[my_backup] location [/home/shawn/backup] doesn't match any of the locations specified by path.repo because this setting is empty"
}],
"type":"repository_exception","reason":"[my_backup] failed to create repository",
"caused_by":
{"type":"creation_exception","reason":"Guice creation errors:\n\n1) Error injecting constructor, RepositoryException[[my_backup] location [/home/shawn/backup] doesn't match any of the locations specified by path.repo because this setting is empty]\n at org.elasticsearch.repositories.fs.FsRepository.<init>(Unknown Source)\n while locating org.elasticsearch.repositories.fs.FsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error","caused_by":{"type":"repository_exception","reason":"[my_backup] location [/home/shawn/backup] doesn't match any of the locations specified by path.repo because this setting is empty"}}},"status":500}
You are creating your _snapshot/my_backup just fine, You only need to add line to /etc/elasticsearch/elasticsearch.yml:
path.repo: ["/home/shawn/backup"]
Which is actual location of your snapshot. Then restart Elasticsearch.

no ocijdbc12 in java.library.path sqldeveloper mac os

I am trying to get SQLDeveloper to work on my Mac laptop. I need to make a TNS connection but whenever I try to create one I get the error message: no ocijdbc12 in java.library.path.
I have latest instantclient installed and I only see these files:
instantclient_11_2:
total 380640
-rw-rw-rw-# 1 red staff 484 Apr 10 2014 BASIC_README
-rwxrwxrwx# 1 red staff 14348 Apr 10 2014 adrci
-rwxrwxrwx# 1 red staff 40768 Apr 10 2014 genezi
-r-xr-xr-x# 1 red staff 66167420 Feb 7 2014 libclntsh.dylib.11.1
-r-xr-xr-x# 1 red staff 2817872 Jan 29 2014 libnnz11.dylib
-r-xr-xr-x# 1 red staff 1897664 Feb 7 2014 libocci.dylib.11.1
-rwxrwxrwx# 1 red staff 118707148 Apr 10 2014 libociei.dylib
-r-xr-xr-x# 1 red staff 159004 Jan 7 2014 libocijdbc11.dylib
-r--r--r--# 1 red staff 2091135 Jan 28 2014 ojdbc5.jar
-r--r--r--# 1 red staff 2739616 Jan 28 2014 ojdbc6.jar
-rwxrwxrwx# 1 red staff 162380 Apr 10 2014 uidrvci
-r--r--r--# 1 red staff 66779 Jan 7 2014 xstreams.jar
There's a libocijdbc11.dylib but no libocijdbc12.dylib. What's up with that?
After a recent JAVA upgrade, my SqlDeveloper install stopped working, errors related to :
The native OCI driver could not be loaded. The system property java.library.path contains the entries from the environment variable 'DYLD_LIBRARY_PATH' check it to verify that the expected native library directory /usr/lib/java is present and precedes any other client installations.
I upgraded to SqlDeveloper 18.1.0 = no luck.
I tried many fixes - modifying '/.sqldeveloper/18.1.0/product.conf', futzing with $PATH, etc - they all failed
FINALLY - I upgraded the instant client to instantclient_12_2 IT WORKED!
Note - the place you set environment vars is now: ${HOME}/.sqldeveloper//env.sh
in my case, /Users/REDACTED/.sqldeveloper/18.1.0/env.sh contains:
export TNS_ADMIN="${HOME}/Downloads/instantclient_12_2"
export DYLD_LIBRARY_PATH=$TNS_ADMIN
export LD_LIBRARY_PATH=$TNS_ADMIN
export SQLPATH=$TNS_ADMIN
if ! echo $PATH | fgrep "${DYLD_LIBRARY_PATH}" /dev/null ; then
export PATH="${DYLD_LIBRARY_PATH}:${PATH}"
fi
This (using env.sh) is better than cluttering up your .bashrc files
My Solution:
Just use the setting in SQLDeveloper:
Tools > Preferences > Database > Advanced > Tnsnames Directory
Click Browse to select the location of the parent folder of your tnsnames file.

Getting specific part of text from file based on in-line date

I am not savvy at all when it comes to scripting. The script I have basically dumps the results of git log command into a file.
However, I would only like to show the lines for the day the script was run. So if I run myscript.sh on Thu Jun 20, I want to see all lines from a file down until Wed Jun 19.
Here is what the file looks like:
commit 8da0dd9bsd23899d11b4ee7348af0640b98ed4b17
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Thu Jun 20 12:08:59 2013 -0400
Testing Git push 13 6
Multiple lines
commit aca564549f91329fcfa9a9f908f7fdeffa83f139b
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Thu Jun 20 12:01:48 2013 -0400
Testing Git push 13 5
commit b80c51b32f48364c2108588aff4c9e12fbb78370b
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Thu Jun 20 11:59:57 2013 -0400
Testing Git push 13 4
commit c4f8f8d4196f7c0f2deaf8g0ecc61797e7b8afdd9
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Wed Jun 19 11:48:37 2013 -0400
Testing Git push 13 3
commit 9a296b2273528868e3e4dc19310fa802daf76b1f3
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Wed Jun 19 11:45:49 2013 -0400
Testing Git push 13 2
commit 55cb8f2399242f051f577a042713a402137df4456
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Sat Jun 15 11:40:48 2013 -0400
Testing Git push 13 1
commit a48e59ec1de227cc2878dce3330ge7776336eb289
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Thu Jun 13 11:28:56 2013 -0400
Switched datasource to SuprPakJ
Created WWButton and WWLabel (extends JButton and JLabel)
Designed Sales Order screen
commit 57ce2da4673a35f50a5146d43a1f1a969c590c8c9
Author: Denis <Denis#WWOscar.Waudware.local>
Date: Tue Jun 11 08:20:58 2013 -0400
I tried searching, but best I got was the sed -e command to print out everything until the first blank line, which isn't exactly what I need.
Any help is appreciated!
How does this work for you:
git log --since=yesterday

Perl script are not running on Apache 2.2.15 with mod_fcgid / Win32

I have installed apache 2.2.15 with mod_fcgid on Windows XP SP3 and Activestate Perl (tried both 5.12 & 5.8.9)
tried the perl example script in the mod_fcgid reference page but it
is not working
I get this in error log
[Tue Dec 07 23:10:35 2010] [info] mod_fcgid: server 127.0.0.1:/usr/bin/perl.exe(5476) started
[Tue Dec 07 23:10:35 2010] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid : get overlap result error
[Tue Dec 07 23:10:35 2010] [error] [client 127.0.0.1] Premature end of script headers: f.pl
[Tue Dec 07 23:10:35 2010] [error] [client 127.0.0.1] File does not exist: C:/Apache2/htdocs/favicon.ico
[Tue Dec 07 23:10:39 2010] [info] mod_fcgid - infoneto: process /usr/bin/perl.exe(5476) exit(communication error), return code 9
I double check everything including:
The #!/usr/bin/perl.exe line
The mod_fcgid is loaded
When running the script as plain cgi it works
When I turned to the older mod_fastcgi it works just fine as a fastcgi (i.e. loads once runs many times).
Using process monitor I can see that apache starts Perl but it Perl exits almost instantly without even loading the Perl script
I tried it also on Apache 2.0.52 & 2.0.63 with older mod_fcgid and with Apache 2.2.15 with the newest mod_fcgid (2.3.6) but no luck
What can be done ?
I googled around but no one seems to have solution or managed using mod_fcgid with perl on Win32
I opened a bug on both FCGI at cpan and on apache tracker but no one seems to care...
Is there a solution for this ?
Does someone else need this ? (mod_fcgid with Perl on Apache/Win32)
You're on Win32, and you have a /usr/bin/perl.exe? Are you sure?
Regardless, I think you're looking for mod_fastcgi rather than mod_fcgid; at least, a quick google search seemed that it fixed the problem for most. Apparently mod_fcgid is not working as well under Windows.

How do I get sendmail to work reliably on a Mac OS 10.5?

I need to use sendmail from Macs in an office. At the moment, I can get it to work on the two development Macs (which I think is due to MAMP being installed and working), but getting it to go on the others seems to be a problem...
I assume it's down to some config issue, and hope there's someway to fix it (without resorting to installing MAMP on each machine !).
I think it may be down to the 'local' nature of the from, but not sure. Here's a dump of /var/log/mail.log if that's any help:
Nov 14 14:37:06 claire-g5 postfix/master[5339]: daemon started -- version 2.4.3, configuration /etc/postfix
Nov 14 14:37:06 claire-g5 postfix/qmgr[5341]: 2B625250BDB: from=<claire#claire-g5.local>, size=1131, nrcpt=1 (queue active)
Nov 14 14:37:06 claire-g5 postfix/qmgr[5341]: D5D19250D5A: from=<claire#claire-g5.local>, size=1191, nrcpt=1 (queue active)
Nov 14 14:37:06 claire-g5 postfix/smtp[5344]: 2B625250BDB: host mx01.xxx.uk[212.x.x.134] said: 451 cannot relay now to <xx#xx.com>, please try again later (in reply to RCPT TO command)
Nov 14 14:37:06 claire-g5 postfix/smtp[5346]: D5D19250D5A: host mx01.xxx.uk[212.x.x.186] said: 451 cannot relay now to <xx#xx.com>, please try again later (in reply to RCPT TO command)
Nov 14 14:37:07 claire-g5 postfix/smtp[5346]: D5D19250D5A: to=<xx#xx.com>, relay=mx01.xxx.uk[212.x.x.134]:25, delay=2350, delays=2349/0.08/0.7/0.12, dsn=4.0.0, status=deferred (host mx01.xxx.uk[212.x.x.134] said: 451 cannot
Nov 14 14:37:07 claire-g5 postfix/pickup[5340]: 1A2EC2511D1: uid=501 from=<claire
Note that it's postfix that you have running on your mac, not sendmail.
The problem is that the machine mx01.xxx.uk[212.x.x.134] is configured to block mail relaying (accepting an email over SMTP and sending it on to the final mail server). The postfix configuration files are normally stored in /etc/postfix so you could start by looking there. In particular, look at the mynetworks setting in main.cf.
Ah ha! Thanks Denis - this looks like the beasty...
### MAMP Postfix Configuration - Start ###
myorigin = example.com
myhostname = mailer.$myorigin
smtpd_sender_restrictions = permit_inet_interfaces
# smart host
relayhost = auth.example.co.uk
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_MAMP_passwd
smtp_sasl_security_options = noanonymous
### MAMP Postfix Configuration - End ###
# DONT REMOVE: MAMP PRO main.cf template compatibility version: 1
I'll give it a go, and get back to you.

Resources