Exim4 - mysql lookup - mysql

I tried exim4 start, but now I get this error:
lookup type "mysql" is not available. I installed exim4 with apt-get install exim4. How can I fix this?
Regards,
Kevin
More information:
2011-05-23 15:34:14 1QOVGr-0002k2-5D failed to expand "${lookup mysql{SELECT DISTINCT transport FROM mail_transports WHERE transport = '${quote_mysql:$domain}'}}" while checking a list: lookup type "mysql" is not available (not in the binary - check buildtime LOOKUP configuration)
2011-05-23 15:34:14 1QOVGr-0002k2-5D failed to expand "${lookup mysql{SELECT DISTINCT transport FROM mail_transports WHERE transport = '${quote_mysql:$domain}'}}" while checking a list: lookup type "mysql" is not available (not in the binary - check buildtime LOOKUP configuration)

mysql has to be compiled in to be available as a lookup type. You can see what lookups are available by running exim4 -bV (or exim, or sendmail, or however your exim binary is actually named). Here's an example output from one of my servers (note I don't have mysql compiled in either):
g3 0 /home/jj33 > exim -bV | grep ^Lookup
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch passwd
I seem to remember that Debian (and therefore probably Ubuntu) had something like exim4-heavy as a package, which was exim with all the bells and whistles compiled in. You might take a look at that. I also seem to remember that some of the packagers maintained their own private dynamic loader for lookup types, so it might be possible in Debian/Ubuntu that you could load the exim4-mysql package or some such and have the lookup available.

Related

Unsupported item key in Zabbix discovery

I am using zabbix 4.0.
Trying to make discovery with simple check.
When i click "check now", i get Unsupported item key warning. Below you can find my discovery configuration. I couldnt solve why does it give this error. Everything seems fine.
It fails because you have set a Simple Check type, then typed in a ssh.run... key.
SSH checks type must be configured as SSH Agent, which also enables the executed script box: this command must return a json formatted according to the LLD format.
The key items to verify are:
the feature is supported for passive checks only
the check must be present in configuration cache in order to get executed
To refresh the configuration cache, execute zabbix_server -R config_cache_reload (or zabbix_proxy -R config_cache_reload).
Reference: check_now.

Emerge issue in Gentoo

I have an issue with my gentoo. I tried to install BIND into my gentoo but everytime i want to install it, i will get an error message.
Here is whats happen in my Konsole :
emerge --ask net-dns/bind
* IMPORTANT: 3 config files in '/etc/portage' need updating.
* See the CONFIGURATION FILES section of the emerge
* man page to learn how to update config files.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-libs/openssl-1.0.1g USE="-bindist*"
[ebuild N ] net-dns/bind-9.9.4_p2 USE="berkdb dlz gost ipv6 ldap odbc ssl -caps -doc -filter-aaaa -fixed-rrset -geoip -gssapi -idn -mysql -postgres -python -rpz -rrl -sdb-ldap (-selinux) -static-libs -threads -urandom -xml"
!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:
dev-libs/openssl:0
(dev-libs/openssl-1.0.1g::gentoo, ebuild scheduled for merge) pulled in by
>=dev-libs/openssl-1.0.0:0[-bindist] required by (net-dns/bind-9.9.4_p2::gentoo, ebuild scheduled for merge)
dev-libs/openssl:0[-bindist] required by (net-dns/bind-9.9.4_p2::gentoo, ebuild scheduled for merge)
(dev-libs/openssl-1.0.1g::gentoo, installed) pulled in by
>=dev-libs/openssl-0.9.6d:0[bindist] required by (net-misc/openssh-5.9_p1-r4::gentoo, installed)
It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously. If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously. You may want to try a larger value of
the --backtrack option, such as --backtrack=30, in order to see if
that will solve this conflict automatically.
For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.
!!! The following installed packages are masked:
- media-libs/mesa-9.0::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Chí-Thanh Christopher Nguyễn <chithanh#gentoo.org> (26 Mar 2014)
# Affected by multiple vulnerabilities, #445916, #471098 and #472280
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
Can anyone show me how to resolve this issue in my Gentoo. I have a hard time to install anything.
UPDATED
emerge --ask net-dns/bind
* IMPORTANT: 3 config files in '/etc/portage' need updating.
* See the CONFIGURATION FILES section of the emerge
* man page to learn how to update config files.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-libs/openssl-1.0.1g USE="-bindist*"
[ebuild N ] net-dns/bind-9.9.4_p2 USE="berkdb dlz gost ipv6 ldap odbc ssl -caps -doc -filter-aaaa -fixed-rrset -geoip -gssapi -idn -mysql -postgres -python -rpz -rrl -sdb-ldap (-selinux) -static-libs -threads -urandom -xml"
The following USE changes are necessary to proceed:
see "package.use" in the portage(5) man page for more details)
# required by net-dns/bind-9.9.4_p2[ssl]
# required by net-dns/bind (argument)
=dev-libs/openssl-1.0.1g -bindist
Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.
!!! The following installed packages are masked:
- media-libs/mesa-9.0::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Chí-Thanh Christopher Nguyễn <chithanh#gentoo.org> (26 Mar 2014)
# Affected by multiple vulnerabilities, #445916, #471098 and #472280
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
2 steps to solve this problems:
package.use/bind
net-dns/bind -ipv6 dlz
dev-libs/openssl -bindist
net-misc/openssh -bindist
recompile ssl ssh, and install bind
emerge -Uav dev-libs/openssl net-misc/openssh
emerge -av net-dns/bind
the uses for bind:
equery uses bind -i
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for net-dns/bind-9.10.2_p2:
U I
+ + berkdb : Add support for sys-libs/db (Berkeley DB
for MySQL)
+ + caps : Use Linux capabilities library to control
privilege
+ + dlz : Enables dynamic loaded zones, 3rd party
extension
- - doc : Add extra documentation (API, Javadoc,
etc). It is recommended to enable per
package instead of globally
- - filter-aaaa : Enable filtering of AAAA records over IPv4
- - fixed-rrset : Enables fixed rrset-order option
- - geoip : Add geoip support for country and city
lookup based on IPs
- - gost : Enables gost OpenSSL engine support
- - gssapi : Enable gssapi support
- - idn : Enable support for Internationalized Domain
Names
- - ipv6 : Add support for IP version 6
- - json : Enable JSON statistics channel
- - ldap : Add LDAP support (Lightweight Directory
Access Protocol)
- - mysql : Add mySQL Database support
- - nslint : Build and install the nslint util
- - odbc : Add ODBC Support (Open DataBase
Connectivity)
- - postgres : Add support for the postgresql database
- - python : Add optional support/bindings for the
Python language
+ + python_targets_python2_7 : Build with Python 2.7
+ + python_targets_python3_3 : Build with Python 3.3
- - python_targets_python3_4 : Build with Python 3.4
- - rpz : Enable response policy rewriting (rpz)
- - seccomp : Enable seccomp for system call filtering
+ + ssl : Add support for Secure Socket Layer
connections
- - static-libs : Build static versions of dynamic libraries
as well
+ + threads : Add threads support for various packages.
Usually pthreads
- - urandom : Use /dev/urandom instead of /dev/random
- - xml : Add support for XML files
maybe this help:
# vi /etc/portage/package.use
and add this line:(this line was changed)
dev-libs/openssl -bindist
I have no other way if it doesn't work, Sorry :(
maybe you can get help from gentoo forums.
good luck.
emerge net-dns/bind --autounmask-write
etc-update
emerge net-dns/bind
remove -bindist from USE flags
Just to help other people having the same error, you need add the line under "# Required by" to your package.use file.
echo "=dev-libs/openssl-1.0.1g -bindist" >> /etc/portage/package.use/zz-autounmask
or
nano -w /etc/portage/package.use/zz-autounmask
and then manually copy the line into the file.
Replace "=dev-libs/openssl-1.0.1g -bindist" with what's required to be added to your package.use

UnknownHostException while formatting HDFS

I have installed CDH4 on CentOS 6.3 64-bit in Pseudo Distributed mode using the following instructions. Everything is set to localhost in the Hadoop configuration files. But, still when I format the name node the below exception appears. When I add an 192.168.1.101 CentOSHost entry to the /etc/hosts file the exception goes away and I am able to run format/start HDFS and run MR jobs.
I want to run MR jobs even when I am not connected to the network without adding an entry to the /etc/hosts file. How to get this done?
12/08/27 22:17:15 WARN net.DNS: Unable to determine address of the host-falling back to "localhost" address
java.net.UnknownHostException: CentOSHost: CentOSHost
at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
at org.apache.hadoop.net.DNS.resolveLocalHostIPAddress(DNS.java:283)
at org.apache.hadoop.net.DNS.(DNS.java:59)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.newBlockPoolID(NNStorage.java:1017)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.newNamespaceInfo(NNStorage.java:565)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:145)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:724)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1095)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1193)
It looks like some where the configuration is returning/ using the hostname as CentOSHost.
What does hostname --fqdn returns to you?
For Hadoop, it is important that name look-up and reverse look-up work successfully. You should be able to resolve the ip-address and resolve hostname from the ip-address (Reverse resolution). This can be tested using the above command.
The entry to /etc/hosts is required for the reverse resolution to work. Unless the entry and the configuration are pointing to localhost. Even in that case the hostname --fqdn should return as localhost.

Executing a system command from mysql

I am trying to execute a shell command from within mysql (from within a procedure or a trigger or the command line for mysql).
I have added lib_mysqludf_sys to the mysql plugins and created the functions that are available with the library. (the library) home page
The library has 5 functions.
sys_set - to set $PATH - this works and stores the $PATH which i can later check.
sys_get - to get the stored value of $PATH - this also works and returns the value that I have stored.
sys_exec - to execute a command in the system and return the exit code.
sys_eval - to execute a command in the system and return the standard output.
lib_mysqludf_sys_info - return the current version of the library - this also works.
I need sys_exec and sys_eval to work correctly.
I think I have found the problem in my search but cannot solve it.
mysql is limited by apparmor and is not granted access to execute system commands by the default apparmor profile. I have tried the commands in the documentation to disable a single profile, disable the framework, putting all profiles except one into enforce mode and putting all profiles in complain mode. Nothing works. the command
sudo apparmor_status
always gives me the same output.
20 profiles are loaded.
20 profiles are in enforce mode.
/opt/extras.ubuntu.com/unity-lens-askubuntu/unity-askubuntu-daemon
/sbin/dhclient
/usr/bin/evince
/usr/bin/evince-previewer
/usr/bin/evince-previewer//launchpad_integration
/usr/bin/evince-previewer//sanitized_helper
/usr/bin/evince-thumbnailer
/usr/bin/evince-thumbnailer//sanitized_helper
/usr/bin/evince//launchpad_integration
/usr/bin/evince//sanitized_helper
/usr/lib/NetworkManager/nm-dhcp-client.action
/usr/lib/connman/scripts/dhclient-script
/usr/lib/cups/backend/cups-pdf
/usr/lib/lightdm/lightdm/lightdm-guest-session-wrapper
/usr/lib/telepathy/mission-control-5
/usr/lib/telepathy/telepathy-*
/usr/sbin/cupsd
/usr/sbin/mysqld
/usr/sbin/tcpdump
/usr/share/gdm/guest-session/Xsession
0 profiles are in complain mode.
5 processes have profiles defined.
5 processes are in enforce mode.
/sbin/dhclient (2537)
/usr/lib/telepathy/mission-control-5 (2709)
/usr/sbin/cupsd (12245)
/usr/sbin/cupsd (12250)
/usr/sbin/mysqld (12675)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
Please tell me how I could disable apparmor or change the profile for mysql so that it has access to executing system commands.
The reason I am doing all this is so that I can execute a system command when somethings happen in the DB (via a DB trigger), if you have suggestion for some other ways in which this can be easily implemented then please mention those too.
Thanks.
managed to get this working. First put apparmor in complain mode for the necessary profiles then used apparmor's interactive tools (aa-genprof/aa-logprof) to configure the profile for mysqld

Is there a way to handle catch exception in MSI install wizard?

I am facing some odd situation that when I select/deselect the features in the feature customization wizard, it sometimes crashes the window. It does not give any clue at all. It also not happens consistently.
Do you have any idea or faced such kind of issue? I am able to even trace the root cause using install log.
You may be able to get closer to isolating the problem if you turn on the Debug policy. Do this by setting HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer's Debug value to (dword) 7 in as described on the Windows Installer team blog. You will then need to use a tool like DebugView to view the extra output that Windows Installer will generate. Note you may have to restart the "msiserver" service for the policy to take effect. Best luck making sense of what it shows; often it's just a lot of SQL query dumps.
You can sometimes grab MSI exceptions from out of the event log, but they won't always tell you much.
Instead what you can do is turn on logging of the MSI, this can be done either via the registry, or via the command line. To find out about the registry option, visit this MS Support article. To do it from the command line you can use the same switches, but they obviously will only last for that one install. This is a snapshot as gathered from msiexec:
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
To take advantage of these options, use msiexec directly:
msiexec.exe [path to your msi] /l [your options]