wso2 1.10 store DefaultApplication Missing - mysql

I have installed a standalone instance of wso2 API Manager 1.10.0 with the CARBON-PATCH-4.4.0-0084 installed. I am walking through the PhoneVerification tutorial and have published the API as instructed. I created a new user for the store and am trying to subscribe to the PhoneVerification-2.0.0 API but cannot because there is no DefaultApplication in the Applications dropdown list. It is missing from the list. I tried to add and application and get an error dialog saying Missing Parameters. I am stuck and cannot go any further. One additional piece of information, I am using mysql instead of the h2 default. I followed all the instructions to setup mysql and had no problems. Also I changed the admin password as well.

I have tried API Manager 1.10 with security patch CARBON-PATCH-4.4.0-0084 with no issues. I can create APIs and subscribe using the DefaultApplication. I tried with default database and a new user who is assigned to 'Internal/subscriber' role.
Please check if you have any other changes for Store Web app at 'wso2am-1.10.0/repository/deployment/server/jaggeryapps/store'. You have to replace 'store' and 'publisher' apps as instructed in the Readme of patch.
(iii) Merge and Replace resource/store to /repository/deployment/server/jaggeryapps/store
(iv) Merge and Replace resource/publisher to /repository/deployment/server/jaggeryapps/publisher
To check if the Mysql configuration worked properly, please check if there are any errors in Carbon log, at 'repository/logs/wso2carbon.log' file related to that. And double check if userstore and api-manager database tables are created properly and configured in 'repository/conf/datasources/master-datasources.xml' properly.

Related

How to add a custom log with az cli?

In the docs, it shows how to create a table, but I see no parameter for setting the collection paths for custom logs (ex: /etc/log/nginx/error.log) the way you can in the portal.
az monitor log-analytics workspace table create --name
--resource-group
--workspace-name
[--columns]
[--description]
[--no-wait]
[--plan {Analytics, Basic}]
[--retention-time]
[--total-retention-time]
When I use show on a current table, I also don't see any collection path parameters or links to other objects where that might be stored.
As far as I know and as per this Git Hub document, adding custom logs using Azure CLI is still a feature request.
#LawrenceLLo AFAIK, Azure CLI currently doesn't support the above scenario. If this is something you would like to see supported, kindly share the feedback directly with the feature owner using this link.
Looks like there is already a feature request is in place, I would suggest you to Upvote and make a comment. Engineering will monitor this product feedback actively.
https://feedback.azure.com/d365community/idea/579dea67-2125-ec11-b6e6-000d3a4f09d0

Why does appcmd list fail for åäö in Azure agent job?

We've got an Azure DevOps release pipeline that executes the "Manage IIS Website" task to create or update a site + app pool on a Windows 2016 server, English version.
The names of the app pool and the site contain "ö". This has worked fine before, but after migrating the (virtual) server to a new hosting provider, including conversion from VMware to Hyper-V, it fails.
The problem is that the output of the appcmd list command, that correctly and successfully lists the existing app pool/site, is not correctly interpreted by the agent, so it doesn't "see" that the app pool/site already exists, and tries to add/create it instead of updating the existing one. The subsequent appcmd add command fails because the app pool/site already exists.
I tried renaming the app pool to "o" instead of "ö", and then it works (for the app pool), so it's pretty clear that this is the problem.
From the log at this state (anonymized):
2020-01-14T10:12:37.2971066Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"AppPoolWitho"
2020-01-14T10:12:37.4439073Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"AppPoolWitho" -managedRuntimeVersion:v4.0 -managedPipelineMode:Integrated -processModel.identityType:SpecificUser -processModel.userName:"SERVER\TheUser" -processModel.password:"***"
2020-01-14T10:12:37.5380063Z APPPOOL object "AppPoolWitho" changed
2020-01-14T10:12:37.5493192Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list site /name:"Site Name With ö"
2020-01-14T10:12:37.6520709Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" add site /name:"Site Name With ö" /physicalPath:"D:\MyProj\TheProj\Dev\wwwroot"
2020-01-14T10:12:37.7181428Z ERROR ( message:Failed to add duplicate collection element "Site Name With �". )
2020-01-14T10:12:37.8944458Z ##[error]Process 'appcmd.exe' exited with code '183'.
2020-01-14T10:12:37.9257153Z ##[section]Finishing: Manage IIS Website
What can I do to fix it?
We do want to use the Swedish names as we have before. I do understand that using aao instead of åäö will get me up and running, but that's a workaround and not a fix.
Is there a setting somewhere that I can change in Windows, the Azure agent, the pipeline, for PowerShell...?

New LightSwitch Project

I have started a new Lightswitch project using a SQL database that was created with Lightswitch. When I publish and install the new Desktop project everything goes fine with no errors in publishing, installing or loading the new application. The first and only screen appears. I can click on different records and the data shows up and I can edit the data. However, if I use the list search function all of the fields get Red x'd.
The original application works the way it supposed to work.
I have tried with and without IIS: Published with (local) and (IIS) and get the same results with both methods.
The connecection string options for the new app are not the same as the original in that System Admin and Sytem user connecection strings are not offered so it is difficult to know if I replicating a working setup or not.
In Mananagement Studio I am awash in security, permissions, roles, and login selecitons. It seems clear that this is permission level problem but I have no idea on where to start trouble shooting.
see:
Diagnosing Problems in a Deployed 3-Tier LightSwitch Application
http://blogs.msdn.com/b/lightswitch/archive/2011/09/20/diagnosing-problems-in-a-deployed-lightswitch-application-eric-erhardt.aspx
How many string properties are in the table that you're displaying? Is there a large number of properties that don't need to be included in the search?
This forum post discusses the same issue as you're encountering: Search returns error "Unable to load data" with a Red X
Have you checked your connection string setup? I do have those issues back when I was using SQL Express on development and using SQL Server Enterprise as my target database server.

How to get all configuration settings from Azure Config file?

I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/

Create a Spring Insight template

I am just listing here the basic steps to create a Spring Insight web application using Spring tcServer developer edition. I haven't found much doco regarding this, so it could help some people.
1 - Download Spring Tool Suite here
Download STS
Extract the archive somewhere on your machine, open a terminal and go to ~/tc-server-developer-[VERSION]/
2 - Run the following commands
./tcruntime-instance.sh create -t insight myInstance
This one creates a new tcServer instance based on the template insight. (full list of templates can be found in ~/tc-server-developer-[VERSION]/templates/)
Go to ~/tc-server-developer-[VERSION]/myInstance/bin/ and run the following
./tcruntime-ctl.sh start
This will start your tcServer instance based on the Spring Insight template. Check it is working by pointing your favourite browser to the URL http://localhost:8080/insight. That should display the Spring Insight index page.
Now you just have to drop your web app in the ~/tc-server-developer-[VERSION]/myInstance/webapps/ folder and Bob's your uncle !
Also wanted to mention how to set this up from the IDE without having to do any command line work
Assuming you have a spring mvc project open already in STS. This took a while to find so thank you for posting.
Add a new server from the servers window. Select the VFabric tcServer
Create new instance
When you get to the part where it asks you to select a template pick the insight template.
Add you app to the server you just created
Start the server
You will be prompted if youwant to activate insight, click yes.
Navigate to localhost:8080/insight or whatever port it is running on.
You can find more details here: http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.tc-server.2.6/devedition/install.html&path=2_3_1_0