Can't login to Mahara - mahara

I have a problem with one user. This user can't login to Mahara. At every attempt to login he sees this 2 messages (see the image below):
You have exceeded the maximum login attempts. This account has been locked for up to 5 minutes.
You have not provided the correct credentials to log in. Please check your username and password are correct.
In the first message is written to wait 5 minutes, but it doesn't matter how long he waits (1 hr, 1 day ...) he gets always this message. I have also changed the user password... Nothing

Setting up a cron job to trigger Mahara's cron job script solved the problem. Here is a forum thread (with more details) regarding this issue.
UPDATE
This issue is due to the fact that the column logintries from table usr for the corresponding user has reached the maximum allowed value. Thus resetting this column value to 0 will solve the problem. This can be done manually using SQL or by running Mahara's cron (recommended).
SQL solution: UPDATE usr SET logintries=0 (for all users) or UPDATE usr SET logintries=0 WHERE username = 'yourusername' (for a specific user). But this is a short-term solution because you'll have to run it every time you'll encounter this issue.
Cron job solution: for an immediate result one can run Mahara's cron job directly in browser by accessing http://your-mahara-site.org/lib/cron.php. But the execution of mahara's cron should be automated by adding a corresponding record in crontab, see System Administrator's Guide/Cron Job.

Related

Why aren't users being put into this Firebase A/B test?

I'm running an A/B test in Firebase. The client is getting values and responding appropriately. I can see "current users" in the live view:
But even after 48 hours I still see "Running (0 users exposed)" in the headline of the experiment.
How can these be "active experiement users" yet not show up as part of the experiment?
For comparison, here's the staging build of the app, which has assigned users with the same code, just building with a different scheme and hitting a different Firebase app:
We call fetchAndActivate on launch:
FirebaseApp.configure()
RemoteConfig.remoteConfig().fetchAndActivate { _, error in
print(error ?? "Fetched!")
}
For now, it happens (no data in Firebase remote config A/B test experiment) if you have an activation event configured for A/B test experiment.
Check these:
If you have 2 different experiments, both will fail to get results even if you have "activation event" configured only in 1 of them.
Additionally, remote config will not work as well, you'll be able to get only default values.
it takes many hours before you can see any data in your experiment, wait for at least 24 hours. It will show 0 for many hours after the start.
make sure your users have the version of your app with the latest SDK.
Since your experiment is with Remote Config: When activateFetched() is called, all events from that point on will be tagged with the experiment. If you have a goal or activation event that happens before activateFetched(), such as automatic events like first_open, session_start, etc., the experiment setup might be wrong.
Make sure to call fetch() and activateFetched() before the activation event occurs.
The good way to check if your experiment is working now is to set it to a specific version you didn't publish yet and check logs from remote config with the fresh app install(or erase all app data & restart). It should show different variant every time you reinstall the app, since your Firebase Instance ID changes after app reinstall/app data erase.
If you see variants change - then A/B test is running well.

schtask highest privileges without specifying user

I exported one scheduled job I created. And it should be possible to import that task to other computers using cmd/powershell.
Is there a way to tell schtask that it should use current user that is logged on and use the highest privileges to execute this job?
May help:
All computer are in the same local network and sem system group.
Console where schtask import xml is executed already has admin rights.
schtask \create \tn <myService> \xml <my xml path>
If schtask can somehow prompt for which user to use it would be ok. Even if it will ask for a password.
But I don't want to write user password into cmd as argument (i don't see that option safe for my situation)
Perfect would be to just automatically select the current user that is logged on.
Thank you ;)
I specified to run the script as "User" and it works on all computer. If someone can explain what this User means would be nice

Increasing Jenkins logout timer doesn't work

I followed the instructions here to increase the logout timer of our Jenkins server.
If I run the command below in the script console, it displays the output I'd expect.
import org.kohsuke.stapler.Stapler;
Stapler.getCurrentRequest().getSession().getMaxInactiveInterval() / 60
Result: 14400
However, our users are being automatically logged out after about an hour and a half.
This didn't start occurring until we switched to Active Directory for user logins - but none of our other services that use AD have this problem. That's the only recent change I can think of.
As described in the linked thread in another answer, you also need to set sessionEviction nowadays to keep a user logged in:
For example to keep people logged in for 24 hours and 12 hours of
inactivity:
--sessionTimeout=1440 --sessionEviction=43200

How to control max unconfirmed publishes using Spring AMQP

I am testing the how publisher confirm works in Spring-AMQP, trying to find How to control max unconfirmed publishes using Spring AMQP?
Basically i want pause publisher when unconfirmed messages count is greater than some limit.
it seems rabbitTemplate.getUnconfirmed(age) gives list of unconfirmed messages but it removes them from unconfirmed list once method is called.
Yes; we don't currently have an API for that, getUnconfirned(age) is intended to expire pending confirms older than an age.
We should probably add an overloaded method (with no argument) which just gets the unconfirmed correlation data, or a method that just returns the number of such.
Feel free to open an "improvement" JIRA Issue and we should be able to get something in the next release.

How to set up user onboarding emails with cron or delayed jobs?

I am trying to send email reminders to users who have not completed the sign-up process. The sign-up process has three different stages:
1. input for interested users (this will redirect them to a registration section)
2. registration section (this will redirect them to set-up profile)
3. set-up profile
If the user has not continued to the next stage in the process I would like to send an email reminder:
1. after 18 hrs
2. after 1 days
3. after 4 days
I have heard about CRON (whenever gem) and DELAYED JOBS but don't know which one to use. And most important WHY I should choose one over the other?
Please provide an example if possible.
I would write a script with all the logic for timing, what email to send, who to send it to etc.
Then schedule a cronjob every 24 hours to run the script. Don't try to use the cronjobs to do the timing of how many days after to send the message.
Well the reason why you would choose one over the other should be based on what you're trying to do and how you are doing it. As a developer, I would create new branches and experiment with both gems to see which one works better for you and your app.
FYI though. The whenever gem is not supported by Heroku and I believe delayed jobs is. That might be your deciding factor.
I suggest you write a function that checks for unfinished registrations. Then on your server, simple run a cron job every 18 hours, 1 day and 4 days (one line of script).
This cron job with call the controller that triggers the function which send reminder emails.
You could also use sidekiq as a background processor for email sending.

Resources