Getting "Server Error" when click on "New Account" in gerrit - mysql

I am getting server error when i am try to register new user at first time. It works fine if i configure with H2 database.
My gerrit.config file is :
[gerrit]
basePath = git
canonicalWebUrl = http://localhost:8081
[database]
type = mysql
database = reviewdb
hostname = localhost
username = gerrit
[index]
type = LUCENE
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
[sendemail]
smtpServer = localhost
[container]
user = gerrit
javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8081/
[cache]
directory = cache

Related

Config Error : I'm unable to connect my DB using Moodle

Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Below My Config.php
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost = '192.0.0.0';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = 'admindb#123';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 3306,
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);
$CFG->wwwroot = 'http://192.0.0.0/moodle-apexon';
$CFG->dataroot = 'C://xampp//moodledata';
$CFG->admin = 'admin';
Try connecting to the database via the command line. If that doesn't work then check the username, password, dbname etc.
mysql --user=root --password=admindb#123 --host=192.0.0.0 moodle

zulip mailgun: 5.7.0 Mailgun is not loving your login or password

I have tried to set up a Zulip server. For now it works but I can not invite anbybody, actually, the smtp server doesn't work.
I use mailgun, here is its configuration:
then for my Zulip configuration, I set up:
/etc/zulip/setting.py
EMAIL_HOST = 'smtp.mailgun.org' EMAIL_HOST_USER =
'postmaster#www2.vt*****'
MAIL_USERNAME = 'testsmtp#www2.vt******'
MAIL_PASSWORD = 'Az******'
SECURITY_EMAIL_SENDER = 'testsmtp#www2.vt******'
EMAIL_USE_TLS = True EMAIL_PORT = 587
/etc/zulip/zulip-secrets.conf
[secrets]
zulip_org_id = 9724f205-ed93-4********
mail_password = 12******
postgres_password = *******
email_password = cw4DKsfuHnJ********* (password for my account postmaster#www2.vt*****)
Even though, when I try the command: /home/zulip/deployments/current/manage.py send_test_email testsmtpsend#laposte.net I get the error:
File "/usr/lib/python3.5/smtplib.py", line 720, in login
initial_response_ok=initial_response_ok)
File "/usr/lib/python3.5/smtplib.py", line 641, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.0 Mailgun is not loving your login or password')
Someone knows where this error could come from ? It seems my login or password isn't good but I tried every account I had on mailgun, I even tried to create new ones...

Creating a Route53 entry for RDS using Terraform

I am attempting to create a Route53 entry for a MySQL RDS instance but having issues with the :3306 at the end of the RDS endpoint returned from Terraform.
resource "aws_db_instance" "mydb" {
allocated_storage = 10
engine = "mysql"
engine_version = "5.6.17"
instance_class = "db.t2.micro"
name = "mydb"
username = "foo"
password = "bar"
db_subnet_group_name = "my_database_subnet_group"
parameter_group_name = "default.mysql5.6"
}
resource "aws_route53_record" "database" {
zone_id = "${aws_route53_zone.primary.zone_id}"
name = "database.example.com"
type = "CNAME"
ttl = "300"
records = ["${aws_db_instance.default.endpoint}"]
}
Terraform puts a :3306 at the end of the endpoint and that gets entered into the Route53 Value of the CNAME.
When I then try to connect to the CNAME database.example.com with the MySQL client I get:
ERROR 2005 (HY000): Unknown MySQL server host 'database.example.com' (0)
Once I remove the :3306 via the AWS route53 console It seems work just fine.
Question is: How do I strip the :3306 from the Terraform RDS endpoint
As well as an endpoint output, Terraform's aws_db_instance resource also outputs address that provides the FQDN of the instance.
So all you need to do is change your aws_route53_record resource to use address instead:
resource "aws_db_instance" "mydb" {
allocated_storage = 10
engine = "mysql"
engine_version = "5.6.17"
instance_class = "db.t2.micro"
name = "mydb"
username = "foo"
password = "bar"
db_subnet_group_name = "my_database_subnet_group"
parameter_group_name = "default.mysql5.6"
}
resource "aws_route53_record" "database" {
zone_id = "${aws_route53_zone.primary.zone_id}"
name = "database.example.com"
type = "CNAME"
ttl = "300"
records = ["${aws_db_instance.mydb.address}"]
}

Enable logging in Mercurial bugzilla extension scripts

In Mercurial, how I can enable the logging in bugzilla extension scripts? e.g. the "self.ui.note" inside the bugzilla.py.
host = self.ui.config('bugzilla', 'host', 'localhost')
user = self.ui.config('bugzilla', 'user', 'bugs')
passwd = self.ui.config('bugzilla', 'password')
db = self.ui.config('bugzilla', 'db', 'bugs')
timeout = int(self.ui.config('bugzilla', 'timeout', 5))
self.ui.note(_('connecting to %s:%s as %s, password %s\n') %***
(host, db, user, '*' * len(passwd)))
self.conn = bzmysql._MySQLdb.connect(host=host,
user=user, passwd=passwd,
db=db,
connect_timeout=timeout)
self.cursor = self.conn.cursor()
self.longdesc_id = self.get_longdesc_id()
self.user_ids = {}
self.default_notify = "cd %(bzdir)s && ./processmail %(id)s %(user)s"
I'm not sure it will do what you want since I don't have time to look in the source. But you should try one of the following command line parameters :
-v, --verbose
enable additional output
--debug
enable debugging output

Connect to mysql server through ssl in Zend Framework

Single DB connection (resource configuration) from application.ini:
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "mysql1"
resources.db.params.username = "dbuser"
resources.db.params.password = "dbpass"
resources.db.params.dbname = "dbname"
;resources.db.???
Multiple DB connection (resource configuration) from application.ini:
resources.multidb.mysql1.adapter = "pdo_mysql"
resources.multidb.mysql1.host = "mysql1"
resources.multidb.mysql1.username = "dbuser"
resources.multidb.mysql1.password = "dbpass"
resources.multidb.mysql1.dbname = "dbname"
;resources.multidb.mysql1.???
I don't believe connecting to MySQL with SSL is currently supported in Zend. However, Zend Issue Tracker ticket #6140 may be of help to you.