add_rosteritem not working with xml_rpc in ejabberd server - mysql

I have configure ejabberd server 2.1.10 with mysql database integration,mod_admin_extra module and mod_xmlrpc module.
Issues is ejaberd admin commands like add_rosteritem, delete_rosteritem are notworking with xml_rpc.
When we use direct command line like,
*root#ejabberdserver:~# ejabberdctl add_rosteritem admin domain.com karthik domain.com karthik none both*
it will work and store in to database.
but same command does not work with xml_rpc.
xml_rpc does not return any error, it retun {ok,{response,[0]}}
But it does't store database.
Any permission issue?
Any body please help!!!!!

I meet the similar issue recently, and turn out the root cause was there a bug in (svn)ejabberd_module source code, and this was reported in https://github.com/processone/ejabberd-contrib/issues/22 and fixed in ejabberd-contrib,
So I suggest you download the source https://github.com/processone/ejabberd-contrib and rebuild the mod_admin_extra.

Related

SnowSQL connection issue with Snowflake

I have searched this forum for help on my specific issue, but can't find enough documentation to solve the error I am getting. I believe there is a configuration issue between snowsql and my trial snowflake account.
C:\Users\barberc> snowsql -a tyXXXXX.us-east-2 -u XXXXXX#gmail.com
Password:
250001 (n/a): Could not connect to Snowflake backend after 0 attempt(s).Aborting
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
I have also tried appending the ".aws" on it, but that doesn't seem to help.
I am trying to load data from a .csv into a database to work with.
Thank you in advance
enter image description here
You should run this SQL command to get your Snowflake account URL
use role accountadmin;
select system$whitelist();
Look for [{"type":"SNOWFLAKE_DEPLOYMENT","host":"xxxxx.ap-southeast-2.snowflakecomputing.com","port":443},
Extract the hostname before snowflakecomputing.com, that would be the account name to use in snowsql.
In this example, it will be
snowsql -a xxxxx.ap-southeast-2
You may also want to check with curl command, to make sure you can reach the Snowflake account.
curl -vvv https://xxxxx.ap-southeast-2.snowflakecomputing.com/console/login
If you found HTTP 200, that means a connection is established. Otherwise, there could be a proxy/firewall or routing issue.

Invalid value for key 'authentication'

I have a .NET Core 3.0 app where am trying to connect to a Azure SQL database using EF Core and Active directory integrated authentication.
I have verified that I have access to this database from my machine as I can connect to it just fine using SQL server management studio and 'Azure Active Directory-Integrated' authentication.
However, when I try to read data in my app (using EF Core), I always get a System.Argument exception with the following statement:
Invalid value for key 'authentication'
Exception details point to the Db connection string.
So, here is my connection string from my dev appsettings.json file:
"ConnectionStrings": {
"MCDB": "Server=tcp:dev-media-center-sql.database.windows.net,1433;Initial
Catalog=MediaCenter;Persist Security Info=False;User
ID={my User ID};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication=Active Directory Integrated;" },
I have tried hard coding the connection string directly in my code, thinking that there might be a problem with my JSON but I still get the same exception.
Is "Active Directory Integrated" not a valid value for the 'Authentication' keyword? If not, what is it then? I have already tried "ActiveDirectoryIntegrated" (with no spaces) and /"Active Directory Integrated"/ (escaping double quotes) but to no avail.
Thanks
Fike
Here's what did it for me:
If you're using EF Core with package Microsoft.EntityFrameworkCore.SqlServer...
Then be aware:
The Microsoft.Data.SqlClient package ships more frequently than the EF
Core provider. If you would like to take advantage of new features and
bug fixes, you can add a direct package reference to the latest
version of Microsoft.Data.SqlClient.
source: https://learn.microsoft.com/en-us/ef/core/providers/sql-server/?tabs=dotnet-core-cli
That being said ๐Ÿ‘†, the fix was EASY. Just add the package to your project ๐Ÿ‘‡
upgraded to latest version of Microsoft.Data.SqlClient and the issue is resolved.
Hope this will help someone
This is essentially the same problem discussed in relation to a newer .NET Core version, which was answered as currently unsupported in that version, however I have added a comment where I note that it now works - see EF Core 3.1 using Authentication=Active Directory Integrated
If your only option for connecting to the Azure SQL Database is through Active Directory authentication, and your ADO.NET SqlConnection object is having problems trying to recognize the "Active Directory Integrated" value as the Authentication, you can still use the "Active Directory Password" value if you know the credentials of the user you're using to try to connect to the database. The connection string will be something like this:
"Server=tcp:yourservername.database.windows.net,1433;Initial Catalog=yourdatabasename;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Password";"
That worked for me.
You can use "Authentication=Active Directory Managed Identity" and be sure to set the User ID to the Object(principal)ID of the identity.
Example:
Data Source=dev-westeurope-001.database.windows.net;Initial Catalog=dev-westeurope-001;Authentication=Active Directory Managed Identity;User ID=[PrincipalId];TrustServerCertificate=True;

How to connect to local MySQL Server 8.0 with DBIish in Perl6

I'm working on a Perl6 project, but having difficulty connecting to MySQL. Even when using the DBIish (or perl6.org tutorial) example code, the connection fails. Any suggestions or advice is appreciated! User credentials have been confirmed accurate too.
I'm running this on Windows 10 with MySQL Server 8.0 and standard Perl6 with Rakudo Star. I have tried modifying the connection string in numerous ways like :$password :password<> :password() etc. but can't get a connection established. Also should note that I have the ODBC, C, C++, and.Net connectors installed.
#!/usr/bin/perl6
use v6.c;
use lib 'lib';
use DBIish;
use Register::User;
# Windows support
%*ENV<DBIISH_MYSQL_LIB> = "C:/Program Files/MySQL/MySQL Server 8.0/liblibmysql.dll"
if $*DISTRO.is-win;
my $dbh = DBIish.connect('mysql', :host<localhost>, :port(3306), :database<dbNameHere>, :user<usernameHere>, :password<pwdIsHere>) or die "couldn't connect to database";
my $sth = $dbh.prepare(q:to/STATEMENT/);
SELECT *
FROM users
STATEMENT
$sth.execute();
my #rows = $sth.allrows();
for #rows { .print }
say #rows.elems;
$sth.finish;
$dbh.dispose;
This should be connecting to the DB. Then the app runs a query, followed by printing out each resulting row. What actually happens is the application hits the 'die' message every time.
This is more of a work around, but being unable to use use a DB is crippling. So even when trying to use the NativeLibs I couldn't get a connection via DBIish. Instead I have opted to using DB::MySQL which is proving to be quite helpful. With a few lines of code this module has your DB needs covered:
use DB::MySQL;
my $mysql = DB::MySQL.new(:database<databaseName>, :user<userName>, :password<passwordHere>);
my #users = $mysql.query('select * from users').arrays;
for #users { say "user #$_[0]: $_[1] $_[2]"; }
#Results would be:
#user #1: FirstName LastName
#user #2: FirstName LastName
#etc...
This will print out a line for each user formatted as shown above. It's not as familiar as DBIish, but this module gets the job done as needed. There's plenty more you can do with it to, so I highly recommend reading the docs.
According to this github DBIish issue 127
The environmental variable DBIISH_MYSQL_LIB was removed. I don't know if anyone brought it back.
However if you add the library's path, and the file is named mysql.dll, it will work. Not a good result for the scientific method.
So more testing is needed - and perhaps
C:\Program Files\MySQL\MySQL Server 8.0\lib>mklink mysql.dll .\libmysql.dll
Oviously you can create your own lib directory and add that to your path and then add this symlink to that directory.
Hope this helps. I've spent hours..
EDIT: Still spending time - accounting later.
Something very transitory is going on. I reset the machine (perhaps always do this from now on), and still got the missing mysql.dll errors. Tried going into the MySQL lib directory to execute raku from there.. worked. changed directories.. didn't work.
Launched administrator cmd - from home directory, tried the raku command. Worked. Ok - not good, but perhaps consistent. Launched non admin cmd, tried it from the MySQL lib directory, worked. And just for giggles, tried it outside of that directory.. worked.
Now I can't get it not to work. Will explore NativeLibs::Searcher as Valle Lukas suggested!
Maybe the example in the dbiish repository is not valid anymore.
The DBIISH_MYSQL_LIB Env seems to be replaced by NativeLibs::Searcher with commit 9bc4191
Looking at NativeLibs::Searcher may help to find the root cause of the problem.

Application Verifier 6.2 (x64) AVRF: failed to create verifier log file status C0000022

My Windows Store app keeps getting rejected from certification testing and I managed to reproduce a consequent crash when running appverif's LuaPriv-check. I get this output though:
AVRF: failed to create verifier log file \??\C:\Users\xx\AppVerifierLogs\yy.exe.0.dat (status C0000022)
Process Monitor tells me yy.exe got ACCESS DENIED on a CreateFile operation in this folder. I have set full access to all users (the user reported in the log was the same as the owner of the folder). I am running Visual Studio and Application Verifier as Administrator, but this does not seem to apply. What is the correct way of giving user xx full access to this folder on win8? I have attempted to use different log folders for appverify but with no success. Anyone else able to use this tool with Store-apps?
This post describes similar issues. Attempting to run AppVerif โ€“sppath C:\MyLogsLocation as in the suggested workaround gives AVRF: Error: Incorrect image name: <
So does running appverif -enable handles locks -for myapp.exe -sppath c:\MyLogsLocation
It might be a bug in app verifier.
Have a look at these links:
http://social.technet.microsoft.com/Forums/en-US/5ed560c0-76af-401d-8150-8cd1e69d0b8a/why-app-verifier-can-not-create-log-file?forum=windowssdk
http://blogs.msdn.com/b/dougste/archive/2010/01/11/generating-application-verifier-logs-for-web-applications.aspx
0xc000022 is STATUS_ACCESS_DENIED. The process doesn't actually have write permissions, even if it looks like it should. This MSDN blog explains there is a bug in App Verifier so even if you specify -sppath the value won't be honoured unless you first delete the %WINDIR%\system32\config\AppVerifierLogs\ folder.

How to connect CodeStriker to FogBugz

I have just installed the CodeStriker code review tool.
Has anyone attempted connecting it to FogBugz?
In the CodeStriker documentation I saw it works with Scmbug, whichintegrates software configuration management (SCM) with bug-tracking.
Has anyone connected Scmbug to FogBugz?
We haven't heard of anyone doing so at Fog Creek. You might also ask at http://fogbugz.stackexchange.com.
Well, I now have a partial answer:
Let FOGBUGZSERVER be the machine where fogbugz is installed. In the codestriker.conf file under /var/www/codestriker/codestriker-x.y.z Redefine the $bugtracker variable as:
$bugtracker = 'http://FOGBUGZSERVER/fogbugz/default.asp?';
Rerun install.pl
Restart the apache server.
Now when you insert a case id in the topic information, you will get a link to the proper fogbugz case.