vsphere_compute_cluster.compute_cluster_create\[0\]: Creating...
vsphere_compute_cluster.compute_cluster_create\[1\]: Creating...
╷
│ Error: Plugin did not respond
│
│ with vsphere_compute_cluster.compute_cluster_create\[0\],
│ on main.tf line 102, in resource "vsphere_compute_cluster" "compute_cluster_create":
│ 102: resource "vsphere_compute_cluster" "compute_cluster_create" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(\*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│ with vsphere_compute_cluster.compute_cluster_create\[1\],
│ on main.tf line 102, in resource "vsphere_compute_cluster" "compute_cluster_create":
│ 102: resource "vsphere_compute_cluster" "compute_cluster_create" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(\*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
Stack trace from the terraform-provider-vsphere_v2.1.0_x5 plugin:
panic: interface conversion: interface {} is \*schema.Set, not \[\]interface {}
goroutine 57 \[running\]:
github.com/hashicorp/terraform-provider-vsphere/vsphere.updateVsanDisks(0xc000284e80, 0xc000283100, 0x14542e0, 0xc000777d60, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_compute_cluster.go:1264 +0x1945
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereComputeClusterApplyCreate(0xc000284e80, 0x14542e0, 0xc000777d60, 0x1, 0x1, 0x2d)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_compute_cluster.go:726 +0x549
github.com/hashicorp/terraform-provider-vsphere/vsphere.resourceVSphereComputeClusterCreate(0xc000284e80, 0x14542e0, 0xc000777d60, 0x5, 0xffffffffffffffff)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vsphere/resource_vsphere_compute_cluster.go:513 +0xdd
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(\*Resource).create(0xc000202620, 0x1a0ed68, 0xc0004c4a40, 0xc000284e80, 0x14542e0, 0xc000777d60, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:318 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(\*Resource).Apply(0xc000202620, 0x1a0ed68, 0xc0004c4a40, 0xc0007fbd50, 0xc00007aa00, 0x14542e0, 0xc000777d60, 0x0, 0x0, 0x0, ...)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource.go:456 +0x67b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(\*GRPCProviderServer).ApplyResourceChange(0xc0000b23f0, 0x1a0ed68, 0xc0004c4a40, 0xc00072fa90, 0xc0004c4a40, 0x16dd420, 0xc000550500)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/grpc_provider.go:955 +0x8ef
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(\*server).ApplyResourceChange(0xc00062dac0, 0x1a0ee10, 0xc0004c4a40, 0xc0007fbb20, 0xc00062dac0, 0xc000550570, 0xc000681ba0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/server/server.go:332 +0xb5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5.\_Provider_ApplyResourceChange_Handler(0x16dd420, 0xc00062dac0, 0x1a0ee10, 0xc000550570, 0xc0004b1e00, 0x0, 0x1a0ee10, 0xc000550570, 0xc000574d80, 0xd23)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x214
google.golang.org/grpc.(\*Server).processUnaryRPC(0xc0001aefc0, 0x1a18db8, 0xc000001980, 0xc0000e4e00, 0xc000344750, 0x238a480, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/google.golang.org/grpc/server.go:1194 +0x52b
google.golang.org/grpc.(\*Server).handleStream(0xc0001aefc0, 0x1a18db8, 0xc000001980, 0xc0000e4e00, 0x0)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/google.golang.org/grpc/server.go:1517 +0xd0c
google.golang.org/grpc.(\*Server).serveStreams.func1.2(0xc00009e420, 0xc0001aefc0, 0x1a18db8, 0xc000001980, 0xc0000e4e00)
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/google.golang.org/grpc/server.go:859 +0xab
created by google.golang.org/grpc.(\*Server).serveStreams.func1
/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-vsphere/vendor/google.golang.org/grpc/server.go:857 +0x1fd
Error: The terraform-provider-vsphere_v2.1.0_x5 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
hello, i try to create a cluster in Vsphere, and it fails with error above
cluster is created in vsphere UI,
2022-04-05T09:34:01.248Z \[TRACE\] maybeTainted: vsphere_compute_cluster.compute_cluster_create\[0\] encountered an error during creation, so it is now marked as tainted
when i try to destroy, it destroys nothing
Related
I tried to debug a go server with gorm & pgsql, an it exitted with panic when gorm try to connect to the pgsql with code:
d, err := gorm.Open("postgres", param)
and as I followed the stack, I found it is the problem with lib/pq proccess the server version:
case "server_version":
var major1 int
var major2 int
var minor int
//r.string is the string of pgsql version.
//mine is: 12.4 (Debian 12.4-1.pgdg100+1)
_, err = fmt.Sscanf(r.string(), "%d.%d.%d", &major1, &major2, &minor)
if err == nil {
cn.parameterStatus.serverVersion = major1*10000 + major2*100 + minor
}
obivisouly, the string 12.4 (Debian 12.4-1.pgdg100+1) dosen't match format %d.%d.%d, so it exitted with error.
but the strange thing is, it will only exit when debugging in GoLand (don't know about vscode). It will not happen when simplely build & run, the output is:
[INFO] 2022-11-04 15:30:52 +0800 [start_postgres.go:103] detecting database connecting... pgdir=%v/yak/tmp_build/database
[INFO] 2022-11-04 15:30:52 +0800 [start_postgres.go:106] detected exsited database.
[INFO] 2022-11-04 15:30:52 +0800 [core.go:107] health info manager is loading
[INFO] 2022-11-04 15:30:52 +0800 [manager.go:70] health info: cache 60 infos
[INFO] 2022-11-04 15:30:52 +0800 [core.go:112] start to connection postgres
[INFO] 2022-11-04 15:30:52 +0800 [core.go:117] build basic database manager instance
which is absloutly normal. then I did some modify on the source code in lib/pq/conn.go
rString := r.string()
fmt.Printf("\n%s\n\n", rString)
_, err = fmt.Sscanf(r.string(), "%d.%d.%d", &major1, &major2, &minor)
if err == nil {
cn.parameterStatus.serverVersion = major1*10000 + major2*100 + minor
}
and here is the strangest thing, the server crashed with infinite loop of error logging:
[INFO] 2022-11-04 16:37:00 +0800 [start_postgres.go:103] detecting database connecting... pgdir=%v/yak/tmp_build/database
12.4 (Debian 12.4-1.pgdg100+1)
[WARN] 2022-11-04 16:37:00 +0800 [start_postgres.go:110] open database failed: pq: invalid message format; expected string terminator
[INFO] 2022-11-04 16:37:00 +0800 [start_postgres.go:113] try to start a database...
12.4 (Debian 12.4-1.pgdg100+1)
[WARN] 2022-11-04 16:37:02 +0800 [start_postgres.go:206] try pq: invalid message format; expected string terminator times... waiting for the postgres starting up...
12.4 (Debian 12.4-1.pgdg100+1)
[WARN] 2022-11-04 16:37:03 +0800 [start_postgres.go:206] try pq: invalid message format; expected string terminator times... waiting for the postgres starting up...
12.4 (Debian 12.4-1.pgdg100+1)
[WARN] 2022-11-04 16:37:04 +0800 [start_postgres.go:206] try pq: invalid message format; expected string terminator times... waiting for the postgres starting up...
...
I can't figure it out why would this happen, I don't think it's in a goroutine because the main routine is blocked, so is there anyone can offer some helps?
versions of dependencies and IDE:
GoLand v2022.2.4
go version go1.19.2 linux/amd64
gorm v1.9.2
github.com/lib/pq v1.1.0
postgresql v12.4 (Debian 12.4-1.pgdg100+1)
I figured it out about the infinity loop of error, there's a select struct after the init connection, the code is:
select {
case <-ticker:
count++
conn, err := gorm.Open("postgres", param)
//conn, err := net.Dial("tcp", "127.0.0.1:5432")
if err != nil {
log.Warningf("try %v times... waiting for the postgres starting up...", err)
continue
}
_ = conn.Close()
return nil
}
so the problem is, when I print r.string(), it will return an error.
also it will exitted with panic in debug (GoLand) but work normally when build and run.
I'm Using the flutter_tex library
flutter_tex
flutter_tex: ^3.6.7+10
I want to release the app in the play store. My app is running fine. But I'm getting this message in the Debug Console.
Can I Avoid It?
TeXView(
renderingEngine: const TeXViewRenderingEngine.katex(),
child: TeXViewDocument('\$\$$text\$\$'),
),
Getting this error:
E/InputMethodManager(28630): b/117267690: Failed to get fallback IMM with expected displayId=137 actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{86b4162 VFEDHVC.. ........ 0,0-864,188}
E/InputMethodManager(28630): b/117267690: Failed to get fallback IMM with expected displayId=137
actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{86b4162 VFEDHVC..
........ 0,0-864,188}
D/EGL_emulation(28630): eglMakeCurrent: 0x963e0360: ver 2 0 (tinfo 0xebe0dce0)
E/InputMethodManager(28630): b/117267690: Failed to get fallback IMM with expected displayId=138
actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{47b28d1 VFEDHVC..
........ 0,0-864,188}
D/HostConnection(28630): HostConnection::get() New Host Connection established 0x6bd973d0, tid 28933
D/HostConnection(28630): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2
ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings
ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache
ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync
ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit
GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing
ANDROID_EMU_gles_max_version_2
E/InputMethodManager(28630): b/117267690: Failed to get fallback IMM with expected displayId=139
actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{d55bd6b VFEDHVC..
........ 0,0-864,188}
E/InputMethodManager(28630): b/117267690: Failed to get fallback IMM with expected displayId=140
actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{24c90e0 VFEDHVC..
........ 0,0-864,188}
Is this safe to not care about this.
We have to enable hybrid composition, set WebView.platform = SurfaceAndroidWebView();
You can look at this github link https://github.com/flutter/flutter/issues/40716#issuecomment-708076795. This helped me solve this error.
This problem is due to clicking on this widget and will not be fixed by resetting or deleting the build files.
All you have to do is design an operation that clicks on this widget or add a read-only feature to it, and this will solve the problem.
Your day without bugs!
Had the same problem. A clean rebuild of the project fixed it.
After upgrading Android 10 Q my dialogFragment not working, I have also converted android project into "AdroidX" but still the problem is same.
I am xamarin developer so please help me to understand this problem.
please check error:
2019-09-27 19:01:30.551 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:01:33.135 6797-6797/com.anotherroundapps.apps.kegid E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.anotherroundapps.apps.kegid, PID: 6797
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.view.View$DeclaredOnClickListener.onClick(View.java:5994)
at android.view.View.performClick(View.java:7140)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27351)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:5989)
at android.view.View.performClick(View.java:7140)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27351)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.IllegalStateException: Fragment com.anotherroundapps.apps.kegid.ManifestBuilder.EffectiveDateManagerFragment must be a public static class to be properly recreated from instance state.
at androidx.fragment.app.BackStackRecord.doAddOp(BackStackRecord.java:400)
at androidx.fragment.app.BackStackRecord.add(BackStackRecord.java:379)
at androidx.fragment.app.DialogFragment.show(DialogFragment.java:143)
at com.anotherroundapps.apps.kegid.ManifestBuilder.showEffectiveDateDialog(ManifestBuilder.java:540)
at com.anotherroundapps.apps.kegid.ManifestBuilder.itemClick(ManifestBuilder.java:275)
at java.lang.reflect.Method.invoke(Native Method)
at android.view.View$DeclaredOnClickListener.onClick(View.java:5989)
at android.view.View.performClick(View.java:7140)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27351)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2019-09-27 19:01:33.147 2177-2201/? E/system_server: Invalid ID 0x00000000.
2019-09-27 19:01:33.193 1812-2126/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2019-09-27 19:01:33.196 1812-2284/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2019-09-27 19:01:35.611 2177-5427/? E/InputDispatcher: Window handle Window{bf1e32f u0 Application Error: com.anotherroundapps.apps.kegid} has no registered input channel
2019-09-27 19:01:35.669 2177-4730/? E/InputDispatcher: Window handle Window{bf1e32f u0 Application Error: com.anotherroundapps.apps.kegid} has no registered input channel
2019-09-27 19:01:35.738 2177-2285/? E/InputDispatcher: channel '94f2618 com.anotherroundapps.apps.kegid/com.anotherroundapps.apps.kegid.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-09-27 19:01:35.739 2177-2285/? E/InputDispatcher: channel 'f095afe com.anotherroundapps.apps.kegid/com.anotherroundapps.apps.kegid.ManifestBuilder (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-09-27 19:01:37.342 2735-2735/? E/BeaconBle: Missing BluetoothAdapter
2019-09-27 19:01:37.393 2735-2735/? E/BeaconBle: Scan couldn't start for Places
2019-09-27 19:01:50.830 1935-1935/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2019-09-27 19:01:50.831 1935-1935/? E/netmgr: WifiForwarder unable to open QEMU pipe: Invalid argument
2019-09-27 19:02:50.865 1935-1935/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2019-09-27 19:02:50.865 1935-1935/? E/netmgr: WifiForwarder unable to open QEMU pipe: Invalid argument
2019-09-27 19:03:09.797 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:03:09.810 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:03:09.812 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:03:50.928 1935-1935/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2019-09-27 19:03:50.929 1935-1935/? E/netmgr: WifiForwarder unable to open QEMU pipe: Invalid argument
2019-09-27 19:03:56.639 2735-6578/? E/WakeLock: GCM_HB_ALARM release without a matched acquire!
2019-09-27 19:03:56.645 2735-6578/? E/WakeLock: GCM_CONN_ALARM release without a matched acquire!
2019-09-27 19:03:56.893 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:03:56.897 2177-2218/? E/memtrack: Couldn't load memtrack module
2019-09-27 19:04:02.386 2735-6917/? E/WakeLock: GCM_CONN_ALARM release without a matched acquire!
2019-09-27 19:04:45.446 2177-2218/? E/memtrack: Couldn't load memtrack module
I have tried with AndroidX and some of the googles artical but couldn't get much of help
public void showEffectiveDateDialog() {
DialogFragment newFragment = new EffectiveDateManagerFragment();
newFragment.show(getFragmentManager(), "datePicker");
}
public class EffectiveDateManagerFragment extends DialogFragment {
#Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
DateTime currentEffectiveDate = mNewManifest.getEffectiveDate();
// prompt use scan date or select another date
ArrayList<CharSequence> selections = new ArrayList<CharSequence>();
if (currentEffectiveDate != null)
selections.add(Html.fromHtml(String.format("Current selection: <b>%s</b>", currentEffectiveDate.toString(KegIdApplication.DATETIME_DISPLAY_FORMAT))));
else
selections.add(Html.fromHtml(String.format("Current selection: <b>%s</b>", getString(R.string.label_use_scan_date))));
selections.add(getString(R.string.label_use_scan_date));
selections.add(getString(R.string.label_choose_a_date));
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.label_effectivedate).setItems(selections.toArray(new CharSequence[selections.size()]), new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case 0:
//leave as is
dialog.dismiss();
break;
case 1:
// use scan date, clear effective date
mNewManifest.setEffectiveDate(null);
mEffectiveDateText.setText(R.string.label_use_scan_date);
break;
case 2:
// choose an effectivedate
dialog.dismiss();
DialogFragment newFragment = new DateTimePickerFragment(mNewManifest.getEffectiveDate());
newFragment.show(getFragmentManager(), "datePicker");
break;
default:
//cancel;
dialog.dismiss();
break;
}
}
});
//builder.setMessage("Choose the effective date for these kegs");
return builder.create();
}
}
I have custom dialog will have to open
Answer is I have created new java class for EffectiveDateManagerFragment and other related class changes into static class it solved my problem
I created an Iot Edge solution using Visual Studio Code via View -> Command Palette... -> AzureIotEdge:NewIoTEdgeSolution using the C# Module Module Template. This generates an Iot Edge solution with two Modules: tempSensor creates messages with dummy telemetry-data and SampleModule is supposed to receive those messages, print them and then pass them on to IotHub.
I build the solution for arm32 and deployed it to a Rasperry Pi (running latest Raspbian). The modules are then displayed as running on the device but if I monitor d2c-messages there are none arriving in IoT Hub.
If I run sudo iotedge logs tempSensor -f on the device, I can see messages are being generated.
If I run sudo iotedge logs SampleModule -f I only see IoT Hub module client initialized. Which is logged in the Init() Method. There is no logging from the PipeMessage Method which seems not to be reached at all.
If I build the solution for amd64 and deploy it to a virtual machine, everything is working as expected.
Is there a way to get it working on a Raspberry Pi running Raspian?
By the way: I tried the Azure Functions C# Module Template as well. Same result: On amd64 it works but on arm32 it does not.
UPDATE:
Here is the logging of edgeAgent:
█████╗ ███████╗██╗ ██╗██████╗ ███████╗
██╔══██╗╚══███╔╝██║ ██║██╔══██╗██╔════╝
███████║ ███╔╝ ██║ ██║██████╔╝█████╗
██╔══██║ ███╔╝ ██║ ██║██╔══██╗██╔══╝
██║ ██║███████╗╚██████╔╝██║ ██║███████╗
╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
██╗ ██████╗ ████████╗ ███████╗██████╗ ██████╗ ███████╗
██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██╔════╝ ██╔════╝
██║██║ ██║ ██║ █████╗ ██║ ██║██║ ███╗█████╗
██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║██╔══╝
██║╚██████╔╝ ██║ ███████╗██████╔╝╚██████╔╝███████╗
╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚══════╝
2018-12-21 07:08:27.323 +00:00 [INF] - Edge agent attempting to connect to IoT Hub via Amqp_Tcp_Only...
2018-12-21 07:08:31.986 +00:00 [INF] - Created persistent store at /tmp/edgeAgent
2018-12-21 07:08:34.193 +00:00 [INF] - Edge agent connected to IoT Hub via Amqp_Tcp_Only.
2018-12-21 07:08:37.624 +00:00 [INF] - Plan execution started for deployment 8
2018-12-21 07:08:37.654 +00:00 [INF] - Executing command: "Stop module SampleModule"
2018-12-21 07:08:37.766 +00:00 [INF] - Executing command: "Remove module SampleModule"
2018-12-21 07:08:37.964 +00:00 [INF] - Executing command: "Saving SampleModule to store"
2018-12-21 07:08:38.141 +00:00 [INF] - Executing command: "Command Group: (
[Create module SampleModule2]
[Start module SampleModule2]
)"
2018-12-21 07:08:38.152 +00:00 [INF] - Executing command: "Create module SampleModule2"
2018-12-21 07:08:42.678 +00:00 [INF] - Executing command: "Start module SampleModule2"
2018-12-21 07:08:45.749 +00:00 [INF] - Executing command: "Command Group: (
[Stop module tempSensor]
[Start module tempSensor]
[Saving tempSensor to store]
)"
2018-12-21 07:08:45.750 +00:00 [INF] - Executing command: "Stop module tempSensor"
2018-12-21 07:08:45.759 +00:00 [INF] - Executing command: "Start module tempSensor"
2018-12-21 07:08:48.423 +00:00 [INF] - Executing command: "Saving tempSensor to store"
2018-12-21 07:08:48.491 +00:00 [INF] - Executing command: "Command Group: (
[Stop module edgeHub]
[Start module edgeHub]
[Saving edgeHub to store]
)"
2018-12-21 07:08:48.491 +00:00 [INF] - Executing command: "Stop module edgeHub"
2018-12-21 07:08:48.501 +00:00 [INF] - Executing command: "Start module edgeHub"
2018-12-21 07:08:51.895 +00:00 [INF] - Executing command: "Saving edgeHub to store"
2018-12-21 07:08:51.900 +00:00 [INF] - Plan execution ended for deployment 8
2018-12-21 07:08:52.743 +00:00 [INF] - Updated reported properties
2018-12-21 07:08:57.811 +00:00 [INF] - HealthRestartPlanner is clearing restart stats for module 'tempSensor' as it has been running healthy for 00:10:00.
2018-12-21 07:08:57.814 +00:00 [INF] - HealthRestartPlanner is clearing restart stats for module 'edgeHub' as it has been running healthy for 00:10:00.
2018-12-21 07:08:57.815 +00:00 [INF] - Plan execution started for deployment 8
2018-12-21 07:08:57.818 +00:00 [INF] - Executing command: "Saving tempSensor to store"
2018-12-21 07:08:57.819 +00:00 [INF] - Executing command: "Saving edgeHub to store"
2018-12-21 07:08:57.820 +00:00 [INF] - Plan execution ended for deployment 8
2018-12-21 07:08:58.038 +00:00 [INF] - Updated reported properties
2018-12-21 07:09:03.239 +00:00 [INF] - Updated reported properties
And here some of the logging of edgeHub (there is lots more but seems to be all the same Exceptions):
2018-12-21 07:28:23.450 +00:00 [WRN] - Error sending messages to module bewaPi1/SampleModule2
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:28.517 +00:00 [WRN] - Non retryable exception occurred while sending message.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:28.521 +00:00 [WRN] - Error sending messages to module bewaPi1/SampleModule2
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:33.666 +00:00 [WRN] - Non retryable exception occurred while sending message.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:33.669 +00:00 [WRN] - Error sending messages to module bewaPi1/SampleModule2
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:39.012 +00:00 [WRN] - Non retryable exception occurred while sending message.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
2018-12-21 07:28:39.015 +00:00 [WRN] - Error sending messages to module bewaPi1/SampleModule2
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at DotNetty.Buffers.HeapArena.NewChunk(Int32 pageSize, Int32 maxOrder, Int32 pageShifts, Int32 chunkSize)
at DotNetty.Buffers.PoolArena`1.AllocateNormal(PooledByteBuffer`1 buf, Int32 reqCapacity, Int32 normCapacity)
at DotNetty.Buffers.PoolArena`1.Allocate(PoolThreadCache`1 cache, PooledByteBuffer`1 buf, Int32 reqCapacity)
at DotNetty.Buffers.PooledByteBufferAllocator.NewHeapBuffer(Int32 initialCapacity, Int32 maxCapacity)
at DotNetty.Buffers.AbstractByteBufferAllocator.Buffer(Int32 initialCapacity, Int32 maxCapacity)
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ByteBufferConverter.ToByteBuffer(Byte[] bytes) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ByteBufferConverter.cs:line 39
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.ProtocolGatewayMessageConverter.FromMessage(IMessage message) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/ProtocolGatewayMessageConverter.cs:line 101
at Microsoft.Azure.Devices.Edge.Hub.Mqtt.DeviceProxy.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Mqtt/DeviceProxy.cs:line 73
at Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler.SendMessageAsync(IMessage message, String input) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/device/DeviceMessageHandler.cs:line 256
at Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint.ModuleMessageProcessor.<>c__DisplayClass5_2.<<ProcessAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs:line 98
So the problem is caused by System.OutOfMemoryExceptions. But what is causing those exceptions?
Update2: This seems to be a known problem (see here) and can be solved by Setting OptimizeForPerformance to false. I will try this and see if it works.
The message routing between modules does not work because of System.OutOfMemoryExceptions in the edgeHub module. The problem is described and discussed here.
Microsoft has implemented a solution which is described here.
In short: If running IotEdge Solutions on Raspberry Pi the environment variable OptimizeForPerformance has to be set to false.
Seems the issue related to
https://learn.microsoft.com/en-us/azure/iot-edge/troubleshoot#stability-issues-on-resource-constrained-devices
Please refer the link and turn off OptimizeForPerformance in deployment manifest.
I'm getting the following linker errors in types.hpp while compiling in vc++ 2017. How shall i solve them ?
Below is the code I'm tyring to compile in vc++.
Additional directories included.
E:\boost_1_61_0-bin-msvc-all-32-64\boost_1_61_0;E:\nosql_db\mongo-cxx-driver-r3.1.3\include\mongocxx\v_noabi;E:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi;E:\nosql_db\mon-c-driver\include\libbson-1.0;E:\nosql_db\mon-c-driver\include\libmongoc-1.0;%(AdditionalDependencies)
#include "stdafx.h"
#include <iostream>
#include <bsoncxx/builder/stream/document.hpp>
#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
using bsoncxx::builder::stream::document;
int main()
{
mongocxx::instance inst{};
mongocxx::client conn{ mongocxx::uri{} };
bsoncxx::builder::stream::document document{};
auto collection = conn["testdb"]["testcollection"];
document << "hello" << "world";
collection.insert_one(document.view());
auto cursor = collection.find({});
for (auto&& doc : cursor) {
std::cout << bsoncxx::to_json(doc) << std::endl;
}
return 0;
}
everity Code Description Project File Line Suppression State
Error (active) E0145 member "bsoncxx::v_noabi::types::b_double::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 86
Error (active) E0145 member "bsoncxx::v_noabi::types::b_utf8::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 111
Error (active) E0145 member "bsoncxx::v_noabi::types::b_document::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 149
Error (active) E0145 member "bsoncxx::v_noabi::types::b_array::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 181
Error (active) E0145 member "bsoncxx::v_noabi::types::b_binary::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 206
Error (active) E0145 member "bsoncxx::v_noabi::types::b_undefined::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 230
Error (active) E0145 member "bsoncxx::v_noabi::types::b_oid::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 246
Error (active) E0145 member "bsoncxx::v_noabi::types::b_bool::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 264
Error (active) E0145 member "bsoncxx::v_noabi::types::b_date::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 289
Error (active) E0145 member "bsoncxx::v_noabi::types::b_null::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 350
Error (active) E0145 member "bsoncxx::v_noabi::types::b_regex::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 366
Error (active) E0145 member "bsoncxx::v_noabi::types::b_dbpointer::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 402
Error (active) E0145 member "bsoncxx::v_noabi::types::b_code::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 421
Error (active) E0145 member "bsoncxx::v_noabi::types::b_symbol::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 462
Error (active) E0145 member "bsoncxx::v_noabi::types::b_codewscope::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 500
Error (active) E0145 member "bsoncxx::v_noabi::types::b_int32::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 533
Error (active) E0145 member "bsoncxx::v_noabi::types::b_timestamp::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 562
Error (active) E0145 member "bsoncxx::v_noabi::types::b_int64::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 581
Error (active) E0145 member "bsoncxx::v_noabi::types::b_decimal128::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 606
Error (active) E0145 member "bsoncxx::v_noabi::types::b_minkey::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 637
Error (active) E0145 member "bsoncxx::v_noabi::types::b_maxkey::type_id" may not be initialized textapp e:\nosql_db\mongo-cxx-driver-r3.1.3\include\bsoncxx\v_noabi\bsoncxx\types.hpp 653
Error LNK1107 invalid or corrupt file: cannot read at 0x398 textapp E:\nosql_db\mongo-cxx-driver-r3.1.3\bin\mongocxx.dll 1
Steps followed for installing the driver.
cmake -G "Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=E:\\nosql_db\\mongo-c-driver" "-DCMAKE_BUILD_TYPE=Release"
msbuild.exe /p:Configuration=Release ALL_BUILD.vcxproj
msbuild.exe /p:Configuration=Release INSTALL.vcxproj
cmake -G "Visual Studio 14 2015 Win64" "-DENABLE_SSL=WINDOWS" "-DENABLE_SASL=SSPI" "-DCMAKE_INSTALL_PREFIX=E:\\nosql_db\\mongo-c-driver1" "-DCMAKE_PREFIX_PATH=E:\\nosql_db\\mongo-c-driver" "-DCMAKE_BUILD_TYPE=Release"
msbuild.exe /p:Configuration=Release ALL_BUILD.vcxproj
msbuild.exe /p:Configuration=Release INSTALL.vcxproj
cmake.exe -G "Visual Studio 14 Win64" -DCMAKE_INSTALL_PREFIX=E:\\nosql_db\\mongo-cxx-driver1 -DCMAKE_PREFIX_PATH=E:\\nosql_db\\mon-c-driver -DBOOST_ROOT=E:\\boost_1_65_1
msbuild.exe ALL_BUILD.vcxproj
msbuild.exe INSTALL.vcxproj
Then added additional libraries in vc++ configuration.
E:\nosql_db\mongo-cxx-driver1\include\bsoncxx\v_noabi;E:\nosql_db\mongo-cxx-driver1\include\mongocxx\v_noabi;E:\nosql_db\mon-c-driver\include\libbson-1.0;E:\nosql_db\mon-c-driver\include\libmongoc-1.0;
E:\nosql_db\mongo-cxx-driver1\bin\mongocxx.dll;E:\nosql_db\mongo-cxx-driver1\bin\bsoncxx.dll;E:\nosql_db\mon-c-driver\bin\libbson-1.0.dll;E:\nosql_db\mon-c-driver\bin\libmongoc-1.0.dll;
Here are my linker settings:
/MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\workouts\cpp\textapp\textapp\x64\Release\textapp.pdb" /DYNAMICBASE "mongocxx.dll" "bsoncxx.dll" "libbson-1.0.dll" "libmongoc-1.0.dll" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"E:\nosql_db\mongo-cxx-driver1\bin\mongocxx.dll;E:\nosql_db\mongo-cxx-driver1\bin\bsoncxx.dll;E:\nosql_db\mon-c-driver\bin\libbson-1.0.dll;E:\nosql_db\mon-c-driver\bin\libmongoc-1.0.dll;" /DEBUG:FULL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /PGD:"E:\workouts\cpp\textapp\textapp\x64\Release\textapp.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Release\textapp.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"E:\nosql_db\mongo-cxx-driver1\lib\bsoncxx.lib" /LIBPATH:"E:\nosql_db\mongo-cxx-driver1\lib\libbsoncxx.lib" /LIBPATH:"E:\nosql_db\mongo-cxx-driver1\lib\libmongocxx.lib" /LIBPATH:"E:\nosql_db\mongo-cxx-driver1\lib\mongocxx.lib" /LIBPATH:"E:\nosql_db\mon-c-driver\lib\bson-1.0.lib" /LIBPATH:"E:\nosql_db\mon-c-driver\lib\mongoc-1.0.lib" /TLBID:1