Service fabric local cluster error - visual-studio-2017

I m getting the following error on my local service fabric cluster node:
Error event: SourceId='System.Hosting', Property='Activation:1.0'.
There was an error during activation.Failed to setup
ApplicationPrincipals. Error:ApplicationPrincipalAbortableError
There is no much logs other than that, I m running VS2017 on Windows 10 with
service fabric tools version:
3.0.480.9494
service fabric runtime version:
6.1.480.9494
I executed the following for service fabric powershell scripts:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
Everything is run as adminstrator.
There is no errors in VS app creation and deployement output on my local cluster...
I couldn't find much help on google..
I d be gratefull for some help.
Regards,
Lokman.

It appears it is often related to privilege issues, or after checking my ApplicationManifest.xml, tried changing the Users section:
<Users>
<User Name="xxxx">
<MemberOf>
<SystemGroup Name="Administrators" />
</MemberOf>
</User>
</Users>
My windows was in french so Administrators was spelled wrongly (Administrateurs in french).

Related

Monitoring Apache2 in Google Cloud with Ops Agent

I have Apache2 installed in one of VMs in Google Cloud Platform. I installed Ops Agent and configured it like below per the docs:
logging:
receivers:
mywebserver:
type: files
include_paths:
- /var/log/apache*/access_log
- /var/log/apache*/error_log
service:
pipelines:
default_pipeline:
receivers:
- mywebserver
But then the Logs in GCP isn't showing the logs of this web-server. I don't see the service mywebserver as filter option in the logs dropdown even for this VM instance.
OS: Ubuntu 18.x LTS
Ops Agent Version : Latest as of today
What am I missing? Your help is much appreciated.
When I tried to debug using the command cat /var/log/google-cloud-ops-agent/subagents/*.log | grep apache it returned nothing. It should show something similar to below:
[ info] [input:tail:tail.0] inotify_fs_add(): inode=268631 watch_fd=1 name=/var/log/apache2/access.log
[input:tail:tail.0] inotify_fs_add(): inode=268633 watch_fd=2 name=/var/log/apache2/error.log
This prompted me to get back to logs and realized that the google docs had a typo and I ended up copy-pasting the lines in good faith. Basically if you note my configuration instead of access.log the line contains access_log.
As trivial as it sounds, this killed a good deal of hours of mine. :Facepalm:
Lesson: Even Google Docs can have errors something as trivial as this that can kill your hours in debugging.

Problems using Halyard to configure GCP as cloud provider in a new Spinnaker installation when my GCP Network is not called 'Default'

I'm using this guidelines:
https://www.spinnaker.io/setup/install/providers/gce/
When I'm running this line:
hal config provider google account add my-gce-account --project $PROJECT --json-path $SERVICE_ACCOUNT_DEST
I get an error:
Problems in default.provider.google: ! ERROR Network default not found via any configured google
When I run the entire process in a project that has a 'default' named network, it works fine.
I was not able to find how I say to Halyard that my network has another name.
Could someone help me?
Thanks
#Thiago you might have to go an edit .hal/config and modify network: default to network: <your-custom-network-name> and followed by hal deploy apply. We ran into same issue, this is a dirty hack that worked for us.
I had a similar problem, for my setup it turned out that bakery was running in the wrong zone, so expanding on the previous response:
$ hal config provider google bakery edit --network <your-custom-network-name>
$ hal config provider google bakery edit --zone <your-zone>
$ sudo hal deploy apply
The full spec for options can be found here:
https://www.spinnaker.io/reference/halyard/commands/#hal-config-provider-google-bakery-edit
Thanks to Sweeti Bharti's response, it led me to that response :)

URL Rewrite 2.0 installation fails on Docker

I'm trying to get URL Rewrite 2.0 installed using this Dockerfile:
FROM microsoft/aspnet:4.6.2
WORKDIR /inetpub/wwwroot
COPY obj/Docker/publish .
ADD https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi /install/rewrite_amd64.msi
RUN net start MSIServer
RUN msiexec.exe /i c:\install\rewrite_amd64.msi /quiet /passive /qn /L*v "C:\package.log"
When I build the container image, I see this error message:
The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
Looking at package.log after running the container, I see this:
SI (c) (30:A4) [08:32:10:438]: Failed to connect to server. Error: 0x80040150
SI (c) (30:A4) [08:32:10:438]: Note: 1: 2774 2: 0x80040150: 2774 2: 0x80040150
Executing net start msiserver on the running container returns a message that the service is already started, and Google says 0x80040150 could be a problem reading the registry.
Is it expected that installing URL Rewrite this way should work, or do I need to elevate permissions somehow?
Update: Running the same msiexec command on the running container successfully installs URL Rewrite.
I finally figured it out thanks to this article. Using PowerShell to run msiexec with the appropriate switches works. Oddly, it threw "Unable to connect to the remote server" when trying to also download the MSI using PowerShell, so I resorted to using ADD.
Here's the relevant portion of my Dockerfile:
WORKDIR /install
ADD https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi rewrite_amd64.msi
RUN Write-Host 'Installing URL Rewrite' ; \
Start-Process msiexec.exe -ArgumentList '/i', 'rewrite_amd64.msi', '/quiet', '/norestart' -NoNewWindow -Wait

Running sqlpackage.exe from AWS CodeDeploy throws an exception

I'm attempting to run sqlpackage.exe from a script executed by AWS CodeDeploy.
The sqlpackage command runs fine from a local CMD prompt when logged in as the administrator but does not run when called as part of the CodeDeploy pipeline.
The following error occurs:
An unexpected failure occurred: DacInstance with the specified instance_id does not exist..
Unhandled Exception: System.Data.SqlClient.SqlException: DacInstance with the specified instance_id does not exist.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
It would appear that a connection cannot be made to the database.
CodeDeploy runs as a windows service running under aLocal System account where as my command prompt where this works runs under the Administrator account. This is the only difference so I think this must be permissions issue.
It would appear that a dacpac needs to be installed by a user with sysadmin privileges. I attempted (as a test) to set the SQL Server user NT AUTHORITY\SYSTEM to have a role of DBCreator.
The deployment then failed with the following error.
The database settings cannot be modified. You must be a SysAdmin to apply these settings.
The database settings cannot be modified. You must be a SysAdmin to apply these settings.
An error occurred while the batch was being executed.
Updating database (Failed)
I am unsure how to proceed however. I'm guessing that making NT AUTHORITY\SYSTEM a SysAdmin is a bad idea!
CodeDeploy Host Agent Service runs as LocalSystem user, which should have NT AUTHORITY\SYSTEM and BUILTIN\Administrators privileges.
This is how the CodeDeploy agent executes your script:
powershell.exe -ExecutionPolicy Bypass -File <absolute_path_to_your_script_here>
You can try putting the executable on the root along with the appspec.yml file if you are putting it in a folder within your deployment package.
That being said, we have seem this issue with the older versions of host agent which should be resolved with the latest version released in March, 2017.

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.