self-contained asp.net core web api is getting:- Failed to initialize CoreCLR, HRESULT: 0x80131500 on Ubuntu 16.10-x64 - ubuntu-16.04

I have a self contained asp.net core website, than I am able to run fine in windows 10, but when publishing for ubuntu.16.10-x64, and running it in ubuntu 16.10 x64 desktop version is getting a:
Failed to initialize CoreCLR, HRESULT: 0x80131500
I have run updates and upgrades of the os:
(sudo apt-get update, sudo apt-get upgrade)
I am executing the starting command as sudo.
The file has run permissions ( -rwxrwx--x )
TargetFramework is netcoreapp1.1.
libicu-dev is already the newest version (55.1-7ubuntu0.2).
How to go about troubleshooting the error?

Update 28/07/17
While it seems there are several related issues which can cause this (most seem to be dependency related), some users have reported that for Ubuntu 16.1 following the instructions on the get started page has resolved the error.
Several other fixes for various other scenarios are suggested on this thread.
In addition, as per https://github.com/dotnet/coreclr/issues/11417 - some instances may be due to an existing bug in the CoreCLR 1.1 - which does not sound likely to be fixed in this version. Migrating to version 2.0 is suggested as a workaround in that case.
Original answer:
To help with diagnosing the issue, you can enable detailed startup errors by specifying detailed error logging with .UseSetting("detailedErrors", "true") and .CaptureStartupErrors(true) as per the following example:
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseSetting("detailedErrors", "true")
.UseIISIntegration()
.UseStartup<Startup>()
.CaptureStartupErrors(true)
.Build();
host.Run();
}

Update 01/24/2018
the issue got resolved after moving to .net core 2.0

Related

Cannot import jdl file using jhipster

I'm new to jhipster. I am on jhipster v7.8.1, i can generate an app using the cli questions but when i try importing a jdl file i got the following error:
**ERROR! Class constructor GAstVisitor cannot be invoked without 'new'
TypeError: Class constructor GAstVisitor cannot be invoked without 'new'
at new DslMethodsCollectorVisitor
This occurs due to a recent bug in the one of JHipster libraries. As a temporary solution you can go to the JHipster installed location and find it's package.json file and override the package causing this error as follows. Then run npm install again.
"overrides":{
"chevrotain#10.1.2": {
"#chevrotain/gast": "10.1.2"
}
}
This will prevent the JHipster using latest package of that.
I experienced the same error and managed to get the JDL file to run by using version 7.8.1
I followed the following steps to get this done;
uninstall the current version of jhipster that is causing issues for
my case this was 7.9.2 . use this command npm uninstall -g
generator-jhipster
Install version 7.8.1 using this command npm
install -g generator-jhipster#7.8.1
Attempt to run your JDL using
this command jhipster jdl jhipster-jdl.jdl
At this stage, your JDL
will be able to run

I get this error running PMD from salesforce CLI, "ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager""

Can anyone help me with this. Im using Mac. I cant find the location of the rulemanager. Please see error below
Lxxxxxxx:pmd-bin-6.34.0 xxxxxx$ sfdx scanner:run pmd --target /usr/src --category rulesets/java/quickstart.xml -f sarif
(node:17810) [editions-autoloader-none-broadened] Error Plugin: sfdx-cli: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
module: #oclif/config#1.17.0
task: runHook init
plugin: sfdx-cli
root: /Users/xxxxxxx/.local/share/sfdx/client/7.100.0-9d243d8
See more details with DEBUG=*
(Use node --trace-warnings ... to show where the warning was created)
ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager"
Kieran, this is an issue that we just discovered. It is related to an incompatibility with the version of Node.js that is bundled with the Salesforce CLI and a library that is used by sfdx-scanner.
A temporary workaround can be found at https://github.com/forcedotcom/sfdx-scanner/issues/412
You will need to use the npm installation instead of the pkg installer since you are interested in the Sarif output. Sarif output was added in version 2.6.0. The issue affects versions 2.6.0-2.8.0 when using the pkg installer on a Mac.
We hope to have a fix rolled out in the next couple of days. I will post here when version 2.9 has been released. Sorry for any inconvenience.
Kieran, this issue has been fixed in version 2.9.1. You can upgrade by executing the following commands in your shell.
sfdx plugins:uninstall #salesforce/sfdx-scanner
sfdx plugins:install #salesforce/sfdx-scanner

Haskell and postgresql - build error "The program pg_config is required but it could not be found."

I am currently learning haskell and just tried using postgresql as a database.
I generated my project with stack (stack new <name> -> stack setup -> stack build)
and then all I changed was adding the dependencies needed to persistent and postgresql to the
package.yaml file (under "dependencies:").
These are:
persistent
persistent-postgresql
persistent-template
This however results in a failing build with the following message:
postgresql-libpq > setup.exe: The program 'pg_config' is required but it could not be found.
postgresql-libpq >
-- While building package postgresql-libpq-0.9.4.2 using:
C:\Users\\AppData\Local\Temp\stack14388\postgresql-libpq-0.9.4.2.stack-work\dist\e626a42b\setup\setup --builddir=.stack-work\dist\e626a42b configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\365a3dde\pkgdb --libdir=C:\sr\snapshots\365a3dde\lib --bindir=C:\sr\snapshots\365a3dde\bin --datadir=C:\sr\snapshots\365a3dde\share --libexecdir=C:\sr\snapshots\365a3dde\libexec --sysconfdir=C:\sr\snapshots\365a3dde\etc --docdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --htmldir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --haddockdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --dependency=Cabal=Cabal-2.4.1.0-5rQrtDcYhR2LOcYye7obEr --dependency=Win32=Win32-2.6.1.0 --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 -f-use-pkg-config --extra-include-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Does anyone know how to resolve this issue and why it even occurs?
Do I have to install postgresql just for being able to run build the project? If so, how would you
do this in production, when the database could basically lie everywhere?
It looks like Haskell is trying to build with the PostgreSQL client shared library libpq.dll and uses pg_config at build time to determine where PostgreSQL is installed and how it was built.
That would mean that you have to install PostgreSQL on the machine where you build Haskell, including the header files, build environment or however it is called by the installer.
For running Haskell you would only need libpq.dll and the dependent shared libraries.
I solved the issue in Ubuntu with the following command:
apt install libpq-dev

Could not run VS Code on CentOS 7 with x2go

I have installed the latest version of VS Code on CentOS 7.
However when I try to run VS Code, it loads for some time trying to open, but then nothing happens, no errors, nothing.
I have tried to installed both trough rpm package and zipped files, but got the same result in both cases.
I'm using x2go to connect to my CentOS 7.
Add the following line to the file /etc/x2go/x2goagent.options:
X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension BIG-REQUESTS"
Then restart the server and try again.
I had the same problem and added the --verbose flag to get more info (see below). Googling for the "gl_surface_glx.cc" error brought me to https://github.com/atom/atom/issues/4360 which contains the above workaround. VS Code now works for me on CentOS7 with X2GO.
Without this workaround the following error is seen (using the --verbose flag):
$ code --user-data-dir=/home/user1646217
--verbose [19526:0719/091952.335817:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[19526:0719/091952.335923:WARNING:audio_manager.cc(278)] Multiple
instances of AudioManager detected
[19549:0719/091952.363736:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or
later is required.
[19549:0719/091952.363836:ERROR:gl_initializer_x11.cc(130)]
GLSurfaceGLX::InitializeOneOff failed.
[19549:0719/091952.366430:ERROR:gpu_child_thread.cc(327)] Exiting GPU
process due to errors during initialization

Running "ngen install EntityFramework.dll" fails with error 0x800706BE and 0x80131F06

As advised by the Entity Framework Team I've tried to create a native image of EntityFramework.dll with this command:
ngen install packages\EntityFramework.6.1.0-beta1\lib\net40\EntityFramework.dll
this results in the error 0x80131F06 (no native image for mscorlib.dll). When I now try to run ngen install mscorlib.dll I get the error 0x800706BE (RPC_S_CALL_FAILED - The remote procedure call failed).
I already used sfc /scannow and it reports no broken files.
Any ideas what is wrong here?
I fixed the issue myself. It is caused by the enabled DeveloperMode which was set by Redgates .NET Reflector VisualStudio Addon. Disabling it with this entry in the machine.config fixed it:
<runtime>
<developmentMode developerInstallation="false"/>
</runtime>
Now I have a native Image for mscorlib and I can ngen EF.