wso2 ​WSO2 Microservices Framework for Java petstore sample cannot run on ubuntu - wso2

I try to follow https://docs.wso2.com/display/MSS100/Running+as+an+MSA+Application to run petstore sample on ubuntu which is hosted on AWS.
I met several issues:
document is incorrect, it requires to download WSO2 Identity Server.
Unpack the .zip file and place the directory in the <MSS_HOME>/samples/petstore/deployment/packs directory. In fact, the
petstore.sh requires DAS 3.0. Just put wso2das-3.0.0.zip into<MSS_HOME>/samples/petstore/deployment/packs. The script will unzip
it.
kubectl. This script is not put into path, and cause it cannot be
executed when script changes to another folder.
cannot create docker, seems Creating Kube-System Namespace, Kube-DNS, Kube-UI
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF

Hope you have done following
export KUBERNETES_MASTER=http://172.17.8.101:8080
Sometimes, if you previously tried out k8s, it will keep previous kubectl configuration under ~/.kube folder. Try removing that folder.
If you have installed some version of kubectl, remove it, otherwise kubectl client and server will not match. run.sh will download compatible kubectl version and install into /usr/local/bin/kubectl

Thanks for pointing out the documentation bug. We will fix it. Also please check out the instruction in https://github.com/wso2/msf4j/tree/v1.0.0/samples/petstore/deployment and ensure that all the prerequisites are met.
The docs are at https://docs.wso2.com/display/MSF4J100/Running+as+an+MSA+Application

Related

Logstash Google Pubsub Input Plugin fails to load file and pull messages

I'm getting this error when trying to run Logstash pipeline with a configuration that is using google_pubsub on a docker container running in my production env:
2021-09-16 19:13:25 FATAL runner:135 - The given configuration is invalid. Reason: Unable to configure plugins: (PluginLoadingError) Couldn't find any input plugin named 'google_pubsub'. Are you sure this is correct? Trying to load the google_pubsub input plugin resulted in this error: Problems loading the requested plugin named google_pubsub of type input. Error: RuntimeError
you might need to reinstall the gem which depends on the missing jar or in case there is Jars.lock then resolve the jars with `lock_jars` command
no such file to load -- com/google/cloud/google-cloud-pubsub/1.37.1/google-cloud-pubsub-1.37.1 (LoadError)
2021-09-16 19:13:25 ERROR Logstash:96 - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
This seems to randomly happen when re-installing the plugin. I thought it's a proxy issue but I have the google domain enabled in the whitelist. Might be the wrong one / missing something. Still, doesn't explain the random failures.
Also, when I run the pipeline in my machine I get GCP events, but when I do it on a VM - no Pubsub messages are being pulled. Could it be a firewall rule blocking them?
The error message suggests there is a problem in loading the ‘google_pubsub’ input plugin. This error generally occurs when the input Pub/Sub plugin is not installed properly. Kindly ensure that you are installing the Logstash Plugin for Pub/Sub correctly.
For example, installing Logstash Plugin for Pub/Sub in a VM :
sudo -u root sudo -u logstash bin/logstash-plugin install logstash-input-google_pubsub
For a detailed demo refer to this community tutorial.

CentOS7 ccollab with perforce CL update issue

I cant get codecollaborator to upload files to for code review. I suspect I am missing some config. I have been scouring perforce and smartbear and stackover flow pages for a couple hours now no luck
CENTOS7
p4 (cant seem to find the version)
Collaborator Enterprise v11.2.11200
My p4 works totally fine have been using for months now to create CLs and submit. But now i need to upload files for code reviews.
command i ran to setup ccollab:
wget https://s3.amazonaws.com/downloads.smartbear/collaborator/11.2.11200/ccollab_client_11_2_11200_unix.sh
chmod +x ccollab_client_11_2_11200_unix.sh
./ccollab_client_11_2_11200_unix.sh
(went through install accepting entering as prompted)
ccollab login https://<codecollaborator_server> <username>
the above logs in fine no errors
ccollab --no-browser --scm perforce --server-proxy-host https://codecollaborator_server --p4user <username> --p4charset utf8 --p4client local_workspace_name --p4 /bin/p4 set
the try to upload a file
ccollab --debug addchangelist new 123456789
and get the following output:
Connecting to server at https://
Connected to Collaborator Enterprise v11.2.11200
Connected as:
Attaching changelists to review
Auto-detecting SCM System for '/my/workspace/path'
Checking client configuration for '/my/workspace/path'.
ERROR: Could not configure SCM system:
SCM system could not be auto-detected, but there was an error: Cannot run program "accurev" (in directory "/my/workspace/path"): error=2, No such file or directory
I tried to find what the "accurev" package is or how to use it but no joy.
Accurev is a different source control system. Sounds like Code Collab doesn't know that it's supposed to be using Perforce?

appcfg.py request_logs certificate verify failed (_ssl.c:661)

We've been using appcfg.py request_logs to download GAE logs, every once in a while it throws the error:
httplib2.SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
But after a few times trying it works out, sometimes also it works after updating gcloud using gcloud components update. We thought it might be some network throttling issue of some kind and didn't give it enough thought. Lately though, we're trying to figure out what is causing this.
The full command we use is:
appcfg.py request_logs -A testapp --version=20180321t073239 --severity=0 all_logs.log --append --no_cookies
It seems the error is related to httplib2 library, but since it is part of the appcfg.py calls we're not sure we should tamper with something within its calls
Versions:
Python 2.7.13
Google Cloud SDK 196.0.0
app-engine-python 1.9.67
This has become more persistent now and I couldn't download logs for a few days now no matter how many times I try.
Looking at the download logs command I tried the same command again but without the --no_cookies flag to see what would happen.
appcfg.py request_logs -A testapp --version=20180321t073239 --severity=0 all_logs.log --append
I got the error:
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'e~testapp').
--- end server output ---
Which lead me to the answer provided here https://stackoverflow.com/a/34694577/1394228 by #ninjahoahong. This worked for me and logs where downloaded from first trial in case someone faces the same issue
There's also this Google Group post which I didn't try but seems like it does the same thing.
Not sure if removing the file ~/.appcfg_oauth2_tokens would have other effects, yet to find out.
Update:
I also found out that my httplib2 located at /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2 was version = "0.7.5", I upgraded it to version = '0.11.3' using target location(directory) upgrade command:
sudo pip2 install --upgrade httplib2 -t /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2/

Installing php5-openssl on Amazon SUSE SE 11 SP3

I have a SUSE ES 11 SP3 Amazon EC2 instance and I need to install the php5-openssl package, but I'm getting in trouble when using "zypper install". I should have upgraded the insance infrastructure update (more details here), but I missed the deadline and I am now with a useless instance, because I can not install anything .
Whenever I use zypper install I got:
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Abort, retry, ignore? [a/r/i/? shows all options] (a): a
Problem retrieving files from 'SLE11-SDK-SP3-Pool'.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Please see the above error message for a hint.
Warning: Disabling repository 'SLE11-SDK-SP3-Pool' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Updates/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
If I try updating the update infrascructure I got:
Adding repository 'tmp_instance_infrastructure_upgrade' [done]
Repository 'tmp_instance_infrastructure_upgrade' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: dir:///usr/share/instance_infrastructure_upgrade/repo
Repository 'tmp_instance_infrastructure_upgrade' priority has been set to 1.
Retrieving repository 'tmp_instance_infrastructure_upgrade' metadata [done]
Building repository 'tmp_instance_infrastructure_upgrade' cache [done]
Specified repositories have been refreshed.
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
...
--> Updating packages failed
I tried to install each php5-openssl dependency, downloading each RPM and installing with rpm -i, but every time I resolve one dependency another appears. I also tried the suse forum (post here) but with no success until now.
So my questions are:
Is there some way to fix zypper repositories manually? Even if only to install the php5-openssl package.
Is there some way to use RPM to manage the dependencies for php5-openssl?
Is there another alternative to install php5-openssl in my suse instance?
in short:
you cannot fix these repositories; since they don't exist anymore (try browsing to http://sa-east-1-ec2-update.susecloud.net/).
rpm cannot look for dependencies because rpm does not use repositories (that's where zypper comes in). You can look for rpms on the internet, and then install the manually using rpm; but rpm won't locate the missing rpms.
Yes; as said in point 2; you can look for the rpms; download them and install them manually; or else you can even look for repositories that contain the rpms you want, and add that repository. However be careful with that; since those repositories probably aren't made for Amazon EC2. If you do this; try to find a repository as close as possible to suse 11 EC2...

WSO2 Identity Server SAML Error encrypting XMLObject at Example Travelocity

When setting in the sample app: Travelocity.properties
#Specify if SAM LAssertion element is encrypted
SAML.EnableAssertionEncryption=true
And also tick the Identity server configuration option:
Enable Assertion Encryption [ticked]
Certificate Alias: wso2carbon
I receive the following error at the server log:
Error at Log: 2015-05-05 15:56:10,282 Error encrypting XMLObject
Without the encryption feature enabled, the SAML authentication flow with the Travelocity sample code starts working.
Hints are welcome how to fix this issue.
Regards,
Claude
It seems like you are working on the installed java runtime for the first time. I am using ubuntu 14. The same problem came to me. For me it worked in the following way.
1. Download the respective files according to your runtime from here.
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
2. Extract the folder you downloaded. There will be two .jar files.
3. For ubuntu you can run echo $JAVA_HOME to find the java home. Copy above jar files into {JAVA_HOME}/jre/lib/security. You may need sudo access depending on you JAVA_HOME location. If so run the following from the location you extracted the zip file.
cp local_policy.jar /{JAVA_HOME}/jre/lib/security
cp US_export_policy.jar /{JAVA_HOME}/jre/lib/security
There should be only one slash (/) at /{JAVA_HOME}.
4. Restart wso2 identity server again and retry the procedure to login to travelocity.com
Hope this will fix your issue.