Problem in configuring the APIM cluster with WSO2 APIM 3.2 - wso2

Description:
I build the APIM from this commit and deploy the product on the VMs.
I configured APIM using Documents 1 and 2
Then start the traffic-manager, key-manager, and publisher without any error.
But when I tried to log in to example.com/publisher, I experienced some errors.
Like below:
logs.txt
After getting these errors, I checked the service providers section and saw that the apim_publisher application was created but OAuth keys didn't exist.
Then I checked the consumer_key and consumer_secret's value on the AM_SYSTEM_APPS table in apim_db database, and both of them was undefined
Steps to reproduce:
Build product-apim from this commit
Move wso2am-3.2.0-SNAPSHOT to 5 VMs.
Run the below command for profile optimization for each node.
sh bin/profileSetup.sh -Dprofile=$PROFILE_NAME
Run components in the following order:
sh wso2am-3.2.0-tm/bin/wso2server.sh -Dprofile=traffic-manager
sh wso2am-3.2.0-km/bin/wso2server.sh -Dprofile=api-key-manager
sh wso2am-3.2.0-pub/bin/wso2server.sh -Dprofile=api-publisher
Open the publisher page
Affected Product Version:
APIM 3.2.0 (MariaDB)
Environment details (with versions):
OS: Ubuntu 18.04
Client: Ubuntu 20.04

Related

Amplify backend pull failed in web host app

We have set the CI/CD pipeline in amplify and since 22nd Dec the backend build is getting failed and throwing the error "Failed to pull the backend" as per the attached screenshot,
Expected behavior: The build should be successfully completed. Here I'm attaching the last successful build screenshot,
I tried to redeploy the last successful build, but that also failed and gave the same error.
version details,
Node.js: 16.18.1
Amplify CLI Version: 10.5.2
OS: Amazon Linux 2
NOTE: The project is working fine locally, and also the amplify pull command runs successfully. In local I'm using windows.
Thank you.

WSO2 APIM 3.0.0 install/config problem with Publisher and Store: "invalid_callback - Registered callback does not match with the provided url"

After installing version 3.0.0 of the WSO2 API Manager I am getting errors trying to access the Publisher and the Store.
This is the error at the Store (https://myhost.my.org:9443/store)
Error 405 - Method Not Allowed
As for the Publisher, the url https://myhost.my.org:9443/publisher redirect to this url...
https://myhost.my.org:9443/authenticationendpoint/oauth2_error.do?oauthErrorCode=invalid_callback&oauthErrorMsg=Registered+callback+does+not+match+with+the+provided+url
...and displays this error message:
invalid_callback - Registered callback does not match with the provided url
Notes:
I can access the admin page just fine (https://myhost.my.org:9443/carbon)
I replaced every occurance of 'localhost' with 'myhost.my.org' in every file in .../wso2/wso2am/3.0.0/repository/conf, including 'carbon.xml'
Logs reveal the following: (.../wso2/wso2am/3.0.0/repository/logs/wso2carbon.log)
WARN {org.wso2.carbon.identity.oauth2.OAuth2Service} Provided Callback URL does not match with the provided one.
Stack:
Ubuntu 18.04
OpenJDK 11.0.4
WSO2 API Manager 3.0
Installation steps followed:
https://apim.docs.wso2.com/en/latest/GettingStarted/quick-start-guide/
Installation commands:
sudo apt install openjdk-11-jre-headless
java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)
sudo wget https://product-dist.wso2.com/downloads/api-manager/3.0.0/downloader/wso2am-linux-installer-x64-3.0.0.deb
sudo apt install ./wso2am-linux-installer-x64-3.0.0.deb
sudo service wso2am-3.0.0 start
The installation notes refer to localhost/127.0.0.1. But I am installing on myhost.my.org.
Files manually modified in .../wso2/wso2am/3.0.0/repository/conf (replaced 'localhost' with 'myhost.my.org' and '127.0.0.1' with 'this.is.my.ip'):
api-manager.xml
broker.xml
carbon.xml
datasources.properties
deployment.toml
event-broker.xml
log4j2.properties
messaging-event-broker.xml
metrics.xml
registry.xml
thrift-authentication.xml
Any ideas? Thanks!
You have to update the callback URL in the Service Provider.
1) Go to /carbon and edit the relevant SP.
2) Edit the OAuth app in it.
You will see the callback URL like this.
regexp=(https://localhost:9443/publisher/services/auth/callback/login|https://localhost:9443/publisher/services/auth/callback/logout)
Update all occurrences of localhost with your hostname.
Save both OAuth app and SP.
About:
his is the error at the Store (https://myhost.my.org:9443/store)
Maybe you can find what you need at https://myhost.my.org:9443/devportal
If you encounter the same error with callback URL on devportal, log into Management Console, under list of Service Providers, edit admin_admin_store instead.

Installing Jenkins on AWS EC2

I am running into an issue with the install wizard with Jenkins when following a Set Up a Jenkins Build Server tutorial from Amazon.
My EC2 instance is a t2.small. It was a t2.micro until I saw this SO post so I switched it to a t2.small. It doesn't appear to be a memory issue. I am getting an error when creating my initial user or trying to Continue as admin.
When inspecting the element, trying to Save and Finish when creating an initial user, POST http://<domain>:8080/setupWizard/createAdminUser errors out with a ERR_CONNECTION_RESET error. (I don't see anything in /var/log/jenkins/jenkins.log about this failure either)
I am running java 1.8 and I've tried with Jenkins 2.71-1.1 and Jenkins 2.61-1.1
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
I grepped the error log and only found one log pertaining to errors (but I'm not sure this is related):
Jul 24, 2017 11:09:50 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
INFO: Failed to instantiate optional component hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl; skipping
I created a CDK to provision a Jenkins service in AWS. have a try
https://github.com/seraphjiang/jenkinscdk
Install the certificates-
sudo apt install ca-certificates
then, Try Updating & Upgrading the packages-
sudo apt upgrade
sudo apt update
Then follow the link to install the Jenkins :)
https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04

Issue with API Manager migration from 1.8.0 to 2.1.0: IS migration client 5.1.0 does nothing

I am doing a migration from APIM 1.8.0 to APIM 2.1.0 and facing an issue with one of migration tools.
Naturally, I am following the steps described in migration guide: https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release
My OS is Windows 7 Enterprise x64, Java - Oracle JDK 7u67, DB - MySQL 5.7, user store - LDAP.
I downloaded WSO2 Identity Server 5.1.0 Migration Client (org.wso2.carbon.is.migrate.client-5.1.0-migration.zip SHA1: ece8ff9a33167751268d205293cc1404fbe4c567) from docs.wso2.com/download/attachments/50518205/org.wso2.carbon.is.migrate.client-5.1.0-migration.zip?version=2&modificationDate=1470811755000&api=v2 as described in guide metioned above (step 7).
Then I unzipped it and put necessary DB scripts into directory APIM_2.1.0_HOME/dbscripts/ (steps 7-a, 7-b) and JAR file into directory APIM_2.1.0_HOME/repository/components/dropins/ (step 7-c).
After that when I try to migrate Identity and User Store DBs (step 9) using IS migration client starting APIM instance with command
wso2server.bat -Dmigrate -DmigrateIdentityDB -Dcomponent=identity
it looks like nothing happens.
I've even configured a logger for this client in APIM_2.1.0_HOME/repository/conf/log4j.properties as
log4j.logger.org.wso2.carbon.is.migration=DEBUG
but only two DEBUG rows appear in logs telling me that migration component activated successfully:
INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} - Successfully deployed Agent Server {org.wso2.carbon.databridge.core.internal.DataBridgeDS}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - Setting RealmService to WSO2 IS Migration component {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - WSO2 IS migration bundle is activated {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} - Configured Registry in 63ms {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService}
Moreover, I looked at the source code of the client at github.com/wso2/product-is/tree/v5.1.0/modules/migration/migration-5.0.0_to_5.1.0/wso2-is-migration-client, especially at class org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent and its method activate(ComponentContext context), which in fact does nothing in contrast to similar class github.com/wso2/product-apim/blob/v2.1.0/modules/distribution/resources/migration/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/internal/APIMMigrationServiceComponent.java from another migration client, also provided in migration guide mentioned above (step 4).
And finally, I noticed that relevant code was removed in one of the commits: "removing the migration from pack and adding script changes" https://github.com/wso2/product-is/pull/362/files#diff-789b1c66c0ca3e073080a2b8e6c27834L49
So, my questions are:
Why were those lines of code removed?
And the main question is how to trigger migration client properly? What did I do wrong?
I would appreciate any kind of help.
It was an issue with the migration document. Documentation is now changed. you will have to do a migration to 2.0.0 from 1.8.0 and then to 2.1.0.
https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release#8910

Wso2 CEP - on docker

Im trying to build a docker image of Wso2 CEP on a linux VM.
I failing in the ./build.sh script and I get the following error meassage
Docker version should be equal to or greater than 1.10.0 to build WSO2 Docker images. Found 17.03.0-ce
How can I solve the docker version issue?
thank you
The docker version validating logic used in scripts are not compatible with latest docker version.
You can comment the following line in common/scripts/docker-build.sh file to skip the validation.
# validateDockerVersion "${docker_version}" "${min_required_docker_version}"