Error when trying to enable DKIM in Virtualmin - dns

I am trying to enable DKIM signing in Virtualmin per these instructions.
When I save the changes, it begins adding DKIM records to the various virtual domains, until it hits a specific domain which has lots of alias domains. It stops with this error:
Failed to save DKIM settings : Missing file to open at
virtual_server::/usr/libexec/webmin/virtual-server/feature-dns.pl line
2782
The applicable code in this .pl file is:
else {
# On local BIND
$file = &get_domain_dns_file($ad);
>> line 2782: &open_tempfile(EMPTY, ">$file", 0, 1);
&close_tempfile(EMPTY);
&create_alias_records($file, $ad,
$ad->{'dns_ip'} || $ad->{'ip'});
$recs = [ get_domain_dns_records($ad) ];
}
Then I tried adding this domain to the box "Never sign domains".
It still hung at the same domain, this time trying to "remove DKIM records".
Virtualmin version 4.04 GPL
Webmin version: 1.660
Linux version: Centos 6.5 64-bit
Running Postfix, Dovecot, Bind, Apache HTTP 2.x etc.
Multiple virtual domains in Virtualmin
Thanks for any help.

Version 4.04 of Virtualmin was released well over a year ago. Upgrade to the latest version, which is 4.15-2. As far as I know DKIM works readily on CentOS 6 with the current version.
You will also need to upgrade Webmin, as that is also many revisions behind the current version.
If you installed Virtualmin using the install.sh script, you should be able to simply perform an apt-get upgrade to get the latest packages from our repositories. If you haven't updated your system in over a year, you surely have numerous and probably quite serious security vulnerabilities (Webmin/Virtualmin even had a few local file access vulnerabilities last year that were fixed around about version 1.720/4.13).
If the problem persists with a current version of Virtualmin, let me know, and I'll help you sort it out.

Related

How to install ERPNext on RHEL 8

I am trying to install ERPNext on RHEL 8. I have no experience with ERPNext installation and RHEL 8 so this is a learning process for me.
Below is where I'm having trouble with the installation. Since this is just for me to learn how to install before I implement it on the production/development server, I decide to use "localhost" as I do not own any domain.
[erp#localhost frappe-bench]$ bench new-site localhost
MySQL root password:
For key character_set_server. Expected value utf8mb4, found value latin1
For key collation_server. Expected value utf8mb4_unicode_ci, found value latin1_swedish_ci
================================================================================
Creation of your site - localhost failed because MariaDB is not properly
configured. If using version 10.2.x or earlier, make sure you use the
the Barracuda storage engine.
Please verify the settings above in MariaDB's my.cnf. Restart MariaDB. And
then run `bench new-site localhost` again.
================================================================================
Database settings do not match expected values; stopping database setup.
The guide that I'm following is here
I am a beginner with server deployment, RHEL and related topics.
####################### -UPDATED- #######################
I managed to complete the installation. All I need to do was adding a few lines to the my.cnf file. Then, everything work just fine!

How to join an BITMAIN Antminer to a Microsoft Windows Server 2008 Active Directory

Let's start with "WHY?":#nerdsLoveToStartWithWhy
I'm developing a customized software to manage a crypto-mining farm where we need to communicate with miners (BITMAIN Antminer) by their hostname instead of IP (just for ease of use).
I know! But I don't want to scan IP ranges, then either SSH to them or use API to pull out the information such as the hostname
My Solution:(please share if you have a better solution)
I've configured a Microsoft Windows Server 2008 Active Directory & DNS with a domain name as ts.facility.com and I'm trying to join my Antminers to this domain.
Scenario:
The SRV1 is my AC DC and visible to the miners. The miner with a hostname as antMinerThree which is running a linux Angstrom V2013.12 are getting reply from the ACDC with its FQDN. the ntpdate package is installed as perquisite:
command: #opkg install ntpdate
Problem:
The problem for now is that when to install required packages:
samba
krb5-config
krb5-user
winbind
libpam-winbind
libnss-winbind
I got the following error: bmminer.list
Failed to open //var/lib/opkg/info/bmminer.list: No such file or directory.
and when I created manually an empty file bmminer.list in the path /var/lib/opkg/info/ I still get this error message, unless it no longer complains about missing bmminer.list:
Question
Does any body know, how to install required packages to joint this miner running Linux Angstrom V2013.12 to a Microsoft Windows Active Directory 2008 in order that I could ping my miners by hostname instead of by their IP addresses?

DNS not resolved after reconfigure dns properly unless restart my script on centos

I have a python script which use rest-api to communicate with my server.
I am using python-requests to handle rest-api.
The script has a loop and try-except for handling errors to keep it running.
On centos, I accidentally mis-configured the dns and started my script.
Here is the error:
HTTPConnectionPool(host='host.com', port=80): Max retries exceeded with url: //rest/url (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known',))
Then I reconfigured the dns properly without restarting the script, but the script still didn't work unless restart it. Same error.
Programs started after dns reconfiguration like ping, web browsers were working fine.
Same problem happens for ping if it is started before dns reconfiguration, but not for firefox.
It seems that firefox took a while to adapt new dns configuration.
On debian, this problem does't exist.
When I reconfigured the dns properly, the script or other programs started to work almost immediately.
Is there anything special with dns on centos?
Can my script adapt new dns configuration without restarting?
==========================
python-requests version I tested:
2.11.1, 2.12.4, 2.13.0 On centos
2.11.1, 2.12.4 on debian
centos version tested:
6.2, 7.3-1611
debian version tested:
debian-sid latest update
python version:
2.7.13rc1 on debian
2.7.5 on centos 7.3-1611
2.6.6 on centos 6.2
problem solved by calling __res_init in glibc.
More details see Python not getting IP if cable connected after script has started and http://bugs.sugarlabs.org/attachment/ticket/1940/network.py.patch

How do I start using Gitlab-CI in Gitlab Omnibus edition?

I have installed Gitlab Omnibus gitlab-7.4.3_omnibus.5.1.0.ci-1.el6.x86_64.rpm on CentOS 6.6. I have a few projects created and working fine but I would like to try using the continuous integration features. I don't know where to start and documentation/tutorials are thin on the ground.
I have found the following files that do not appear in an older Gitlab omnibus install I have:
/usr/bin/gitlab-ci-rake
/usr/bin/gitlab-ci-rails
I presume I need to do something with these? But do I need a configuration file first?
In my projects (Settings > Services > Gitlab CI) I can see there are options for Active, Token and Project Url but I do not know what to put in these fields.
Any help to get me started on CI would be appreciated. Cheers,jonny
We recently installed the omnibus GitLab 7.6.2 release which has GitLab CI 5.3 built in. I had the same question. Here's how we got it working.
We're using a single secured server over https; single ip for both gitlab and gitalb-ci hosts.
We have dns entries for both host names to a single ip. (Done with an alias for the ci server I think). We have two ssl certificates one for each hostname.
We have the following lines at the top of the /etc/gitlab/gitlab.rb script (found by searching the gitlab site for rb file setup details):
external_url 'https://gitlab.example.edu'
nginx['redirect_http_to_https'] = true
ci_external_url 'https://gitlab-ci.example.edu'
ci_nginx['redirect_http_to_https'] = true
For http, leave out the nginx statements.
If gitlab-ci url displays the gitlab site contents then the ci_nginx statement needs to be corrected.

SSL negotiation failed with svn

I am running a server that accepts https requests. I have generated my own certificate. When going to the site in firefox I get the unknown certificate error, but that's fine. This (I think) indicates that port forwarding and such works.
I am trying to use svn with this. When using svn on the server (but using the external ip) it works. Again I get the certificate is unknown, but I don't care.
When using svn on mac OS X I get
SSL negotiation failed: SSL error code -1/1/336032856
I've found several posts on google about this, but they all say it's a bug with openssl version 0.9.8, and that using something higher should fix it.
I am currently using openssl 1.0.0c. I have no idea what's going wrong. I also checked the error log in httpd and nothing comes up.
Any ideas on this would really help.
Thanks
Upgrading from SVN 1.6.15 to 1.6.16 fix this issue for me.
I received the same error message when my Apache configuration was wrong - my ServerName parameter in httpd.conf did not match hostname in the self-signed certificate.
I started getting this error from older subversion clients (Tortoise 1.6.4 i think, and pysvn r1280) when our svn server had its Apache instance upgraded. It went from using OpenSSL 0.9.8n to 1.0.0d.
Tortoise got fixed by upgrading to 1.6.16 (uses OpenSSL 1.0.0d).
Fixing pysvn was a different story. The latest version (r1360) came bac kwith the same error. There didn't seem to be much info around apart from hints that OpenSLL might need upgrading. I tried copying in different versions of OpenSSL (libeay32.dll and ssleay32.dll) and here are the results:
0.9.8j (the existing DLL version, bundled with pysvn r1280) FAIL
0.9.8o (bundled with the latest pysvn, r1360) FAIL
0.9.8r (the latest in the 0.9.8 series) FAIL
1.0.0* (the 1.0 series is not binary compatible with pysvn) FAIL
0.9.8L (nabbed from CollabNet SVN 1.6.9 command line client) SUCCESS!
So whatever they fixed in release L got broken again soon after, or there's something special about CollabNet's OpenSSL binaries.
In my case it started happening after some certificates changes on the server side. I tried deleting the .subversion/ dir, updating openssl, openssh, svn, and nothing...
It got finally fixed when I replaced the url host name with the ip address of that host.
In existing working copies was enough with:
svn switch --relocate http://hostname.com https://ipaddress
Not sure if this is a bug or what, but it seems that the new certificates are not recognized and keeps using the old cached ones for a given host name.
I agree with the earlier answer by Lukas Cenovsky, that setting ServerName in the apache configuration fixes the problem.
In this link http://www.elegosoft.com/files/svn-day-berlin-2011_sperling_subversion-error-messages-demystified.pdf it is said that the error originates from the SSL library.
The full error message(just to enable better google indexing) I receive is:
$ svn ls https://www.OMITTED.dk/svn
svn: E175002: Unable to connect to a repository at URL 'https://www.OMITTED.dk/svn'
svn: E175002: OPTIONS of 'https://www.OMITTED.dk/svn': SSL handshake failed: SSL error code -1/1/336032856 (https://www.OMITTED.dk)
In the file /etc/apache2/sites-available/ssl (debian linux)
I added the ServerName as:
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster#localhost
SSLEngine On
ServerName www.OMITTED.dk
See what happens if you eliminate the SSL problem by adding your generated certificate to your client's trusted certificate store.
One step ahead, my case is a MSWindows Client workstation and a CentOs server with Apache.
Using Tortoise Subversion 1.6.16, I realise that after execute a "svn checkout https://OMITTED.dk/project", I got the same ssl handshake error.
What I did was
update c:\windows\system32\drivers\etc\hosts with "IP_address
OMITTED.dk"
update the entries with the project directory. Edit the
file project/entries and replace the IP_address by OMITTED.dk.
Thus I try the command : svn update path_to_project --non-interactive --trust-server-cert.
Hope will be usefull

Resources