Nmap Script ssl-dh-params tls.lua Error On Execution - centos7

I am using Nmap to verify some of our servers settings to make sure we are compliant. One of the things that popped up in a scan, but had not been in any of the other previous scans was an issue with our key exchange size. We were allowing 1028 and to be compliant it needs to be limited to 2048.
So I wanted to make this change and be able to validate that change I was hoping to use the Nmap script 'ssl-dh-params'.
This script did not come with the default install from the yum repository that we are using. So I went to the nmap site and downloaded what I believe to be all of the missing .nse & .lua files.
I have hit a wall where it does not appear that I need any additional libraries. When I run either of the following commands:
>nmap --script ssl-dh-params endpoint-to-be-tested.com
>nmap --script-updatedb
I get the same error regarding the tls.lua file:
Starting Nmap 6.40 ( http://nmap.org ) at 2022-08-02 15:06 EDT
NSE: Failed to load /usr/bin/../share/nmap/scripts/ssl-dh-params.nse:
/usr/bin/../share/nmap/nselib/tls.lua:340: attempt to call upvalue 'pack' (a nil value)
stack traceback:
/usr/bin/../share/nmap/nselib/tls.lua:340: in function 'signature_algorithms'
/usr/bin/../share/nmap/nselib/tls.lua:1643: in main chunk
[C]: in function 'require'
/usr/bin/../share/nmap/scripts/ssl-dh-params.nse:8: in function </usr/bin/../share/nmap/scripts/ssl-dh-params.nse:1>
NSE: failed to initialize the script engine:
/usr/bin/../share/nmap/nse_main.lua:547: could not load script
stack traceback:
[C]: in function 'error'
/usr/bin/../share/nmap/nse_main.lua:547: in function 'new'
/usr/bin/../share/nmap/nse_main.lua:783: in function 'get_chosen_scripts'
/usr/bin/../share/nmap/nse_main.lua:1271: in main chunk
[C]: in ?
QUITTING!
I am not sure what my next steps are for ironing this out. Below is a list of the libraries I have installed in the '/usr/share/nmap/nselib/' directory:
-rw-r--r--. 1 root root 71K Aug 8 2019 afp.lua
-rw-r--r--. 1 root root 16K Aug 8 2019 ajp.lua
-rw-r--r--. 1 root root 13K Aug 8 2019 amqp.lua
-rw-r--r--. 1 root root 13K Aug 8 2019 asn1.lua
-rw-r--r--. 1 root root 5.3K Aug 8 2019 base32.lua
-rw-r--r--. 1 root root 4.5K Aug 8 2019 base64.lua
-rw-r--r--. 1 root root 18K Aug 8 2019 bitcoin.lua
-rw-r--r--. 1 root root 40K Aug 8 2019 bittorrent.lua
-rw-r--r--. 1 root root 8.9K Aug 8 2019 bjnp.lua
-rw-r--r--. 1 root root 33K Aug 8 2019 brute.lua
-rw-r--r--. 1 root root 6.5K Aug 8 2019 cassandra.lua
-rw-r--r--. 1 root root 17K Aug 8 2019 citrixxml.lua
-rw-r--r--. 1 root root 8.8K Aug 8 2019 comm.lua
-rw-r--r--. 1 root root 15K Aug 8 2019 creds.lua
-rw-r--r--. 1 root root 3.1K Aug 8 2019 cvs.lua
drwxr-xr-x. 4 root root 4.0K Jun 30 11:50 data
-rw-r--r--. 1 root root 12K Aug 8 2019 datafiles.lua
-rw-r--r--. 1 root root 19K Aug 8 2019 dhcp6.lua
-rw-r--r--. 1 root root 30K Aug 8 2019 dhcp.lua
-rw-r--r--. 1 root root 21K Aug 8 2019 dnsbl.lua
-rw-r--r--. 1 root root 53K Aug 8 2019 dns.lua
-rw-r--r--. 1 root root 13K Aug 8 2019 dnssd.lua
-rw-r--r--. 1 root root 24K Aug 8 2019 drda.lua
-rw-r--r--. 1 root root 7.9K Aug 8 2019 eap.lua
-rw-r--r--. 1 root root 14K Aug 8 2019 eigrp.lua
-rw-r--r--. 1 root root 2.1K Aug 8 2019 ftp.lua
-rw-r--r--. 1 root root 21K Aug 8 2019 giop.lua
-rw-r--r--. 1 root root 3.0K Aug 8 2019 gps.lua
-rw-r--r--. 1 root root 95K Aug 8 2019 http.lua
-rw-r--r--. 1 root root 29K Aug 8 2019 httpspider.lua
-rw-r--r--. 1 root root 9.1K Aug 8 2019 iax2.lua
-rw-r--r--. 1 root root 15K Aug 8 2019 ike.lua
-rw-r--r--. 1 root root 9.3K Aug 8 2019 imap.lua
-rw-r--r--. 1 root root 40K Aug 8 2019 informix.lua
-rw-r--r--. 1 root root 20K Aug 8 2019 ipOps.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 ipp.lua
-rw-r--r--. 1 root root 23K Aug 8 2019 iscsi.lua
-rw-r--r--. 1 root root 15K Aug 8 2019 isns.lua
-rw-r--r--. 1 root root 44K Aug 8 2019 jdwp.lua
-rw-r--r--. 1 root root 15K Aug 8 2019 json.lua
-rw-r--r--. 1 root root 26K Aug 8 2019 ldap.lua
-rw-r--r--. 1 root root 4.7K Aug 8 2019 listop.lua
-rw-r--r--. 1 root root 2.0K Aug 8 2019 match.lua
-rw-r--r--. 1 root root 9.1K Aug 8 2019 membase.lua
-rw-r--r--. 1 root root 8.2K Aug 8 2019 mobileme.lua
-rw-r--r--. 1 root root 23K Aug 8 2019 mongodb.lua
-rw-r--r--. 1 root root 181K Aug 8 2019 msrpc.lua
-rw-r--r--. 1 root root 29K Aug 8 2019 msrpcperformance.lua
-rw-r--r--. 1 root root 175K Aug 8 2019 msrpctypes.lua
-rw-r--r--. 1 root root 107K Aug 8 2019 mssql.lua
-rw-r--r--. 1 root root 17K Aug 8 2019 mysql.lua
-rw-r--r--. 1 root root 4.8K Aug 8 2019 natpmp.lua
-rw-r--r--. 1 root root 37K Aug 8 2019 ncp.lua
-rw-r--r--. 1 root root 11K Aug 8 2019 ndmp.lua
-rw-r--r--. 1 root root 14K Aug 8 2019 netbios.lua
-rw-r--r--. 1 root root 6.1K Aug 8 2019 nrpc.lua
-rw-r--r--. 1 root root 3.4K Aug 8 2019 nsedebug.lua
-rw-r--r--. 1 root root 4.8K Aug 8 2019 omp2.lua
-rw-r--r--. 1 root root 7.7K Aug 8 2019 ospf.lua
-rw-r--r--. 1 root root 41K Aug 8 2019 packet.lua
-rw-r--r--. 1 root root 20K Aug 8 2019 pgsql.lua
-rw-r--r--. 1 root root 5.9K Aug 8 2019 pop3.lua
-rw-r--r--. 1 root root 29K Aug 8 2019 pppoe.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 proxy.lua
-rw-r--r--. 1 root root 2.8K Aug 2 14:54 rand.lua
-rw-r--r--. 1 root root 11K Aug 8 2019 rdp.lua
-rw-r--r--. 1 root root 3.2K Aug 8 2019 redis.lua
-rw-r--r--. 1 root root 47K Aug 8 2019 rmi.lua
-rw-r--r--. 1 root root 11K Aug 8 2019 rpcap.lua
-rw-r--r--. 1 root root 111K Aug 8 2019 rpc.lua
-rw-r--r--. 1 root root 4.9K Aug 8 2019 rsync.lua
-rw-r--r--. 1 root root 8.5K Aug 8 2019 rtsp.lua
-rw-r--r--. 1 root root 16K Aug 8 2019 sasl.lua
-rw-r--r--. 1 root root 7.3K Aug 8 2019 shortport.lua
-rw-r--r--. 1 root root 28K Aug 8 2019 sip.lua
-rw-r--r--. 1 root root 33K Aug 8 2019 smbauth.lua
-rw-r--r--. 1 root root 163K Aug 8 2019 smb.lua
-rw-r--r--. 1 root root 21K Aug 8 2019 smtp.lua
-rw-r--r--. 1 root root 14K Aug 8 2019 snmp.lua
-rw-r--r--. 1 root root 9.7K Aug 8 2019 socks.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 srvloc.lua
-rw-r--r--. 1 root root 7.2K Aug 8 2019 ssh1.lua
-rw-r--r--. 1 root root 9.0K Aug 8 2019 ssh2.lua
-rw-r--r--. 1 root root 9.5K Aug 8 2019 sslcert.lua
-rw-r--r--. 1 root root 39K Aug 8 2019 stdnse.lua
-rw-r--r--. 1 root root 4.6K Aug 8 2019 strbuf.lua
-rw-r--r--. 1 root root 2.6K Aug 8 2019 strict.lua
-rw-r--r--. 1 root root 4.4K Aug 2 14:52 stringaux.lua
-rw-r--r--. 1 root root 11K Aug 8 2019 stun.lua
-rw-r--r--. 1 root root 2.1K Aug 2 14:53 tableaux.lua
-rw-r--r--. 1 root root 3.3K Aug 8 2019 tab.lua
-rw-r--r--. 1 root root 4.0K Aug 8 2019 target.lua
-rw-r--r--. 1 root root 9.1K Aug 8 2019 tftp.lua
-rw-r--r--. 1 root root 70K Aug 2 14:49 tls.lua
-rw-r--r--. 1 root root 62K Aug 8 2019 tns.lua
-rw-r--r--. 1 root root 9.8K Aug 8 2019 unpwdb.lua
-rw-r--r--. 1 root root 11K Aug 8 2019 upnp.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 url.lua
-rw-r--r--. 1 root root 8.5K Aug 8 2019 versant.lua
-rw-r--r--. 1 root root 8.3K Aug 8 2019 vnc.lua
-rw-r--r--. 1 root root 75K Aug 8 2019 vulns.lua
-rw-r--r--. 1 root root 16K Aug 8 2019 vuzedht.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 wsdd.lua
-rw-r--r--. 1 root root 12K Aug 8 2019 xdmcp.lua
-rw-r--r--. 1 root root 15K Aug 8 2019 xmpp.lua
OS: CentOS Linux release 7.9.2009 (Core)
Nmap Version output:
Nmap version 6.40 ( http://nmap.org )
Platform: x86_64-redhat-linux-gnu
Compiled with: nmap-liblua-5.2.2 openssl-1.0.2k libpcre-8.32 libpcap-1.5.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
Is there something I am missing that needs to be installed to get the 'ssl-dh-params' script to run?
Or is this as basic as I am missing some parameters?
Thank you
James Anderson

I was able to figure out what the issue was. In this scenario I installed Nmap from the yum repository available. The version installed from the repo was v6.40. To be able to utilize the 'ssl-dh-params' script from nmap you need to be on a greater version regardless of the packages installed.
Nmap provided great instructions on installing using RPM and their current package list. [link]https://nmap.org/book/inst-linux.html#inst-rpm
To resolve I uninstalled the current installation of Nmap using yum remove nmap and then installed using RPM instructions from Nmap's site listed above.

Related

Create a service using systemctl on CentOS 7

I'm trying to create a service using systemctl on my CentOS 7 server.
In /usr/lib/systemd/system I've this situation ...
[root#centos-4gb-hel1-1 system]# pwd
/usr/lib/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la getUpdatesTelegram.sh
-rwxr-xr-x. 1 root root 116 Oct 24 22:32 getUpdatesTelegram.sh
[root#centos-4gb-hel1-1 system]# cat getUpdatesTelegram.sh
#!/bin/bash
while true ; do
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
sleep 5
done
[root#centos-4gb-hel1-1 system]#
If I try to execute
/var/www/html/OpenProntoSoccorsi/TelegramBot/getUpdates_launcher.sh
all works fine.
In /etc/systemd/system I've this ....
[root#centos-4gb-hel1-1 system]# cd /etc/systemd/system
[root#centos-4gb-hel1-1 system]# ls -la
total 40
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 .
drwxr-xr-x. 4 root root 4096 Oct 18 22:41 ..
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 basic.target.wants
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 default.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:27 dev-virtio\x2dports-org.qemu.guest_agent.0.device.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 getty.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 local-fs.target.wants
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 multi-user.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:31 sysinit.target.wants
drwxr-xr-x. 2 root root 4096 Sep 24 12:26 system-update.target.wants
[root#centos-4gb-hel1-1 system]# cd multi-user.target.wants/
[root#centos-4gb-hel1-1 multi-user.target.wants]# ls -la
total 8
drwxr-xr-x. 2 root root 4096 Oct 24 22:32 .
drwxr-xr-x. 10 root root 4096 Oct 24 22:05 ..
lrwxrwxrwx. 1 root root 38 Sep 24 12:27 auditd.service -> /usr/lib/systemd/system/auditd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:31 brandbot.path -> /usr/lib/systemd/system/brandbot.path
lrwxrwxrwx. 1 root root 39 Sep 24 12:27 chronyd.service -> /usr/lib/systemd/system/chronyd.service
lrwxrwxrwx. 1 root root 44 Sep 24 12:33 cloud-config.service -> /usr/lib/systemd/system/cloud-config.service
lrwxrwxrwx. 1 root root 43 Sep 24 12:33 cloud-final.service -> /usr/lib/systemd/system/cloud-final.service
lrwxrwxrwx. 1 root root 48 Sep 24 12:33 cloud-init-local.service -> /usr/lib/systemd/system/cloud-init-local.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:33 cloud-init.service -> /usr/lib/systemd/system/cloud-init.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 crond.service -> /usr/lib/systemd/system/crond.service
lrwxrwxrwx. 1 root root 50 Oct 24 22:32 getUpdatesTelegram.service -> /usr/lib/systemd/system/getUpdatesTelegram.service
lrwxrwxrwx. 1 root root 42 Sep 24 12:27 irqbalance.service -> /usr/lib/systemd/system/irqbalance.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:29 kdump.service -> /usr/lib/systemd/system/kdump.service
lrwxrwxrwx. 1 root root 40 Sep 24 12:26 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx. 1 root root 46 Sep 24 12:31 rhel-configure.service -> /usr/lib/systemd/system/rhel-configure.service
lrwxrwxrwx. 1 root root 39 Sep 24 12:26 rsyslog.service -> /usr/lib/systemd/system/rsyslog.service
lrwxrwxrwx. 1 root root 36 Sep 24 12:27 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx. 1 root root 37 Sep 24 12:26 tuned.service -> /usr/lib/systemd/system/tuned.service
[root#centos-4gb-hel1-1 multi-user.target.wants]# cat getUpdatesTelegram.service
[Service]
Type=simple
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
[Install]
WantedBy=multi-user.target
[root#centos-4gb-hel1-1 multi-user.target.wants]#
When I try to execute
systemctl enable getUpdatesTelegram.service
I obtain
...
...
getUpdatesTelegram.service loaded failed failed getUpdatesTelegram.service
...
...
The log I've is tthe follow ....
[root#centos-4gb-hel1-1 multi-user.target.wants]# journalctl -u getUpdatesTelegram.service
-- Logs begin at Fri 2018-10-19 20:09:02 CEST, end at Wed 2018-10-24 22:44:11 CEST. --
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Started getUpdatesTelegram.service.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Starting getUpdatesTelegram.service...
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service: main process exited, code=exited, status=203/EXEC
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: Unit getUpdatesTelegram.service entered failed state.
Oct 24 21:44:10 centos-4gb-hel1-1 systemd[1]: getUpdatesTelegram.service failed.
Where I'm wrong?
Thank you in advance!
First, custom services should not be put in /usr/lib/systemd/system, but in /etc/systemd/system. Same goes with shell scripts, just put them into /usr/local/sbin or something.
The reason why this does not work is that the script path in your service file getUpdatesTelegram.service is wrong:
ExecStart=/bin/bash /bin/getUpdatesTelegram.sh
should really be
ExecStart=/bin/bash /usr/lib/systemd/system/getUpdatesTelegram.sh
(Though as I wrote, don't put shell scripts into /usr/lib/systemd/system)
As a Red Hat fork, CentOS tends to follow similar guidelines.
The Red Hat system administrator's guide offers this useful paragraph for your situation.
The solution proposed by Jakob is correct by the way.

how to compile mariadb to get libmysqlclient.so? (missing libmysqlclient.so in /usr/local/mysql/lib)

I wanted to move our database from mysql (community version) to mariadb with the further use of php7.1/apache2.4.25... So I have to compile mariadb in our new production environment. I compiled it with these options:
cmake -DCMAKE_CXX_FLAGS:STRING="-std=c++11" -DCONC_WITH_CURL=ON -DCONC_WITH_EXTERNAL_ZLIB=ON -DDISABLE_SHARED=OFF -DCONC_WITH_MYSQLCOMPAT:BOOL=ON -DPLUGIN_CLIENT_ED25519:STRING=DYNAMIC .
make all && make install
The mysql community version has a libmysqlclient.so in /usr/local/mysql/lib located. If I compile it with the options given above I only found these files in /usr/local/mysql/lib (MariaDB 10.2.6):
# ls -l /usr/local/mysql/lib/
total 3572
-rw-r--r-- 1 root root 2305518 Jul 4 08:14 libmariadbclient.a
lrwxrwxrwx 1 root root 15 Jul 4 08:31 libmariadb.so -> libmariadb.so.3
-rwxr-xr-x 1 root root 1297664 Jul 4 08:14 libmariadb.so.3
-rw-r--r-- 1 root root 48406 Jul 4 08:14 libmysqlservices.a
drwxr-xr-x 2 root root 4096 Jul 4 08:31 plugin
How can I get libmysqlclient.so? There isn't also any libmariadbclient.so just libmariadbclient.a ...
Thank you for further hints!
OK, now I found a solution.
I've just did a symbolic link to libmariadb.so and it now looks like the following:
ls -l /usr/local/mysql/lib/
total 3572
-rw-r--r-- 1 root root 2305518 Jul 4 16:21 libmariadbclient.a
lrwxrwxrwx 1 root root 15 Jul 4 16:39 libmariadb.so -> libmariadb.so.3
-rwxr-xr-x 1 root root 1297664 Jul 4 16:21 libmariadb.so.3
lrwxrwxrwx 1 root root 15 Jul 4 16:40 libmysqlclient_r.so -> libmariadb.so.3
lrwxrwxrwx 1 root root 15 Jul 4 16:40 libmysqlclient.so -> libmariadb.so.3
-rw-r--r-- 1 root root 48406 Jul 4 16:21 libmysqlservices.a
drwxr-xr-x 2 root root 4096 Jul 4 16:39 plugin
In this case PHP 7 would finally find the mysql libraries...

Differencies between mesos-agent binary

I installed OpenDC/OS 1.9, I found there are some differencies between mesos binaries. In my OpenDC/OS's agent node, it stores mesos-agent binary under:/opt/mesosphere/packages/mesos--aaedd03eee0d57f5c0d49c74ff1e5721862cad98/bin/
[root#localhost mesosphere]# ls -lh packages/mesos--aaedd03eee0d57f5c0d49c74ff1e5721862cad98/bin/
total 1.8M
-rwxr-xr-x. 1 root root 5.0K Mar 24 07:46 make_disk_resources.py
-rwxr-xr-x. 1 root root 44K Mar 24 07:46 mesos
-rwxr-xr-x. 1 root root 278K Mar 24 07:46 mesos-agent
-rwxr-xr-x. 1 root root 4.6K Mar 24 07:46 mesos-cat
........
mesos-agent size is only 278K
I follow below steps to build mesos source code(same version as above),
http://mesos.apache.org/gettingstarted
I got all binary and other files under xx/build/src/.libs folder:
-rwxr-xr-x. 1 root root 2.0M Jun 20 06:50 mesos-agent
-rwxr-xr-x. 1 root root 781K Jun 20 06:49 mesos-containerizer
-rwxr-xr-x. 1 root root 4.7M Jun 20 06:50 mesos-docker-executor
-rwxr-xr-x. 1 root root 3.5M Jun 20 06:48 mesos-execute
-rwxr-xr-x. 1 root root 3.8M Jun 20 06:49 mesos-executor
-rwxr-xr-x. 1 root root 2.4M Jun 20 06:48 mesos-fetcher
-rwxr-xr-x. 1 root root 3.1M Jun 20 06:49 mesos-health-check
-rwxr-xr-x. 1 root root 1.6M Jun 20 06:48 mesos-local
-rwxr-xr-x. 1 root root 591K Jun 20 06:48 mesos-log
this mesos-agent size is more than 2.0M
what's the differencies between these two mesos-agent? Can I replace the first mesos-agent binary(278K) with my self build one(2.0M) ?
if I install mesos by apt-get install or yum install, the mesos-agent size is almost the same as first one (278K)
How does OpenDC/OS build and use mesos ?
thanks!

Errors importing pyql namespaces

I can import many things as the code below shows, but if I uncomment the imports two that are commented out, I get errors
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 33, in <module>
from quantlib.instruments.api import EuropeanOption
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/instruments/api.py", line 1, in <module>
from .bonds import FixedRateBond, ZeroCouponBond
File "quantlib/indexes/ibor_index.pxd", line 12, in init quantlib.instruments.bonds (quantlib/instruments/bonds.cpp:6651)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/indexes/ibor_index.so: undefined symbol: _ZNK8QuantLib9IborIndex21businessDayConventionEv
[idf#node1 cboe]$
[idf#node1 cboe]$ python pandas_pyql.py
Traceback (most recent call last):
File "pandas_pyql.py", line 36, in <module>
from quantlib.termstructures.yields.api import FlatForward
File "/home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/api.py", line 1, in <module>
from .bond_helpers import BondHelper, FixedRateBondHelper
File "quantlib/termstructures/yields/bond_helpers.pyx", line 1, in init quantlib.termstructures.yields.bond_helpers (quantlib/termstructures/yields/bond_helpers.cpp:4617)
ImportError: /home/idf/anaconda/lib/python2.7/site-packages/quantlib-0.1-py2.7-linux-x86_64.egg/quantlib/termstructures/yields/rate_helpers.so: undefined symbol: _ZN8QuantLib14SwapRateHelperC1ERKNS_6HandleINS_5QuoteEEERKNS_6PeriodERKNS_8CalendarENS_9FrequencyENS_21BusinessDayConventionERKNS_10DayCounterERKN5boost10shared_ptrINS_9IborIndexEEES5_S8_RKNS1_INS_18YieldTermStructureEEE
[idf#node1 cboe]$
import quantlib.reference.names as nm
from quantlib.pricingengines.blackformula import blackFormulaImpliedStdDev
from quantlib.instruments.option import EuropeanExercise, VanillaOption
from quantlib.instruments.payoffs import PlainVanillaPayoff, Put, Call
from quantlib.models.equity.heston_model import HestonModel
from quantlib.pricingengines.vanilla.vanilla import AnalyticHestonEngine
from quantlib.processes.heston_process import HestonProcess
from quantlib.quotes import SimpleQuote
from quantlib.settings import Settings
from quantlib.util.converter import pydate_to_qldate, df_to_zero_curve
#from quantlib.instruments.api import EuropeanOption
from quantlib.pricingengines.api import AnalyticEuropeanEngine
from quantlib.processes.api import BlackScholesMertonProcess
#from quantlib.termstructures.yields.api import FlatForward
from quantlib.termstructures.volatility.api import BlackConstantVol
from quantlib.time.api import today, NullCalendar, ActualActual
from quantlib.time.date import (Period, Days)
from quantlib.mlab.util import common_shape, array_call
EDIT 1
This is my /usr/local/lib
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so -> libczmq.so.1.1.0
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libczmq.so.1 -> libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 780174 Apr 24 2015 libczmq.so.1.1.0
-rwxr-xr-x. 1 root root 927 Apr 24 2015 libfix8.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so -> libfix8.so.1.0.3
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libfix8.so.1 -> libfix8.so.1.0.3
-rwxr-xr-x. 1 root root 7784908 Apr 24 2015 libfix8.so.1.0.3
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so -> libgdiplus.so.0.0.0
lrwxrwxrwx 1 root root 19 Jul 17 2015 libgdiplus.so.0 -> libgdiplus.so.0.0.0
-rwxr-xr-x 1 root root 424120 Mar 9 2015 libgdiplus.so.0.0.0
-rwxr-xr-x. 1 root root 939 Apr 24 2015 libhftest.la
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so -> libhftest.so.0.0.0
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libhftest.so.0 -> libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 2834313 Apr 24 2015 libhftest.so.0.0.0
-rwxr-xr-x. 1 root root 209608 Apr 24 2015 libkj-0.6-dev.so
-rw-r--r--. 1 root root 334352 Apr 24 2015 libkj.a
-rwxr-xr-x. 1 root root 359914 Apr 24 2015 libkj-async-0.6-dev.so
-rw-r--r--. 1 root root 528718 Apr 24 2015 libkj-async.a
-rwxr-xr-x. 1 root root 1002 Apr 24 2015 libkj-async.la
lrwxrwxrwx. 1 root root 22 Apr 24 2015 libkj-async.so -> libkj-async-0.6-dev.so
-rwxr-xr-x. 1 root root 936 Apr 24 2015 libkj.la
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libkj.so -> libkj-0.6-dev.so
-rwxr-xr-x. 1 root root 57925 Apr 24 2015 libkj-test-0.6-dev.so
-rw-r--r--. 1 root root 71578 Apr 24 2015 libkj-test.a
-rwxr-xr-x. 1 root root 995 Apr 24 2015 libkj-test.la
lrwxrwxrwx. 1 root root 21 Apr 24 2015 libkj-test.so -> libkj-test-0.6-dev.so
-rw-r--r-- 1 root root 550804 Jul 3 2015 libpfring.a
-rwxr-xr-x 1 root root 421488 Jul 3 2015 libpfring.so
lrwxrwxrwx. 1 root root 24 Apr 24 2015 libPocoFoundationd.so -> libPocoFoundationd.so.30
-rwxr-xr-x. 1 root root 10145915 Apr 24 2015 libPocoFoundationd.so.30
lrwxrwxrwx. 1 root root 23 Apr 24 2015 libPocoFoundation.so -> libPocoFoundation.so.30
-rwxr-xr-x. 1 root root 2006896 Apr 24 2015 libPocoFoundation.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoJSONd.so -> libPocoJSONd.so.30
-rwxr-xr-x. 1 root root 2318379 Apr 24 2015 libPocoJSONd.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoJSON.so -> libPocoJSON.so.30
-rwxr-xr-x. 1 root root 327936 Apr 24 2015 libPocoJSON.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoNetd.so -> libPocoNetd.so.30
-rwxr-xr-x. 1 root root 7169896 Apr 24 2015 libPocoNetd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoNet.so -> libPocoNet.so.30
-rwxr-xr-x. 1 root root 1209648 Apr 24 2015 libPocoNet.so.30
lrwxrwxrwx. 1 root root 18 Apr 24 2015 libPocoUtild.so -> libPocoUtild.so.30
-rwxr-xr-x. 1 root root 3264471 Apr 24 2015 libPocoUtild.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoUtil.so -> libPocoUtil.so.30
-rwxr-xr-x. 1 root root 473760 Apr 24 2015 libPocoUtil.so.30
lrwxrwxrwx. 1 root root 17 Apr 24 2015 libPocoXMLd.so -> libPocoXMLd.so.30
-rwxr-xr-x. 1 root root 2927891 Apr 24 2015 libPocoXMLd.so.30
lrwxrwxrwx. 1 root root 16 Apr 24 2015 libPocoXML.so -> libPocoXML.so.30
-rwxr-xr-x. 1 root root 596408 Apr 24 2015 libPocoXML.so.30
-rw-r--r-- 1 root root 54723484 Mar 27 13:42 libprotobuf.a
-rwxr-xr-x 1 root root 972 Mar 27 13:42 libprotobuf.la
-rw-r--r-- 1 root root 4638676 Mar 27 13:42 libprotobuf-lite.a
-rwxr-xr-x 1 root root 1007 Mar 27 13:42 libprotobuf-lite.la
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so -> libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 26 Mar 27 13:42 libprotobuf-lite.so.10 -> libprotobuf-lite.so.10.0.0
-rwxr-xr-x 1 root root 2005147 Mar 27 13:42 libprotobuf-lite.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so -> libprotobuf.so.10.0.0
lrwxrwxrwx 1 root root 21 Mar 27 13:42 libprotobuf.so.10 -> libprotobuf.so.10.0.0
-rwxr-xr-x 1 root root 21758102 Mar 27 13:42 libprotobuf.so.10.0.0
-rw-r--r-- 1 root root 96605238 Mar 27 13:42 libprotoc.a
-rwxr-xr-x 1 root root 988 Mar 27 13:42 libprotoc.la
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so -> libprotoc.so.10.0.0
lrwxrwxrwx 1 root root 19 Mar 27 13:42 libprotoc.so.10 -> libprotoc.so.10.0.0
-rwxr-xr-x 1 root root 32484516 Mar 27 13:42 libprotoc.so.10.0.0
-rw-r--r-- 1 root root 1025743748 Jun 12 2015 libQuantLib.a
-rwxr-xr-x 1 root root 945 Jun 12 2015 libQuantLib.la
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so -> libQuantLib.so.0.0.0
lrwxrwxrwx 1 root root 20 Jun 12 2015 libQuantLib.so.0 -> libQuantLib.so.0.0.0
-rwxr-xr-x 1 root root 365069474 Jun 12 2015 libQuantLib.so.0.0.0
This is my LD_LIBRARY_PATH
[idf#node1 cboe]$ echo $LD_LIBRARY_PATH
/opt/intel/lib/intel64:/opt/NAG/cll6i25dcl/lib:/usr/lib64:/usr/lib64/openmpi/lib:/usr/local/lib:/opt/intel/opencl/lib64:/usr/local/apr/lib:
[idf#node1 cboe]$

Zero-byte files in /usr/local/bin after AMI captured

I am launching an EC2 instance using Ansible and capturing an AMI image. I have verified that these dependencies get installed correctly on the instance. For example, this is what I get on the EC2 instance just before AMI imaging:
ubuntu#ip-1-2-3-4:/usr/local/bin$ ansible --version
ansible 1.4.4
-rwxr-xr-x 1 root root 5907 Jan 31 22:20 ansible
-rwxr-xr-x 1 root root 9269 Jan 31 22:20 ansible-doc
-rwxr-xr-x 1 root root 29163 Jan 31 22:20 ansible-galaxy
-rwxr-xr-x 1 root root 10419 Jan 31 22:20 ansible-playbook
-rwxr-xr-x 1 root root 6916 Jan 31 22:20 ansible-pull
-rwxr-xr-x 1 root root 714 Jan 31 22:19 aws
-rwxr-xr-x 1 root root 1408 Jan 31 22:19 aws.cmd
-rwxr-xr-x 1 root root 897 Jan 31 22:19 aws_completer
-rwxr-xr-x 1 root root 1860 Jan 31 22:19 aws_zsh_completer.sh
The problem is that once I capture an AMI and launch a new instance, I all files in /usr/local/bin are zero-byte files!
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-doc
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-galaxy
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-playbook
-rwxr-xr-x 1 root root 0 Jan 31 22:20 ansible-pull
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws.cmd
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws_completer
-rwxr-xr-x 1 root root 0 Jan 31 22:19 aws_zsh_completer.sh
Why are these files being zero'ed out when I create a new instance from the AMI?
This was a problem with Ansible, not with AWS. Turns out there's a documentation bug in Ansible 1.4.4 where the ec2_ami module does not shut down and reboot the instance by default (the docs claim it does!). This causes all sorts of problems with file system integrity.
The fix is to include no_reboot: no in the Ansible task.