wso2 private paas, about init.sh's launch-params - wso2

We are trying to use wso2 private PaaS. In
one step, we need execute "private-paas-cartridges/common/vm/init-scripts/ec2/centos/init.sh". When it executes:
<${WGET} http://169.254.169.254/latest/user-data -O /tmp/payload/launch-params>
it always returns "404 not found".
The 169.254.169.254 site isn't available sometimes (because we are in china); can we set parameters manually? Some launch-params, for example?

Related

GCP Workflows - Redirect HTTP url

I am calling an external API HTTP url which redirects 2-3 times.
Current pipeline has a Shell script which used curl -L. I am migrating it to GCP Workflows.
I haven't been able to find any param that lets me do the same for
http.get call in GCP Workflows. Is that understanding correct?
Which means I have to put a loop around every API call in Workflows and look for response code. And keep on looping till I get a 2xx or reach max-redirects I am happy with (say 10). Seems odd to me as many APIs may not redirect today but may later, so I need to add this loop logic to any external API I call.
The only workaround (if needed), I can think of is creating a cloud function and use for e.g. the Python requests library with the arg allow_redirects = True

Cloud Run Error 504 (Upstream Request Timeout) after successful deploy

I was following this tutorial from Google to deploy a servise to Cloud Run (https://codelabs.developers.google.com/codelabs/cloud-run-hello-python3#5). In Cloud Shell my project is deployed successfully (screenshot below). However, once I click on the link I get timeout. If I test it locally from Cloud Shell it works fine.
Why could this be happening? Where could I get more data about the issue?
As mentioned in the Documentation :
For Cloud Run services, the request timeout setting specifies the time
within which a response must be returned by services deployed to Cloud
Run. If a response isn't returned within the time specified, the
request ends and error 504 is returned.
The timeout is set by default to 5 minutes and can be extended up to
60 minutes. You can change this setting when you deploy a container
image or by updating the service configuration. In addition to
changing the Cloud Run request timeout, you should also check your
language framework to see whether it has its own request timeout
setting that you must also update.
You can refer to this Public group issue which will be helpful in resolving the current error.
You can increase timeout by clicking EDIT & DEPLOY NEW REVISION and then adjust new Request timeout value

is there any option to give management or service port as system arguement in wso2 other than portOffset?

I wanted to pass the management console port(specified in catalina-server) and service http port(specified in axis2.xml) as system properties (using -DmgmntPort=9292 -DservPort=8282) while starting wso2 server. I tried -DhttpsPort but not working. please help
I don't think there is an option to allow such usage. I looked into startup script and found, that port always by default 9443, but you can configure offset.
It means if u have offset 10 then actual port number will be 9453 = 9443 + 10
example of such command bellow. Lets consider that u distribution located in /var/lib/wso2esb-4.9.0
rename WSO_HOME/repository/conf/carbon.xml to carbon.original.xml
then add to startup script handler for input variale of offset. Lets call it offset
command
sed "s/<Offset>0<\/Offset>/<Offset>$offset<\/Offset>/" /var/lib/wso2esb-4.9.0/repository/conf/carbon.original.xml > /var/lib/wso2esb-4.9.0./repository/conf/carbon.xml
will create new carbon.xml in proper directory and it will be used to configure ports.
Use -DportOffset= [offset value] when you start the server.
Ex:
./wso2server.sh -DportOffset=3

EndpointNotFound: public endpoint for hpext:dns service in RegionOne region not found

I have installed designate client on the same box where designate server is running with OpenStack Juno. After setting environment by issuing . .venv/bin/activate and keystone variables by issuing this command keystonerc_admin.
When I try to run designate --debug server-list command I am getting this error:
EndpointNotFound: public endpoint for hpext:dns service in RegionOne region not found
Please help me out.
I was able to solve this. This was my mistake. I have exported hpext:dns in keystone_admin and .bashrc file.
This value is very much specific if anyone is using hp cloud and they are logging into their geos.
Yes, that value is from before designate was an incubated project, but was running in HP Cloud.
The standard 'dns' service should be used for anyone not using the HP Public Cloud service (it is the default in python-designateclient, so you shouldn't have to do anything)

WSO2 Carbon: get local entry remotely

I have Local Entry on WSO2 ESB 4.6.0.
Is it possible to fetch it remotely?(I mean outside of Synapse; like it is possible to get Resources/Collection from Registry with RemoteRegistry).
P.S. I've tried with LocalEntryAdmin, but it fetches entries from synapseConfiguration.
I'm trying to get registry (to get then local entry) from standalone Java app with WSRegistryServiceClient.
I copied jks and axis2repo but still get:
org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to perform get operation. at org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient.get(WSRegistryServiceClient.java:247)
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
Should I use WSRegistryServiceClient only from Carbon environment?
You should be able to get it from Registry. Using registry API, get the Localregistry and try to read it as a resource;
localRegistry().get("testLocalentry");