I can not insert a row into the table using syslog-ng - database

destination d_pgsql {
sql(type(pgsql)
host("ip.of.you.host") username("logwriter")
password(“logwriterpassword") port("5432")
database("syslog")
table("logs_${HOST}_${R_YEAR}${R_MONTH}${R_DAY}")
columns("datetime varchar(16)", "host varchar(32)", "program varchar(20)", "pid
varchar(10)", "message varchar(800)")
values("$R_DATE", "$HOST", "$PROGRAM", "$PID", "$MSG")
indexes("datetime", "host", "program", "pid", "message"));
};
log { source(src); destination(d_pgsql); };
When try to restart, syslog-ng gets the error:
[2018-11-14T15:38:57.863699] Unable to initialize database access (DBI); rc='-1', error='No such file or directory (2)'
[2018-11-14T15:38:57.863877] Error initializing message pipeline; plugin_name='sql', location='/usr/local/etc/syslog-ng.conf:49:5'
/usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng
I have already read other posts on the internet, everyone suggested checking if libdb is installed. I have it. So what could it be? I do not have an idea anymore. I am using FreeBSD.

Related

Creating an account fails with "Failed to get account from validator, error: Waypoint value mismatch"

the use case
I am following the tutorial to create my first transaction: https://developers.diem.com/docs/tutorials/my-first-transaction
I run Ubuntu 20.04
I executed those commands successfully:
git clone https://github.com/diem/diem.git && cd diem
git checkout testnet
./scripts/dev_setup.sh
The error:
I created a first account with this command
libra% account create
The creation of the command triggered this error:
>> Creating/retrieving next local account from wallet
2020-12-18T21:02:29.644049Z [main] ERROR testsuite/cli/src/client_proxy.rs:1320
Failed to get account from validator, error: Waypoint value mismatch:
waypoint value = 3139c30efe6dbde4228efb9df32c137dc3a2490b97ab6a086897be1d0cb336f0
, given value = 8ce65af8ca7ad5c9da796fbfccdc1bd53f5cdf58616322d5d574c7ca93ddd583
Created/retrieved local account #0 address bda28b9df5b779a854f6f0a035d10484
How can I know where does the waypoint 8ce65a comes from? I have found where the 3139c3 waypoint came from: https://testnet.libra.org/waypoint.txt
I see the final message stating that the account was created though. Is it a safe assumption?
The waypoints are generated on Diem at regular intervals, say epoch boundaries.
Initially the account might not appear on the ledger as it is not synced. The account would appear after the sync has happened, it is safe

Error in createIndexes: Failed to send "createIndexes" command with database "mydb": Failed to read 4 bytes: socket error or timeout

I have been recently migrating python code to C using libmongoc-1.0 1.15. I am having troubles creating indexes. I am following the example here. I think it has something to do with me using MongoDB 4.2 since it changed all indexes to be background by default, but I thought version 1.15.3 of libmongoc does support everything new in 4.2.
{ "createIndexes" : "mycol", "indexes" : [ { "key" : { "x" : 1, "y" : 1 }, "name" : "x_1_y_1" } ] }
{ }
Error in createIndexes: Failed to send "createIndexes" command with database "mydb": Failed to read 4 bytes: socket error or timeout
Any thoughts?
"failed to send "createIndexes" command with database "testdb" mongodb error"
I was having a similar issue, in our case, one of the replica sets was having the issue after fixing the issue related replica set and restarting the cluster issue solved

MEAN RESTful application error handling server crashes

I've just followed a tutorial for creating a simple RESTful api using the MEAN stack from the heroku webpage. What I did was just cloning the repo that contains the sample code, added my mongodb_uri from mLab and then run the app locally (npm start).
It works perfectly, but when I try to make an invalid entry (not providing name and last name to a contact) the express server crashes and the entry is made on my database (which is inconsistent).
I've opened an issue on the github repo but I got no answers, I think that there must be something wrong with the error handling but I don't know what it might be.
Here it is what I get when the server crashes:
ERROR: Invalid user input
/Users/nanop/Desktop/mean-contactlist/node_modules/mongodb/lib/utils.js:98
process.nextTick(function() { throw err; });
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.header (/Users/nanop/Desktop/mean-contactlist/node_modules/express/lib/response.js:719:10)
at ServerResponse.send (/Users/nanop/Desktop/mean-contactlist/node_modules/express/lib/response.js:164:12)
at ServerResponse.json (/Users/nanop/Desktop/mean-contactlist/node_modules/express/lib/response.js:250:15)
at /Users/nanop/Desktop/mean-contactlist/server.js:72:23
at /Users/nanop/Desktop/mean-contactlist/node_modules/mongodb/lib/collection.js:421:18
at handleCallback (/Users/nanop/Desktop/mean-contactlist/node_modules/mongodb/lib/utils.js:96:12)
at /Users/nanop/Desktop/mean-contactlist/node_modules/mongodb/lib/collection.js:726:5
at /Users/nanop/Desktop/mean-contactlist/node_modules/mongodb-core/lib/connection/pool.js:428:18
at nextTickCallbackWith0Args (node.js:433:9)
And finally this is the handleError method defined which I think it's ok:
function handleError(res, reason, message, code) {
console.log("ERROR: " + reason);
res.status(code || 500).json({"error": message});
}
This is the repo I refer to: https://github.com/chrisckchang/mean-contactlist

ATG catalog export error in startSQLRepository

I want to export the catalog data from atg production. I followed the steps as below.
create FakeXADatasource.properties file in C:\ATG\ATG10.1.1\home\localconfig\atg\dynamo\service\jdbc. (There is mysql user named atguser with password atg123$)
$class=atg.service.jdbc.FakeXADataSource
URL=jdbc:mysql://localhost:3306/prod_lo
user=atguser
password=atg123$
driver=com.mysql.jdbc.Driver
change JTDataSource.properties as below.
$class=atg.service.jdbc.MonitoredDataSource
dataSource=/atg/dynamo/service/jdbc/FakeXADataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
loggingSQLInfo=false
min=10
maxFree=-1
loggingSQLError=false
blocking=true
loggingSQLWarning=false
max=10
loggingSQLDebug=false
then run the "
startSQLRepository.bat -m Store.Storefront -export all
catalogExport.xml -repository /atg/commerce/catalog/ProductCatalog"
command.
but while it processing it gives below error. Anyone know the reason or how to do a complete catalog export? (I have remove the last part of the error log because it exceeds the maximum length of 30000 characters. )
./startSQLRepository -m Store.Storefront -export all catalogExport.xml -repository /atg/commerce/catalog/ProductCatalog
Error:
Error /atg/dynamo/service/jdbc/JTDataSource an exception was
encountered while trying to populate the pool with the starting number
of resources: atg.service.resourcepool.ResourcePoolException:
java.sql.SQLException: Access denied for user 'root'#'localhost'
(using password: NO)
Error /atg/dynamo/service/jdbc/JTDataSource The connection pool failed to initialize propertly, i.e. the starting number of
connections could not be created; check your database accessibility
and JDBC driver configuration
Error /atg/dynamo/service/IdGenerator CONTAINER:atg.service.idgen.IdGeneratorException;
SOURCE:CONTAINER:atg.service.idgen.IdGeneratorException;
SOURCE:java.sql.SQLException:
atg.service.resourcepool.ResourcePoolException: java.sql.SQLException:
Access denied for user 'root'#'localhost' (using password: NO)
Error /atg/dynamo/service/IdGenerator at atg.service.idgen.PersistentIdGenerator.initialize(PersistentIdGenerator.java:389)
Error /atg/dynamo/service/IdGenerator at atg.service.idgen.AbstractSequentialIdGenerator.doStartService(AbstractSequentialIdGenerator.java:643)
try setting max and min poolsizes to 1 and 5
Also make sure your DB is up and running and can be connected to
-DC21
the configuration you are given the startSQLRepository is not taking is at runtime because it is still saying using password no and second error is with you connection pool. my suggestion is for you that try to change only to FakeXADatasource.properties file with username and password. I tried with the same configuration and able to export.

PackageMaker is failing with Invalid Certificate in Mac os X

I have developed one Installer Package using PackageMaker which installs different components in user machine. After signing the package its failing in another user machine with following error in logs. It works wihout any issue with un signed .pkg file
11/4/11 7:24:37 AM installd[718] PackageKit: Install Failed: (null)
Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x1004261f0 "The package “_Installer” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x10043b2e0 "The operation couldn’t be completed. CSSMERR_TP_NOT_TRUSTED") {
NSLocalizedDescription = "The package \U201cInstaller\U201d is untrusted.";
NSURL = "#plugin.pkg -- file://localhost/Users/sandeepakhare/Documents/%20Apps/1025/Installer/Installer.pkg";
NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x10043b2e0 \"The operation couldn\U2019t be completed. CSSMERR_TP_NOT_TRUSTED\"";
I have used Verisigned Certificate to sign the .pkg .. Please advice

Resources