Creation of azure_native frontdoor fails with "Frontdoor location must be global." - pulumi-azure

migrating my frontdoor from the to the azure-native package I am facing a strange error message that I cannot make sense of:
azure-native:network:FrontDoor (frontDoor):
error: Code="BadRequest" Message="Frontdoor location must be global."
I took almost 1 to 1 the example at https://www.pulumi.com/registry/packages/azure-native/api-docs/network/frontdoor/ I only changed subId and rg
For the record, I am migration to azure-native package because 1) it is advised and 2) I want to add waf policy and I was not able to do with the azure.network package.
Does that ring a bell?

Actually, the location must be set specifically to global. Something like
location: "global",
I did not know of this location and it is not one of the values in the location enumeration.

Related

Google Cloud platform terraform/terragrunt googleapi: Error 409: Requested entity already exist

I am having a strange issue when trying to push code out to our gcp repo. It fails with the following error "googleapi: Error 409: Requested entity already exists, alreadyExists" and it is referring to a project that already exists() This only occurs after i either remove another project that's no longer needed or add .bck to the terragrunt.hcl files. These projects have no dependancies on each other whatsoever.
terraform {
source = "../../../modules//project/"
}
include {
path = find_in_parent_folders("org.hcl")
}
dependency "folder" {
config_path = "../"
# Configure mock outputs for the terraform commands that are returned when there are no
outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["plan", "validate"]
mock_outputs = {
folder_id = "folder-not-created-yet"
}
}
inputs = {
project_name = "<pimsstest-project>"
folder_id = dependency.folder.outputs.folder_created # Test folder id
is_service_project = true
code push will fail with the structure in VS code is like this:
But it succeeds when like this
Some background to add. Pimsstest used to exist in a production folder under org and i moved it to test via vs code with a simple cut and paste and re push of code. I then removed the project from the console as it still existed in production. I cannot work out why the removal of another project will flag up this existing error message on pimsstest. It doesn't make any sense to me.
Across GCP a project ID can exist once only. Upon removal, it might not be instantly available again (it will always have status "scheduled for removal" - and you should receive an email, with the details of the scheduled operation). What the error message actually is trying to tell may be:
Error 409: Requested entity already STILL exist.
In theory (even if it's unlikely, when the name is unique enough), any other customer could snatch the name in the meanwhile - in which case the error message could be literally understood.

wso2am-2.0.1-SNAPSHOT modify subscription tier save error

I run wso2 apim 2.0.1 snapshot on windows, and when i modify subscription tier and save, it report below exception, and although the bill plan changed , but the API still display FREE label.
[2016-08-12 15:30:02,504] ERROR - EventProcessorAdminService Error while deleting the execution plan file
org.wso2.carbon.event.processor.core.exception.ExecutionPlanConfigurationException: Error while deleting the execution plan file
at org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.delete(EventProcessorConfigurationFilesystemInvoker.java:124)
......
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/emman/PROJECT/AA/apimgmt/wso2am-2.0.1-SNAPSHOT/repository/deployment/server/\executionplans
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at org.wso2.carbon.event.processor.core.internal.util.EventProcessorUtil.validateFilePath(EventProcessorUtil.java:387)
at org.wso2.carbon.event.processor.core.internal.util.EventProcessorConfigurationFilesystemInvoker.delete(EventProcessorConfigurationFilesystemInvoker.j
ava:109)
... 65 more
[2016-08-12 15:30:02,539] ERROR - ThrottlePolicyDeploymentManager Error while deploying policy to global policy server.Error while deleting the execution plan file
[2016-08-12 15:30:02,541] INFO - subscription-policy-edit:jag SubscriptionPolicy [policyName=Gold, description=Allows 5000 requests per minute, defaultQuotaPolicy=QuotaPolicy [type=requestCount, limit=RequestCountLimit [requestCount=5000,
toString()=Limit [timeUnit=min, unitTime=1]]]rateLimitCount=-1, tenantId=-1234,ratelimitTimeUnit=NA]
As per your logs, error happens due to invalid file path below.
/D:/emman/PROJECT/AA/apimgmt/wso2am-2.0.1-SNAPSHOT/repository/deployment/server/\executionplans
I had a look at code. It reads the first part of this path from <RepositoryLocation> tag of carbon.xml file. By default, it should look like this.
<RepositoryLocation>${carbon.home}/repository/deployment/server</RepositoryLocation>
Please verify if you have the same in carbon.xml. If you are getting this error with the same config, please change it to the absolute path like below and try again.
D:\emman\PROJECT\AA\apimgmt\wso2am-2.0.1-SNAPSHOT\repository\deployment\server
To make your path more linux-like I used this trick.
Share your carbon home folder. Change carbon.xml setting RepositoryLocation in //machinenaam/share.

Exception using weld CDI with Jetty: Singleton not set for STATIC_INSTANCE

I am trying to configure Jetty with JSF and Weld CDI. After following this manual, I stumble upon the following stacktrace:
Caused by: java.lang.IllegalStateException: Singleton not set for STATIC_INSTANCE => []
at org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider$RegistrySingleton.get(RegistrySingletonProvider.java:28)
at org.jboss.weld.Container.instance(Container.java:55)
at org.jboss.weld.SimpleCDI.<init>(SimpleCDI.java:77)
at org.jboss.weld.environment.WeldProvider$EnvironmentCDI.<init>(WeldProvider.java:45)
at org.jboss.weld.environment.WeldProvider.getCDI(WeldProvider.java:61)
at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
at org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:94)
at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:65)
at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:140)
at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:63)
... 50 more
Does someone see what is going wrong here?
This error appears if you forget the beans.xml file or, as in my case, you have put it in the wrong place. Your beans.xml can have only the root element but must exist.
For a Maven project remember that:
context.xml shoud stay in src/main/webapp/META-INF/
beans.xml should stay in src/main/resources/META-INF/
I had this problem when I moved an application developed using Glassfish (that doesn't need these files) to Tomcat 7.
The problem is that you're using both weld-servlet and weld-servlet-core in your pom. This is causing duplicate class entries as weld-servlet is an aggregate of weld-servlet-core. Removing the weld-servlet-core dependency fixed the singleton not set error.
Now, when I did that, I received errors about JSF but that may be other configuration issues.

Getting error on Content Editor after upgrading to Sitecore 8

I have done an upgrade from Sitecore 7.5 to Sitecore 8, And I am getting an error when trying to Access the Content Editor.
Server Error in '/' Application.
Value cannot be null.
Parameter name: fieldNameTranslator
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: fieldNameTranslator
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin
and location of the exception can be identified using the exception
stack trace below.
[ArgumentNullException: Value cannot be null.
Parameter name: fieldNameTranslator]
Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter >valueFormatter, IFieldQueryTranslatorMap`1 fieldQueryTranslators, >FieldNameTranslator fieldNameTranslator, IExecutionContext[] executionContexts, >IFieldMapReaders fieldMap, Boolean convertQueryDatesToUtc) +310
Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex`1..ctor(SolrSearchContext >context, IExecutionContext[] executionContexts) +192
Sitecore.ContentSearch.SolrProvider.SolrSearchContext.GetQueryable(IExecutionCo>ntext[] executionContexts) +83
Sitecore.ContentTesting.ContentSearch.TestingSearch.GetRunningTests() +637
Sitecore.ContentTesting.Data.SitecoreContentTestStore.GetActiveTests(DataUri >hostItemDataUri, String searchText) +252
Sitecore.ContentTesting.Pipelines.GetContentEditorWarnings.GetContentTestingWar>nings.Process(GetContentEditorWarningsArgs args) +247
(Object , Object[] ) +141
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
Sitecore.Shell.Applications.ContentManager.Editor.GetWarnings(Boolean >hasSections) +271
Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArg>s args, Control parent) +178
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item >item, Item root, Control parent, Boolean showEditor) +231
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item >folder, Item root, Boolean showEditor) +374
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() +411
Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(Even>tArgs e) +212
This is assuming that you already disabled all the Lucene configuration under your App_Config > Include folder and read the Sitecore Search Scaling Guide chapter 3, if not yet, please do so.
Now, the problem relies on your Global.asax, replace the:
Inherits="Sitecore.Web.Application"
To:
Inherits="Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorApplication"
This is assuming again that your dependency injection is the CastleWindsor and all the essential DLLs for CastleWindors were deployed in your web instance (Website > bin folder)
These are:
SolrNet.dll
Microsoft.Practices.ServiceLocation.dll
Castle.Facilities.SolrNetIntegration.dll
Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.dll
Alternatively, there are other four (4) DI framework you can check if CastleWindor is not the dependency injection of your project, and the descriptive details of these DI can be found in the Sitecore Search Scaling Guide.
Once the verification and setup is completed, reload your Sitecore instance and it should load properly. Cheers!
Edited: You may also want to check the SOLR support package DLL version against your current instance version. I experienced the issue several times this week and the root cause always boils down to DLL version discrepancies.
There is something we needed to do with this. Have you changed from Lucene to Solr. It's was in the Solr.config we needed to change some values, although I thought this bug had been fixed. Take a look at
http://blog.horizontalintegration.com/2015/01/21/sitecore-8-solr-configuration-and-setup/
https://born4joy.wordpress.com/2015/09/03/installation-and-configuration-of-solr-for-sitecore-8/

Riak simple SearchMapReduce throws IOException

I am trying to fetch Raik objects using simple filters.
I have enabled search on the bucket before storing objects to it, and I try the following:
MapReduceResult result = riakClient.
mapReduce("serviceProvider", "name:oved1").
addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true).execute();
I get this exception:
com.basho.riak.client.RiakException: java.io.IOException: {"error":"map_reduce_error"}
at com.basho.riak.client.query.MapReduce.execute(MapReduce.java:80)
at com.att.cso.omss.datastore.riak.controllers.RiakBaseController.getAllServiceProvider(RiakBaseController.java:339)
at com.att.cso.omss.datastore.riak.App.serviceProviderTests(App.java:64)
at com.att.cso.omss.datastore.riak.App.main(App.java:38)
Caused by: java.io.IOException: {"error":"map_reduce_error"}
at com.basho.riak.client.raw.http.ConversionUtil.convert(ConversionUtil.java:588)
at com.basho.riak.client.raw.http.HTTPClientAdapter.mapReduce(HTTPClientAdapter.java:386)
at com.basho.riak.client.query.MapReduce.execute(MapReduce.java:78)
... 3 more
any idea what am I missing?
Was able to fix this issue...
apparently you need to do 2 things prior to storing objects that need to be searched in the future:
Enabled search in app.config (/etc/riak):
{riak_search, [{enabled, true}]}
Enable search on the bucket:
Bucket bucket = riakClient.createBucket(bucketName).enableForSearch().execute();
After doing that, this returns values:
MapReduceResult result = riakClient.
mapReduce(bucketName, "name:9").
addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true).
execute();