Laravel pusher broadcast does not work when i change APP_URL in the env file - echo

when I use this it works :
APP_URL=http://localhost
but with this it does not :
APP_URL=http://helpme.test

Related

Android 12 bluetooth permissions in ionic sumsung phone

I need assistance with the Bluetooth Serial plugin, when l check for bluetooth.isEnable it returns Ok or is Disabled which is correct. If l try to use any other functions for example List or discover Unpaired l get the error below
ERROR
Need android.permission.BLUETOOTH_SCAN permission for Attribution Source { urid = 10467, package Name = com.stier.com, attributional = null, token = android os BinderProxy#a208f16, next = null }: Starting discovery.
Below is my environment Ionic CLI:6.20.1 Ionic Framework:
#ionic/angular 6.2.2. #angular-devkit/build-angular : 13.0.4.
#angular-devkit/schematics : 13.0.4. #angular/cli : 13.0.4.
#ionic/angular-toolkit:5.0.3.

Setup Apereo Cas Management integrated with CAS server

I want to install Apero Cas Management (verison 6.0) and integrate it with Cas Server (version 6.0).
I have installed following these step:
Step 1: I installed Cas Server
I checked it with REST API. It worked.
My server stays at http://203.162.141.7:8080
And this is configuration of my Cas server. I put this config at /etc/cas/config. Here is my file cas.properties file
cas.server.name=http://203.162.141.7:8080
cas.server.prefix=${cas.server.name}/cas
logging.config: file:/etc/cas/config/log4j2.xml
server.port=8080
server.ssl.enabled=false
cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.json.location=file:/etc/cas/services-repo
cas.authn.oauth.grants.resourceOwner.requireServiceHeader=true
cas.authn.oauth.userProfileViewType=NESTED
cas.authn.policy.requiredHandlerAuthenticationPolicyEnabled=false
cas.authn.attributeRepository.stub.attributes.email=casuser#example.org
#REST API JSON
cas.rest.attributeName=email
cas.rest.attributeValue=.+example.*
Step 2: I installed Cas-management-overlay
I put my cas-management-overlay's config file a /etc/cas/config too. Here is my management.properties file
cas.server.name=http://203.162.141.7:8080
cas.server.prefix=${cas.server.name}/cas
mgmt.serverName=http://203.162.141.7:8088
mgmt.adminRoles[0]=ROLE_ADMIN
mgmt.userPropertiesFile=file:/etc/cas/config/users.json
server.port=8088
server.ssl.enabled=false
logging.config=file:/etc/cas/config/log4j2-management.xml
And my here is users.json file
{
"casuser" : {
"#class" : "org.apereo.cas.mgmt.authz.json.UserAuthorizationDefinition",
"roles" : [ "ROLE_ADMIN" ]
}
}
Then I run ./build.sh, and it shows me that
Finally, I access this link to open cas-management http://203.162.141.7:8088/cas-management, but the it redirects to this url http://203.162.141.7:8080/cas/login?service=http%3A%2F%2F203.162.141.7%3A8088%2Fcas-management%2F and shows this error below
I don't know where I have gone wrong.
I think since you haven't told the management webapp about the location of the service registry, it can't add itself as a registered service.
Manually add a registered service for http://203.162.141.7:8088/cas-management and you should be able to log in to the management app at that point.
Here is my answer for cas-management register file name /etc/cas/services-repo/casManagement-1.json
{
"#class" : "org.apereo.cas.services.RegexRegisteredService",
"serviceId":"^https://domain:8088/cas-management.+",
"name" : "casManagement",
"id" : 1,
"evaluationOrder" : 1,
"allowedAttributes":["cn","mail"]
}

Latency timeout using CosmosDB from Android Xamarin

I am developing an app using Xamarin using Visual Studio for Mac.
I am writing C# to target both iOS and Android.
We are also using CosmosDB on Microsoft Azure.
The problem comes about when trying to get Android to access CosmosDB. Please note that I am using the Mongo API for Cosmos.
The error message I get in Android is as follows:
A timeout occured after 30000ms selecting a server using
CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{
ReadPreference = { Mode : Primary } }, LatencyLimitingServerSelector{
AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster
state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type :
"ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{
ClusterId : 2, EndPoint :
"Unspecified/aspire-cosmosdb.documents.azure.com:10255" }", EndPoint:
"Unspecified/aspire-cosmosdb.documents.azure.com:10255", State:
"Disconnected", Type: "Unknown" }] }.
This is my code:
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using MongoDB.Driver;
string dsn = "mongodb://myusername:mypassword#mycosmosname.documents.azure.com:10255/?ssl=true&replicaSet=globaldb";
string databaseName = "mydatabasename";
Debug.WriteLine("Initializing Cosmos DB!");
MongoClientSettings settings = MongoClientSettings.FromUrl(new MongoUrl(dsn));
settings.SslSettings = new SslSettings() { EnabledSslProtocols = SslProtocols.Tls12 };
var mongoClient = new MongoClient(settings);
var db = mongoClient.GetDatabase(databaseName);
var databases = (await mongoClient.ListDatabasesAsync()).ToList();
foreach (var d in databases)
{
Debug.WriteLine(d.AsBsonDocument);
}
This works 100% fine on xamarin.ios. Connects everytime. The code is pretty much copy and paste from the CosmosDB Quick start on the Azure Portal. I have also taken this code and put it in a C# Console app and it ALSO works. However, same code doesn't work on Android. Why?
I've tried this both on the Android simulator and a real Android device and both times get this 30 second timeout. I've also enabled the Internet permission on Android, but no joy. Please help!
I've referenced the latest packages via Nuget at the time of writing:
MongoDB.Driver -2.4.4
MongoDB.Driver.Core - 2.4.4
MongoDB.Bson - 2.4.4
Note: I have obfuscated the personal details from the dsn but it should show you the rough format of it. The actual dsn is a direct copy and paste of the cosmosdb dsn connection string from the Azure portal.
Okay so after a LOT of headbanging, the solution is fairly simple.
CosmosDB ONLY supports TLS 1.2.
Go into your Droid project settings (Right click on project > Options) and go to Android Build > SSL/TLS Implementation.
Mine was set to 'default'. I guess 'default' at the time of writing does not support TLS 1.2. At least not on Xamarin for the Mac anyway. This is quite a gotcha. Switch it over to Native TLS 1.2+ and magically it just works! Now able to connect to CosmosDB via Android.

Setting Hystrix timeout with environment variable

In order to change Hystrix's default request timeout (1000ms), one must set the following property :
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=2000
What is the corresponding environment variable ?
I would like to "tune" the timeout on my favorite cloud platform without touching the source code first.
I'm pretty sure this one doesn't work : HYSTRIX_COMMAND_DEFAULT_EXECUTION_ISOLATION_THREAD_TIMEOUT_IN_MILLISECONDS=2000
EDIT : Problem was found with Spring Cloud Camden / Spring Boot 1.4.
VM options and environment variables can be referenced from application configuration, which is often a more convenient way to set properties with longer names.
For example, one can define the following reference in application.yml:
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: ${service.timeout}
which will be resolved from the VM option -Dservice.timeout=10000, setting the default Hystrix command timeout to 10 seconds. It is even simpler with environment variables - thanks to relaxed binding, any of these will work (export examples are for Linux):
export service.timeout=10000
export service_timeout=10000
export SERVICE.TIMEOUT=10000
export SERVICE_TIMEOUT=10000
The common approach is to use lowercase.dot.separated for VM arguments and ALL_CAPS_WITH_UNDERSCORES for environment variables.
You could try expression with a default value:
hystrix.command.default.execution.isolation.thread.timeoutIn‌Milliseconds: ${SERVICE_TIMEOUT:2000}
In case you have SERVICE_TIMEOUTsystem variable - it will be used by an application, otherwise, a default value will be picked up.
Found more of a workaround than a solution, using SPRING_APPLICATION_JSON environment variable :
SPRING_APPLICATION_JSON='{ "hystrix" : { "command" : { "default" : { "execution" : { "isolation" : { "thread" : { "timeoutInMilliseconds" : 3000 } } } } } } }'
You can use Spring config yaml file , Please read further on following link
https://github.com/spring-cloud/spring-cloud-netflix/issues/321
VM option -Dhystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=2000 works for me. However it has a side effect, then you can not change the config value in java code since system properties are prioritized.
ConfigurationManager.getConfigInstance().setProperty(
"hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds", 3000);// it doesn't work

Is CMS Replication required for ApplicationPool also?

Is CMS Replication required for ApplicationPool also?
When I run the command Get-CsManagementStoreReplicationStatus I get UpToDate : True for my domain but it comes False for my ApplicationPool.
UpToDate : True
ReplicaFqdn : ****.*****
LastStatusReport : 07-08-2014 11:42:26
LastUpdateCreation : 07-08-2014 11:42:26
ProductVersion : 5.0.8308.0
UpToDate : False
ReplicaFqdn : MyApplicationPool.****.*****
LastStatusReport :
LastUpdateCreation : 08-08-2014 15:16:03
ProductVersion :
UpToDate : False
ReplicaFqdn : ****.*****
LastStatusReport :
LastUpdateCreation : 08-08-2014 15:10:59
Am I on the right track? Have I created my ApplicationPool wrongly?
Yes, UCMA applications running on an app server generally require access to the CMS, so replication should be enabled.
On the app server, you'd need to:
Ensure the "Lync Server Replica Replicator Agent" service is running
Run Enable-CsReplica in the management shell
Run Enable-CsTopoloy
Then run Invoke-CSManagementStoreReplication to force a replication
I've noticed that it often takes a while for the CMS to be replicated to the app server, so you might need to run Get-CsManagementStoreReplicationStatus a few times before you see UpToDate change to True.