call to undefined function ejabberd_logger:info_msg - mysql

I was trying to log chat messages to mysql in Ejabberd 14.07 using mod_log_chat_mysql5 in Ubuntu.
Ejabberd is already configured in such a way to store basic details in Mysql. That feature is working and I am able to see newly registered users, offline messages etc in Mysql DB.
When mod_log_chat_mysql5 is enabled, Ejabberd is starting but following error message is logged and chat tables are not populated. Please help ....
[error] <0.433.0> CRASH REPORT Process <0.433.0> with 0 neighbours
exited with reason: call to undefined function
ejabberd_logger:info_msg(mod_log_chat_mysql5, 62, "Starting ~p",
[mod_log_chat_mysql5]) in gen_server:init_it/6 line 328

The error message says that you call ejabberd_logger:info_msg/4 which is not defined.
Have a look to your versions, it seem that in the past the include file ejabberd.hrl defined the macro:
-define(INFO_MSG(Format, Args),
ejabberd_logger:info_msg(?MODULE,?LINE,Format, Args)).
it is no more the case in 14.07. The macro is now defined in logger.hrl and is expanded to
lager:info(Format, Args))
or
p1_logger:info_msg(?MODULE, ?LINE, Format, Args))
depending on the flag LAGER

Related

com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED exception

I am getting the following error stack trace, when I am trying to connect an SMB share that I connect using the library most of the time, so yes the code mostly works but sometimes not. I could not try anything yet because I do not have any idea about what can be wrong, the share config, the network or the code, no idea.
com.hierynomus.mssmb2.SMBApiException: STATUS_NETWORK_NAME_DELETED (0xc00000c9): Authentication failed for 'your-user' using com.hierynomus.smbj.auth.NtlmAuthenticator#565d98da
com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:182)
Here is my SmbConfig and I am using the 0.9.1 of smbj.
SmbConfig config = SmbConfig.builder()
.withMultiProtocolNegotiate(true)
.withSigningRequired(true)
.withDfsEnabled(true)
.build();
Here https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/6ab6ca20-b404-41fd-b91a-2ed39e3762ea it gives more information about 0xC00000C9 - STATUS_NETWORK_NAME_DELETED exception and says
The network name specified by the client has been deleted on the
server. This error is returned if the client specifies an incorrect
TID or the share on the server represented by the TID was deleted.
Should I think something happened to the share on the windows server during the execution of the code?

ssis send mail task: Error: An error occurred with the following error message: "The operation has timed out."

SSIS package in question runs a series of stored procedures and fills 13 different excel files with results and sends those excel files to 13 different users in attachments. Package run stops with the message in the title of this question, sometime right in the middle of sending or for example today, on the 4th user. The files get created because I can see them in their directories so only the send mail task is failing. When I go back to visual studio and execute each send task manually, send task works fine even though sometime it still gives me the error yet, still sends the right file to the right person but not thru SSIS package run in SQL server... I tried to delay SMTP processes thinking that might be in the way (to 660000 miliseconds) but did not help. Has this happened to anybody?.. Thanks for all your answers in advance.
Here is the full message for a task that sent the e-mail with attachment regardless the error when task was manually executed...
[Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task for Inventory Reports 038 failed
Finished, 12:03:03 PM, Elapsed time: 00:00:00.655
I think I figured it out why this was happening. In case somebody / anybody is interested, here is what I think has happened.
I was trying to expand the timeout period thru a script task, playing with Threading.Thread.Sleep value but I neglected to do the same in my SMTP connection properties. When I changed the timeout value in properties for SMTP connection, error messages stopped coming :)
I wish I could post a picture to show you where exactly that property is located but my reputation failed me!.. :( (less than 10 points yet)
I am in the process of completing all of my changes then I will post again with final result hoping that will resolve all of my problems.
Thanks to all who showed interest.

Generate Windows Phone 8 Crash Dumps

Does anyone know of a way that I can configure a Windows Phone 8 to generate Crash Dumps for applications that are being developed?
I know that we can get access to dumps that are sent to the MS app store, but I need a dump of an application that is still in development.
Thanks
In "App.xaml.cs" class you will find a method called "Application_UnhandledException". This method is launched every time that your app crashes due an unhandled exception. In the event args you will find the error message, stack trace, etc...
Add your logic here to dump the crash (for example, send an email, or store the log in a database, etc...)
BTW, if the exception is recoverable, you can handle the error and don't close the app setting the Handled variable to true:
// Recover from the error
e.Handled = true;

mysql time out with cakephp acl create utility

The app I'm working with is well established and uses a pretty standard CakePHP ACL set up with the usual ACO/ARO tables. I usually use the cakephp console (./cake acl ....) to add acos when I create a new action in a controller, and as recently as last week I was doing this just fine for a new controller I'd created.
This morning however when running the console utility I get a very lengthy delay and eventually get (my company DB URL removed):
./cake acl create aco Statistics data
Warning: mysql_connect(): [2002] Operation timed out (trying to
connect via tcp://[db url]:3306) in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 552
Warning: mysql_connect(): Operation timed out in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 552
Warning: mysql_select_db() expects parameter 2 to be resource, boolean
given in /dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on
line 558
Warning: mysql_get_server_info() expects parameter 1 to be resource,
boolean given in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 566
Warning: mysql_query() expects parameter 2 to be resource, boolean
given in /dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on
line 600 Error: Missing database table 'aros' for model 'Aro'
There is no isse with load time when using the app from the browser, nor with using any of the other DB-intensive actions I created last week. This dev copy of the app does not use Cake's cacheing, so that's not the problem. Really just seems to be choking somewhere specifically in adding the new aco.
I'd think it were an issue with the DB server if not for the fact that it is otherwise responding fine in the app. Any ideas where in Cake's guts this sort of a misstep could occur?
For the one in a million chance that someone is in my position, remember that when working in a large instiution there are these little things called firewalls, and if you're going to run a cake console, you'd better be SSH'd on to the webserver to run your ACO commands or anything involving a connection to your database server, instead of being mapped on to a shared drive as I decided to do this week.

SQL Server Alert using WMI Event ERROR

I want to execute a job when ever a file is dropped into a particular folder.
I found some articles that showed me how I can do it on SQL Server.
I created a alert type: WMI Event Alert
For the name space its the SQL instance which comes automatically as \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
On the Query section - I wrote the below query ,
SELECT *
FROM __InstanceCreationEvent
WITHIN 1
WHERE TargetInstance ISA 'CIM_DataFile'
AND TargetInstance.Name = ‘c:\\TestFolder\’ `
The error message returned is:
Cannot create new alert.
ADDITIONAL INFORMATION:
Create failed for Alert 'AlertTest'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425.0+((KJ_PCU_Main).110406-2044+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Alert&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
SQLServerAgent Error: WMI error: 0x80041058
The #wmi_query could not be executed in the #wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax. (Microsoft SQL Server, Error: 22022)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425&EvtSrc=MSSQLServer&EvtID=22022&LinkId=20476
Please may you advise if my Query is correct and if there is anything else I need to check?
Thanks a lot in advance.
You are using the wrong namespace, the CIM_DataFile WMI class is part of the \root\CIMV2 namespace and not of \root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
In this case, the answer from RRUZ is correct. However there are other possible causes of this error message:
The #wmi_query could not be executed in the #wmi_namespace provided.
One possible reason is the account that runs the Windows service "Windows Management Instrumentation" is disabled as a SQL login. (If you are running SQL 2012+, look for the login 'NT SERVICE\winmgmt').
(Source: Blog by 'rahmanagoro' )
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.
Another possible fix is to restart the "Windows Management Instrumentation" service. No idea what leads to the problem, but restarting the service fixes it. I've seen this twice, both times on Windows Server 2008 R2 Standard Edition x64.
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.