I preconfigured a login/pass to my .hgrc data, despite that the mercurial ignores it:
[auth]
becpg.prefix = https://becpg.fr/hg/becpg-community
becpg.username = read-only
becpg.password = read-only
Trying to clone it, I get this:
$ hg clone https://becpg.fr/hg/becpg-community
http authorization required for https://www.becpg.fr/hg/becpg-community
realm: beCPG repositories
user:
Giving him the login and the password manually, it is accepted without any problem.
Stracing the mercurial process, I find that yes, it finds my .hgrc in my home, and reads it in:
15751 open("/home/myusername/.hgrc", O_RDONLY) = 3
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 lseek(3, 0, SEEK_CUR) = 0
15751 lseek(3, 0, SEEK_CUR) = 0
15751 fstat(3, {st_mode=S_IFREG|0600, st_size=112, ...}) = 0
15751 read(3, "[auth]\nbecpg.prefix = https://becpg.fr/hg/becpg-community\nbecpg.username = read-only\nbecpg.password = read-only\n", 4096) = 112
15751 read(3, "", 4096) = 0
15751 close(3) = 0
What could be the reason?
$ hg clone https://becpg.fr/hg/becpg-community
http authorization required for https://www.becpg.fr/hg/becpg-community
You try to clone from becpg.fr, then the authorization asks for www.becpg.fr.
I believe you are being redirected.
Try this:
[auth]
becpg.prefix = www.becpg.fr/hg/becpg-community
becpg.username = read-only
becpg.password = read-only
Related
I have a tortoise repository on my local machine. I would like to send notification mails on push.
On pushing the changes, all that gives is the message "interrupted!". I could not figure out the exact issue. Can someone help to get know more details on the error.
<< Output after push >>
% hg push http://localhost/mercurial/test_mail
pushing to http://localhost/mercurial/test_mail
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 3 changesets with 3 changes to 2 files
[command completed successfully Thu Jan 31 09:07:39 2019]
interrupted!
<<.hg/hgrc>> inside that repository
[extensions]
notify =
[hooks]
changegroup.notify = python:hgext.notify.hook
#commit.notify = python:hgext.notify.hook
[email]
from = Testing Email Notifications <mailid#company.com>
method = smtp
[smtp]
host = localhost
[notify]
sources = serve serve push pull bundle
test =False
template =
details: {baseurl}/{webroot}/rev/{node|short}
branches: {branches}
changeset: {rev}:{node|short}
user: {author}
date: {date|date}
description:
{desc}\n
maxdiff = 1000
[usersubs]
# key is subscriber email, value is comma-separated list of glob patterns
abc#gmail.com = *
[reposubs]
* = mailid#company.com
[web]
baseurl = http://localhost/mercurial/
I'm currently attempting to run a MIPS binary using qemu. My host system in Arch linux. As of right now, I've cd'd into the root directory of the firmware where the binary I'm trying to run exists. I've also copied the qemu-mips binary from my host system into the firmware's root directory.
While in the firmware's root directory I was running this command:
sudo chroot . ./qemu-mips bin/busybox
Yet I'm receiving this error:
chroot: failed to run command ‘./qemu-mips’: No such file or directory
This is strange, considering I just copied the qemu-mips binary to the firmware's root directory where I'm currently sitting. Most of the guides I read describing how to do this say to use qemu-mips-static, however even after installing all available qemu tools, that binary does not exist on my system. Is there something glaring that I'm missing? Thank you.
execve("/usr/sbin/chroot", ["chroot", ".", "./qemu-mips", "bin/busybox"], 0x7fffc0804f98 /* 16 vars */) = 0
brk(NULL) = 0x5653dd4e7000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=124268, ...}) = 0
mmap(NULL, 124268, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f209819a000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\20\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2069912, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2098198000
mmap(NULL, 3897584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2097bdd000
mprotect(0x7f2097d8b000, 2097152, PROT_NONE) = 0
mmap(0x7f2097f8b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ae000) = 0x7f2097f8b000
mmap(0x7f2097f91000, 14576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2097f91000
close(3) = 0
arch_prctl(ARCH_SET_FS, 0x7f2098199500) = 0
mprotect(0x7f2097f8b000, 16384, PROT_READ) = 0
mprotect(0x5653dcd5b000, 4096, PROT_READ) = 0
mprotect(0x7f20981b9000, 4096, PROT_READ) = 0
munmap(0x7f209819a000, 124268) = 0
brk(NULL) = 0x5653dd4e7000
brk(0x5653dd508000) = 0x5653dd508000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1682192, ...}) = 0
mmap(NULL, 1682192, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2097ffd000
close(3) = 0
getcwd("/home/user/firmware/kkeps-root", 4096) = 46
chroot(".") = 0
chdir("/") = 0
execve("./qemu-mips", ["./qemu-mips", "bin/busybox"], 0x7ffec746eba0 /* 16 vars */) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/charset.alias", O_RDONLY|O_NOFOLLOW) = -1 ENOENT (No such file or directory)
write(2, "chroot: ", 8chroot: ) = 8
write(2, "failed to run command \342\200\230./qemu-"..., 39failed to run command ‘./qemu-mips’) = 39
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
close(1) = 0
close(2) = 0
exit_group(127) = ?
+++ exited with 127 +++
So it appears there are a few things that aren't being found, one of them being /etc/ld.so.preload. I'm not 100% sure what to do about this situation. I'm guessing this has to do with the fact that I am not using the static binary.
EDIT: Fixed by installing qemu-user-static from the AUR.
As you've figured out, this is because you weren't using the statically linked binary. It's not actually strictly necessary to use the static QEMU binary inside a chroot, it's just that for the static binary you need only copy that one file into the chroot, whereas if you use the dynamically linked QEMU you also need to copy in the host dynamic linker and all the host libraries that QEMU links against -- and that can run into problems if the host and the guest want to use the same pathname for dynamic libraries.
I am trying to send email through gmail via postfix, but it shows me the following error:
Must issue a STARTTLS command first.
Sep 6 01:11:34 NovusTec postfix/smtp[10889]: 1284460D68: to=<cassa#gmail.co>, relay=smtp.gmail.com[64.233.190.108]:587, delay=2882, delays=2881/0.02/0.83/0.19, dsn=5.7.0, status=bounced (host smtp.gmail.com[64.233.190.108] said: 530 5.7.0 Must issue a STARTTLS command first. k65sm16819558qkf.7 - gsmtp (in reply to MAIL FROM command))
/etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_use_tls=yes
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_tls_CAfile = /etc/ssl/certs
I tried several configurations informed on other sites without success = \
Can anybody help me?
Your problem is your ca certificates. exactly on line smtp_tls_CAfile = /etc/ssl/certs
to confirm that, add the following to main.cf and restart postfix service.
debug_peer_list=smtp.gmail.com
debug_peer_level=3
Now send another email and look at /var/log/mail.log.
You will see this message: cannot load Certificate Authority data: disabling TLS support.
Now change smtp_tls_CAfile = /etc/ssl/certs to smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt. This is for Debian/Ubuntu, you should find the file path for your respective distribution.
Restart postfix service and test send again. You should be up and running.
Remember to remove logging lines after the issue is fixed.
#debug_peer_list=smtp.gmail.com
#debug_peer_level=3
I kept getting that error until I added in main.cf
smtp_tls_security_level=encrypt
not sure what the default is...
Recently upgraded to MySQL 5.7.12 on a Debian (Debian 3.2.78-1 x86_64 GNU/Linux) and have been running into the server hanging after every few hours. This is getting flooded in the syslog and mysql.log:
2016-06-13T18:05:20.261209Z 0 [ERROR] Error in accept: Bad file descriptor
MySQL info:
mysql Ver 14.14 Distrib 5.7.12-5, for debian-linux-gnu (x86_64) using 6.2
Pieces of my.cnf mysqld section that can guide some assistance on tweaking values:
[mysqld]
max_allowed_packet = 64M
thread_stack = 256K
thread_cache_size = 8
max_connections = 150
max_connect_errors = 10000
connect_timeout = 30
wait_timeout = 86400
table_open_cache = 2048
open_files_limit = 65535
query_cache_limit = 4M
query_cache_size = 128M
query_cache_type = 1
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
# * InnoDB
innodb_file_per_table
innodb_buffer_pool_instances=2
innodb_buffer_pool_size=2G
thread_pool_size = 24
We had the same issue on a Ubuntu 16.04 system with mysql 5.7.13 . We increased our max open files parameter in systemd like this:
/etc/systemd/system/mysql.service.d/10-ulimit.conf
[Service]
LimitNOFILE=1000000
So far the issue did not happen again. Maybe mysql needs somehow more file descriptors now.
I found the problem (or possibly one of the problems). Here is an extract from strace on mysqld:
...
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 20
write(2, "2017-01-29T22:22:45.433033Z 0 [N"..., 72) = 72
setsockopt(20, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(20, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
bind(20, {sa_family=AF_INET6, sin6_port=htons(3306), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
listen(20, 70) = 0
fcntl(20, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(20, F_SETFL, O_RDWR|O_NONBLOCK) = 0
...
accept(20, {sa_family=AF_INET6, sin6_port=htons(58332), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 37
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f3ddeac84b0}, {SIG_DFL, [], 0}, 8) = 0
getpeername(37, {sa_family=AF_INET6, sin6_port=htons(58332), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
getsockname(37, {sa_family=AF_INET6, sin6_port=htons(3306), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
open("/etc/hosts.allow", O_RDONLY) = 38
fstat(38, {st_mode=S_IFREG|0644, st_size=589, ...}) = 0
read(38, "# /etc/hosts.allow: list of host"..., 4096) = 589
read(38, "", 4096) = 0
close(38) = 0
open("/etc/hosts.deny", O_RDONLY) = 38
fstat(38, {st_mode=S_IFREG|0644, st_size=704, ...}) = 0
read(38, "# /etc/hosts.deny: list of hosts"..., 4096) = 704
close(38) = 0
socket(PF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 38
connect(38, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
sendto(38, "<36>Jan 29 14:23:08 mysqld[13052"..., 72, MSG_NOSIGNAL, NULL, 0) = 72
shutdown(20, SHUT_RDWR) = 0
close(20) = 0
poll([{fd=20, events=POLLIN}, {fd=22, events=POLLIN}], 2, -1) = 1 ([{fd=20, revents=POLLNVAL}])
accept(-1, 0x7ffe6ebd7160, 0x7ffe6ebd70fc) = -1 EBADF (Bad file descriptor)
write(2, "2017-01-29T22:23:08.109451Z 0 [E"..., 75) = 75
... rinse and repeat *REALLY* fast!
In locking down my system with tcp_wrappers I had inadvertently taken mysqld out of both hosts.allow and hosts.deny. It seems that after checking both hosts.allow and hosts.deny mysqld shuts down and closes the socket as you might expect. However it them immediately starts to poll the (now non-existent) socket for activity.
I just did another test where my tcp_wrappers was correctly configured. When I connect from an authorized host all is fine; however when I connected from a blocked address the same issue occurs. Based on this I recommend using other tools to secure mysqld and making your tcp_wrappers config more open than your firewall. That being said the bug should still be fixed!
This fix has yet to stand the test of time so, as usual, YMMV. Hope it helps anyway
Nick
Researched a bit and found following;
Present in MariaDB also
https://lists.launchpad.net/maria-discuss/msg03060.html
https://mariadb.atlassian.net/browse/MDEV-8995
Percona Server/Percona XtraDB Cluster
https://groups.google.com/forum/#!topic/percona-discussion/Tu0S2OvYqKA
Old bug from 2010/2012
https://bugs.mysql.com/bug.php?id=48929
http://lists.mysql.com/commits/96472
Some interesting information (should never happen)
https://lists.mysql.com/mysql/97275
[I work for Percona]
I have the same issue after upgrading to Percona Cluster 5.7.14-26.17-1.trusty.
The ulimit.conf suggestion doesn't help, and I've made sure that there are sufficient file handles, so far as I can tell, by editing /etc/security/limits.conf and /etc/sysctl.conf.
I can reproduce this easily by telnetting to post 3306 and then disconnecting; the server then goes into a spin logging this error.
A horrible workaround for this, which looks promising in my environment, is to avoid using TCP connections on port 3306, and use unix sockets instead.
You can proxy from port 3306 to the socket by changing the port number in /etc/mysql/my.cnf and then using socat
nohup socat TCP4-LISTEN:3306,fork UNIX-CONNECT:/var/run/mysqld/mysqld.sock&
If I then telnet in on port 3306 and disconnect, I can't provoke the problem. I intend to report back on how well this stands up over time.
FWIW, the code looks as though it expects this to happen sometimes:
for (uint retry= 0; retry < MAX_ACCEPT_RETRY; retry++)
{
socket_len_t length= sizeof(struct sockaddr_storage);
connect_sock= mysql_socket_accept(key_socket_client_connection, listen_sock,
(struct sockaddr *)(&cAddr), &length);
if (mysql_socket_getfd(connect_sock) != INVALID_SOCKET ||
(socket_errno != SOCKET_EINTR && socket_errno != SOCKET_EAGAIN))
break;
}
if (mysql_socket_getfd(connect_sock) == INVALID_SOCKET)
{
/*
accept(2) failed on the listening port, after many retries.
There is not much details to report about the client,
increment the server global status variable.
*/
connection_errors_accept++;
if ((m_error_count++ & 255) == 0) // This can happen often
sql_print_error("Error in accept: %s", strerror(errno));
if (socket_errno == SOCKET_ENFILE || socket_errno == SOCKET_EMFILE)
sleep(1); // Give other threads some time
return NULL;
}
I came here with the same error and none of the solutions worked BUT after some research on our end we found that it was apparmor that was denying our logging directory causing the bad file descriptors error message.
I've followed this tutorial to setup a local mail server for my domain name.
Although, when finished and I try logging in, SquirrelMail gives me the error:
ERROR: Connection dropped by IMAP server.
My mail.log says the following(where webmaster#example.com is my username):
Nov 10 23:45:58 example imapd: chdir example.com/webmaster/: No such file or directory
Nov 10 23:45:58 example imapd: webmaster#example.com: No such file or directory
Here is my main.cf file:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = example.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = no
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
I'm on Ubuntu 12.04 latest.
Any help would be appreciated.
I was experiencing the same problem, what is happening is your test email is getting circled in a loop of Antivirus and spamblockers none of which are working so it wont release it to create the folder you need.
in console you need to update your virus definitions for clamav -
Freshclam will retrieve virus definitions then you need to restart your virus protection
execute the following commands, then resend your test email and you should be able to load your email on squirrelmail.
/etc/init.d/clamav-freshclam restart
/etc/init.d/clamav-daemon start
/etc/init.d/amavis restart
in case you don't remember; to do the test email type mailx leave cc blank push enter type a subject push enter type a body push enter and ctrl D.
if these steps dont work you may have a problem somewhere else open your mail.log file
cd var/log
nano mail.log
then scroll to the bottom