I am running TeamCity on a Windows machine that uses Tomcat as a web server and uses Apache Portable Runtime (APR) and OpenSSL for SSL.
I have not managed to upgrade the version of OpenSSL to 1.0.1g, and I think the reason is because the Tomcat native library binary (tcnative-1.dll) (http://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.1.29/binaries/tomcat-native-1.1.29-win32-bin.zip) contains both APR and version 1.0.1e of OpenSSL, and I can't find a new binary with 1.0.1.g.
I've tried to compile the Tomcat native library myself, but I get compilation errors when trying to compile the "libapr" project.
The compilation errors I get are:
Error 4 error LNK2019: unresolved external symbol __InterlockedIncrement referenced in function _apr_atomic_inc32#4 C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\apr_atomic.obj libapr
Error 5 error LNK2019: unresolved external symbol __InterlockedExchangeAdd referenced in function _apr_atomic_add32#8 C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\apr_atomic.obj libapr
Error 6 error LNK2019: unresolved external symbol __InterlockedExchange referenced in function _apr_atomic_set32#8 C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\apr_atomic.obj libapr
Error 7 error LNK2019: unresolved external symbol __InterlockedDecrement referenced in function _apr_atomic_dec32#4 C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\apr_atomic.obj libapr
Error 8 error LNK2019: unresolved external symbol __InterlockedCompareExchange referenced in function _apr_atomic_cas32#12 C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\apr_atomic.obj libapr
Error 9 error LNK1120: 5 unresolved externals C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\apr\Debug\libapr-1.dll 1 1 libapr
I am trying to compile in Visual Studio Ultimate 2013 (perhaps too new a version of Visual Studio?).
How do I fix this problem?
Has anyone successfully built Tomcat native library with OpenSSL 1.0.1.g?
Updates
I've set the "Platform Toolset" to v100 (as advised here https://groups.google.com/forum/#!topic/UniMRCP/Iybpn51UYnI) and the previous compilation errors went away, but now I get new ones:
Error 9 error C1083: Cannot open include file: 'apr.h': No such file or directory C:\Users\heartbleed\tomcat-native-1.1.29-win32-src\jni\native\include\tcn.h 26 1 tcnative
More updates
I did manage to solve the compilation problems and build a tcnative-1.dll with OpenSSL 1.0.1g, and my TeamCity is up and running with the Heartbleed problem fixed! I am busy now. But please ask if you want a detailed description of the procedure.
This is what I did.
I started off with Visual Studio 2013.
Install Visual C++ 2010 Express (http://go.microsoft.com/?linkid=9709949).
Install OpenSSL (http://slproweb.com/products/Win32OpenSSL.html), I chose "Win32 OpenSSL v1.0.1g".
Download Tomcat Native (http://apache.mirrors.spacedump.net//tomcat/tomcat-connectors/native/1.1.29/source/tomcat-native-1.1.29-win32-src.zip)
Extract it somewhere.
Download APR source code (http://apache.mirrors.spacedump.net//apr/apr-1.5.0-win32-src.zip)
Extract it and move it into the directory "tomcat-native-1.1.29-win32-src/jni".
Rename it from "apr-1.5.0" directory to "apr", so that you have a "apr" folder in the "jni" folder.
Open up "tomcat-native-1.1.29-win32-src/jni/native/libtcnative.dsw" in Visual Studio 2013. It will make some conversions.
Change from "Debug" to "Release".
For projects "apr" and "tcnative".
right click on them, go into Properties -> Configuration Properties.
Set "Platform Toolset" to "v100".
Right click "tcnative" click Properties -> Configuration Properties -> C/C++ -> Additional Include Directories -> Edit
Change "./srclib/apr/include" to "../apr/include"
Change "./srclib/apr/include/arch/win32" to "../apr/include/arch/win32"
Add "C:\OpenSSL-Win32\include" (or wherever you installed OpenSSL).
Go to Configuration Properties -> Linker -> Input -> Additional Dependencies -> Edit
Change "libeay32.lib" to "libeay32MT.lib"
Change "ssleay32.lib" to "ssleay32MT.lib"
Go to Configuration Properties -> Linker -> Additional Library Directories -> Edit.
Add "C:\OpenSSL-Win32\lib\VC\static" (or wherever you installed OpenSSL).
Right click tcnative and click on Build.
After the build completes you will find "tcnative-1.dll"
inside "tomcat-native-1.1.29-win32-src\jni\native\LibR"
At present, the tcnative team has finished working on the next version which has the Heartbleed fix in. So one can get this version from Latest tcnative with heartbleed fix.
This version will soon be released officially.
Apache Tomcat 7.0.53 (latest release) is vulnerable to Heartbleed, if you are using Tomcat Native (check if tcnative-1.dll is in bin folder. That's the case if you download the Tomcat Windows binary).
You can find the binaries for Windows (x86 and x64) at http://people.apache.org/~mturk/native/1.1.30/binaries/.
I hope they will release it officially soon at http://tomcat.apache.org/download-native.cgi.
Just download the DLL file, put it into Tomcat/bin folder, restart Tomcat and you're done.
To verify the fix, check file catalina.log:
Apr 11, 2014 8:39:27 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1g 7 Apr 2014)
The Heartbleed fix has been in OpenSSL since OpenSSL 1.0.1f.
For now here's the dll that I built:
https://docs.google.com/file/d/0B4GOp0amHg-0SU5GXzZuM2lJT3c/edit
I believe Tomcat is not vulnerable to Heartbleed out of the box.
Yes, the APR library is linked and SSLEngine is on.
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
But if you look at the server.xml config file of a default Tomcat deployment, its SSL connector uses JSSE, not the APR library.
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the BIO implementation that requires the JSSE
style configuration. When using the APR/native implementation, the
OpenSSL style configuration is required as described in the APR/native
documentation -->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
So it shouldn't be explotable via Heartbleed. Unless you manually changed the SSL connector to use APR, I think it's safe to say, you are not vulnerable.
Related
While installing Visual Studio 2017 I encountered the error while downloading the JDKV2-Component for Xamarin (maybe someone could edit the English error message in?):
Paket "JavaJDKV2,version=1.8.2,chip=x86" konnte von "https://go.microsoft.com/fwlink/?linkid=863182" nicht heruntergeladen werden.
Such-URL
https://aka.ms/VSSetupErrorReports?q=PackageId=JavaJDKV2;PackageAction=DownloadPackage;ReturnCode=0x80072ee2
Details
WebClient-Download fehlgeschlagen: Timeout für Vorgang überschritten
Bits-Download fehlgeschlagen: Fehlerkontext: BG_ERROR_CONTEXT_REMOTE_FILE, Fehlercode: -2145844841
WinInet-Download fehlgeschlagen: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002
Betroffene Workloads
Mobile-Entwicklung mit .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.27128.1)
Mobile-Entwicklung mit C++ (Microsoft.VisualStudio.Workload.NativeMobile,version=15.0.27005.2)
Mobile-Entwicklung mit JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.27019.1)
Betroffene Komponenten
Android SDK-Einrichtung (API-Ebene 23) (globale Installation) (Component.Android.SDK23,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 19 und 21) (Component.Android.SDK19,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 22) (Component.Android.SDK22,version=15.0.27128.1)
Google Android-Emulator (API-Ebene 23) (globale Installation) (Component.Google.Android.Emulator.API23.V2,version=15.0.27128.1)
Java SE Development Kit (8.0.1120.15) (Component.JavaJDK,version=15.0.26403.0)
Same for the x64-version of the JDK.
It turned out that the Oracle-Website needs a License-Accepted-cookie to download the files. While Microsoft seemingly tried to add it to the download routine it doesn't work for me and the installation won't proceed beyond the point where it tries to install the JDK.
So I downloaded the files manually. But where do I have to put them so that the Visual Studio installation knows that it won't need to download them again?
While searching the web for some hours I finally found the solution here:
https://developercommunity.visualstudio.com/content/problem/160625/packageidjavajdkv2packageactiondownloadpackageretu-5.html
Turns out you have to search for the following folder:
C:\ProgramData\Microsoft\VisualStudio\Packages
There you create a subfolder with the package name as written in the error message/error log (in my case "JavaJDKV2,version=1.8.2,chip=x86") and put the manually downloaded .exe file in there.
Restart the VS-installer and start the installation process.
I'm getting the same error message as in this question: Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' Unfortunately, I cannot upgrade to Azure SDK 2.9, as the top answer there suggests.
Specifically, I get this error in a message box whenever I try to package my Azure Cloud Service project:
What's interesting is that I can start the same project in the emulator, which I would assume involves packaging it.
Things I've tried:
Ensuring that I only have version 2.8.2 of the emulator installed (I may have had 2.9 installed initially)
Reinstalling version 2.8.2 of the SDK
Manually copying the Windows Azure Tools from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to the v14.0 equivalent.
Ensuring that C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.8 exists
Reinstalling Visual Studio (so you know I'm desperate!)
And I've no idea what to try next. I can't work out which DLL is supposed to hold the Microsoft.VisualStudio.WindowsAzure.Services assembly, I can't find any references in any config files, and all the Google hits seem to point back to the SO question linked above.
What's going on? And how can I fix it?
In case I'm being an idiot, here's all the Azure-related things I've got installed:
Also (just in case it's relevant) I'm on Windows 7 SP1.
Update 17/01/16
Following some advice from the excellent Rest Azured Slack channel, I've tried using ProcMon and Fusion Log to diagnose this (spoiler: without success)
ProcMon filtered to that assembly returns nothing:
Fusion log (set to log everything) yields lots of entries like this:
* Assembly Binder Log Entry (17/01/2017 # 11:52:02) *
The operation was successful. Bind result: hr = 0x0. The operation
completed successfully.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
executable C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = devenv.exe Calling assembly
: Microsoft.VisualStudio.WindowsAzure, Version=2.9.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
=== WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with
Assembly.Load(). WRN: No matching native image found. LOG: IL assembly
loaded from C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Microsoft.VisualStudio.WindowsAzure.Services.dll.
When I explore the DLL mentioned, I can find Microsoft.Cct.Services.Sqm, but it doesn't contain a type IWatSqlService:
This feels like it's the crux of the issue, but I've no idea what to do next. Presumably I'd need to replace the DLL with a version that does define IWatSqlService, but I'm not sure where I'd get one. Or, for that matter, why it would even be necessary.
Next stop is probably a full wipe of the machine.
I've had the same problem, and solved it by not using the Web Platform Installer.
Download all parts (Microsoft Azure SDK for .NET - 2.8.2) from the Microsoft site: https://www.microsoft.com/en-us/download/details.aspx?id=50041 and follow the instructions how to install them.
For anyone else with this problem. I ended up resolving this by nuking it from orbit. Fresh install of Windows, reinstall VS and the SDK.
Confusingly, you can also see this error when you add a new
<setting name="TODO" />
element to your *.csdef file but either:
forget to add the corresponding <setting name="TODO" value="TODO" /> element to every *.cscfg file, or
accidentally add a duplicate <setting name="TODO" value="TODO" /> element to any of the *.cscfg files.
I'm using Visual Studio 2015. I created a .dll and would like to write a Unit Test. I Created a New Project using the Native Unit Test Project found in the
File | New | Project...
Visual C++ | Test | Native Unit Test Project
All works until I run it. The code requires using the SQLite .dll (sqlite3.dll). When I run the test, I get the error dialogbox:
The program can't start because sqlite3.dll is missing from your computer. Try reinstalling the program to fix this problem.
I have the .dll so I suspect the message saying it is "missing" really means "unable to find".
I've attempted a lot of things to fix this, including editing the following Property Pages values:
Configuration Properties:
Debugging | Environment
VC++ Directories | Executable Directories
These changes to my project make no difference. Does anyone know how to get VS2015 testing to find 3rd party .dlls?
Thx.
Update:
Tried setting Configuration Properties | Debugging | Environment to:
PATH=%PATH%;$(SolutionDir)sqlite;$(LocalDebuggerEnvironment)
Then thought that I might need to reboot the Visual Studio environment for the PATH to be updated. Didn't help. It appears that if I let Visual Studio sit for a while, I get the following message:
An unhandled win32 exception occurred in StandardCollector.Service.exe [6324].
I don't know if the exception is related or not. I'm using VS2015 update #2 if that matters.
Update:
I got a stack dump from the crash...
ntdll.dll!string "Enabling heap debug options\n"() Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!StandardCollectorService::~StandardCollectorService(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached::vector deleting destructor'(unsigned int) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached<class StandardCollectorService>::Release(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached<class ATL::CComClassFactorySingleton<class StandardCollectorService> >::vector deleting destructor'(unsigned int) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached >::Release(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CAtlComModule::Term(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!_guard_dispatch_icall_nop() Unknown
ucrtbase.dll!(void)() Unknown
ucrtbase.dll!__crt_seh_guarded_call::operator(),class &,class >(class &&,class &,class &&) Unknown
ucrtbase.dll!_execute_onexit_table() Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!operator new(unsigned __int64,struct std::nothrow_t const &) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!operator new(unsigned __int64,struct std::nothrow_t const &) Unknown
ntdll.dll!LdrShutdownProcess() Unknown
ntdll.dll!RtlExitUserProcess() Unknown
ucrtbase.dll!exit_or_terminate_process() Unknown
ucrtbase.dll!common_exit() Unknown
StandardCollector.Service.exe!CStandardCollectorService::OnStart(void) Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
I have a problem with linking in VC++ 2010. When I compile in the debug mode it's ok, but in the release mode I regular receive the error "LNK1000: Internal error during IMAGE::BuildImage".
What am I doing wrong?
It began work as soon as I have changed "Whole program optimization" option from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument".
I encountered the same error. The problem in my case was that I was "playing" with the configuration properties (Project Properties -> Configuration Properties -> General)
The 'Configuration Type' of the project was 'Dynamic Library (.dll)', but the 'Target Extension' was .lib instead of .dll.
April 2020 update
Issue with MSBuild and Docker for Windows was fixed in MSBuild 16.5 (source), so if still seeing that - just update MSVS/MSBuild to the latest version
Original answer
Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
......
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage.FinalPhase
I was getting this error when I was running cmake in Docker for Windows inside mounted Docker volume. Solution is to copy the workspace to local Docker filesystem.
In vs2019 it works for me:
Project->Property pages->Optimization->Link Time Code Generation, change from "Use Link Time Code Generation" to "Profile Guided Optimization-Instrument"
Have been updated Eclipse PDT using Window->Check for Updates feature.
After restart all trird-party plug-ins seems like switched off.
Starting with -clean command line key doesn't helps.
Eclipse Installation Detals contains information about all my plug-ins correctly.
Error log:
eclipse.buildId=M20090917-0800
java.version=1.6.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Framework arguments: -product org.eclipse.epp.package.php.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.php.product
!ENTRY org.eclipse.team.core 4 0 2009-11-24 12:52:00.804
!MESSAGE Could not instantiate provider org.eclipse.team.svn.core.svnnature for project Search.
!STACK 1
org.eclipse.team.core.TeamException: Could not instantiate provider org.eclipse.team.svn.core.svnnature for project Search.
at org.eclipse.team.core.RepositoryProvider.mapNewProvider(RepositoryProvider.java:165)
at org.eclipse.team.core.RepositoryProvider.mapExistingProvider(RepositoryProvider.java:235)
at org.eclipse.team.core.RepositoryProvider.getProvider(RepositoryProvider.java:507)
at org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator.isMappedToCVS(CVSLightweightDecorator.java:192)
at org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator.decorate(CVSLightweightDecorator.java:147)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:263)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 org.eclipse.team.core 4 0 2009-11-24 12:52:00.804
!MESSAGE Could not instantiate provider org.eclipse.team.svn.core.svnnature for project Search.
Mar Cel was right:
Here i have write it in my german language wiki.
You need to chown the eclipse-programm-folder to full access permissions for the workspace-owner.
Start eclipse. Stop it, Rechange the owner back to root, and restart eclipse again.. After that, all works well for me (Eclipse 3.7.2)
Wiki
http://wiki.xstable.de/doku.php/entwicklungsumgebung:eclipse:faq?&#keine_plugins_mehr_in_eclipse_nach_update
Solution is use Equinox p2 Installer!
There is no other offline ways to install/reinstall plugins or features.
This seems to be an issue with writing permission of the Eclipse executing user. My guess is that the user can write metadata to workspace, therefore Eclipse shows you that the plugins were installed successfully but are obviously not available in the GUI, as none of the features were really installed in Eclipse itself.
Just alter the Eclipse program folders to give full permissions to the user actually executing Eclipse. Eclipse will then recognize that the metadata is wrong, repair them, and let you install the plugins once again. After that, all features will be available.