Mongod is not a service | Ubuntu | WSL. Error: mongod: unrecognized service - linux

I'm using WSL2 with Ubuntu 20.04.2 LTS. I tried setting up mongodb. There are two issues:
Running the command sudo apt-get install -y mongodb-org results in the error below.
Errors were encountered while processing:
/tmp/apt-dpkg-install-NtCqHi/1-mongodb-org-server_4.4.4_amd64.deb
/tmp/apt-dpkg-install-NtCqHi/2-mongodb-org-mongos_4.4.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Although the command mongod --version results in:
db version v3.6.8
git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
which is not the latest, even though I installed the latest community version.
running sudo service mongod start shows the following error:
mongod: unrecognized service
the list of available services currently in the system are:
sudo service --status-all
[ - ] apparmor
[ ? ] apport
[ - ] atd
[ - ] console-setup.sh
[ - ] cron
[ ? ] cryptdisks
[ ? ] cryptdisks-early
[ - ] dbus
[ ? ] hwclock.sh
[ + ] irqbalance
[ - ] iscsid
[ - ] keyboard-setup.sh
[ ? ] kmod
[ - ] lvm2
[ - ] lvm2-lvmpolld
[ - ] multipath-tools
[ + ] open-iscsi
[ - ] open-vm-tools
[ ? ] plymouth
[ ? ] plymouth-log
[ - ] postgresql
[ - ] procps
[ + ] redis-server
[ - ] rsync
[ - ] rsyslog
[ - ] screen-cleanup
[ - ] ssh
[ - ] sysstat
[ - ] udev
[ - ] ufw
[ - ] unattended-upgrades
[ - ] uuidd
[ - ] x11-common

This works for me:
sudo apt-get update
sudo apt-get install mongodb
sudo service mongodb start
:: My setup: [win10, wsl2]

Related

Unable to debug Kivy in PyCharm while run is OK

I have an issue on debugging a Kivy project with PyCahrm.
I'm on Win 10 x64.
Config version 1:
Python: 3.7.9 x64
Kivy: 2.0.0
PyCharm (Community Edition): 2022.1.1
Config version 2:
Python: 3.10.4 x64
Kivy: 2.1.0
PyCharm (Community Edition): 2022.1.1
First, I need to say that with Config version 1 I worked bevor and still have no problems.
What I did:
installed Python 3.10
created new venv
installed Kivy
installed other for my project required packages
added Python Interpreter to the Project in PyCharm
edited Run/Debug configuration to new interpreter in PyCharm
If I just run the project, it works like I expected without any errors, but if I try to debug it, I always get an Exception.
With MS VSCode I'm able to debug the Project, so I assume there is something with my configuration in PyCharm.
This is my console Output while debugging in PyCharm:
[WARNING] [Config ] Older configuration version detected (21 instead of 24)
[WARNING] [Config ] Upgrading configuration in progress.
[DEBUG ] [Config ] Upgrading from 21 to 22
[DEBUG ] [Config ] Upgrading from 22 to 23
[DEBUG ] [Config ] Upgrading from 23 to 24
[INFO ] [Logger ] Record log in C:\Users\x\.kivy\logs\kivy_22-05-30_23.txt
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.2
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.4.5
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at "C:\Projects\My Project\venv310\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Projects\My Project\venv310\Scripts\python.exe"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[DEBUG ] [Cache ] register <kv.resourcefind> with limit=None, timeout=60
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=None
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=None
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[DEBUG ] [GL ] available extensions: b'GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_texture_edge_clamp GL_EXT_separate_specular_color GL_ARB_multitexture GL_ARB_map_buffer_alignment GL_ARB_conservative_depth GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_ARB_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_SUN_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_ARB_fragment_program_shadow GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_color_buffer_float GL_ARB_half_float_pixel GL_ARB_texture_float GL_ARB_pixel_buffer_object GL_ARB_texture_barrier GL_EXT_framebuffer_object GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_occlusion_query2 GL_EXT_draw_buffers2 GL_WIN_swap_hint GL_EXT_texture_sRGB GL_ARB_multisample GL_EXT_packed_float GL_EXT_texture_shared_exponent GL_ARB_texture_rg GL_ARB_texture_compression_rgtc GL_NV_conditional_render GL_ARB_texture_swizzle GL_EXT_texture_swizzle GL_ARB_texture_gather GL_ARB_sync GL_ARB_cl_event GL_ARB_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_ARB_depth_buffer_float GL_EXT_transform_feedback GL_ARB_transform_feedback2 GL_ARB_draw_indirect GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_ARB_framebuffer_object GL_ARB_framebuffer_no_attachments GL_EXT_texture_array GL_EXT_texture_integer GL_ARB_map_buffer_range GL_ARB_texture_buffer_range GL_EXT_texture_snorm GL_ARB_blend_func_extended GL_INTEL_performance_query GL_ARB_copy_buffer GL_ARB_sampler_objects GL_NV_primitive_restart GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_uniform_buffer_object GL_ARB_depth_clamp GL_ARB_vertex_array_bgra GL_ARB_shader_bit_encoding GL_ARB_draw_buffers_blend GL_ARB_geometry_shader4 GL_EXT_geometry_shader4 GL_ARB_texture_query_lod GL_ARB_explicit_attrib_location GL_ARB_draw_elements_base_vertex GL_EXT_shader_integer_mix GL_ARB_instanced_arrays GL_ARB_base_instance GL_ARB_fragment_coord_conventions GL_EXT_gpu_program_parameters GL_ARB_texture_buffer_object_rgb32 GL_ARB_compatibility GL_ARB_texture_rgb10_a2ui GL_ARB_texture_multisample GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_timer_query GL_EXT_timer_query GL_ARB_tessellation_shader GL_ARB_vertex_array_object GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_texture_cube_map_array GL_EXT_gpu_shader4 GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_INTEL_fragment_shader_ordering GL_ARB_fragment_shader_interlock GL_ARB_clip_control GL_ARB_shader_subroutine GL_ARB_transform_feedback3 GL_ARB_get_program_binary GL_ARB_separate_shader_objects GL_ARB_shader_precision GL_ARB_vertex_attrib_64bit GL_ARB_viewport_array GL_ARB_transform_feedback_instanced GL_ARB_compressed_texture_pixel_storage GL_ARB_shader_atomic_counters GL_ARB_shading_language_packing GL_ARB_shader_image_load_store GL_ARB_shading_language_420pack GL_ARB_texture_storage GL_EXT_texture_storage GL_ARB_compute_shader GL_ARB_vertex_attrib_binding GL_ARB_texture_view GL_ARB_fragment_layer_viewport GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_shader_image_size GL_ARB_shader_storage_buffer_object GL_ARB_texture_storage_multisample GL_ARB_buffer_storage GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ARB_query_buffer_object GL_EXT_polygon_offset_clamp GL_ARB_clear_texture GL_ARB_texture_mirror_clamp_to_edge GL_ARB_debug_output GL_ARB_enhanced_layouts GL_KHR_debug GL_ARB_arrays_of_arrays GL_ARB_texture_query_levels GL_ARB_invalidate_subdata GL_ARB_clear_buffer_object GL_INTEL_map_texture GL_ARB_texture_compression_bptc GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_robustness GL_ARB_robust_buffer_access_behavior GL_EXT_texture_sRGB_decode GL_ARB_copy_image GL_KHR_blend_equation_advanced GL_EXT_direct_state_access GL_ARB_stencil_texturing GL_ARB_texture_stencil8 GL_ARB_explicit_uniform_location GL_ARB_multi_bind GL_ARB_indirect_parameters '
[DEBUG ] [GL ] glShaderBinary is not available
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.3.0 - Build 20.19.15.5126'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 4600'>
[INFO ] [GL ] OpenGL parsed version: 4, 3
[INFO ] [GL ] Shading version <b'4.30 - Build 20.19.15.5126'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[DEBUG ] [Shader ] Fragment compiled successfully
[DEBUG ] [Shader ] Vertex compiled successfully
[DEBUG ] [ImageSDL2 ] Load <C:\Projects\My Project\venv310\lib\site-packages\kivy\data\glsl\default.png>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[WARNING] Both Window.minimum_width and Window.minimum_height must be bigger than 0 for the size restriction to take effect.
[INFO ] [Text ] Provider: sdl2
[INFO ] [Clipboard ] Provider: winctypes
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Projects\My Project\src\My_App.py", line 27, in <module>
import doctodb.sql_utils as slq_utils # sqlite3 & Co.
File "C:\Projects\My Project\src\doctodb\sql_utils.py", line 14, in <module>
import my_globals
File "C:\Projects\My Project\src\my_globals.py", line 12, in <module>
from kivy.app import App
File "C:\Projects\My Project\venv310\lib\site-packages\kivy\app.py", line 414, in <module>
from os.path import dirname, join, exists, sep, expanduser, isfile
ImportError: cannot import name 'sep' from 'ntpath' (C:\Python\Python310\lib\ntpath.py)
Exception ignored in: <module 'threading' from 'C:\\Python\\Python310\\lib\\threading.py'>
Traceback (most recent call last):
File "C:\Python\Python310\lib\threading.py", line 1560, in _shutdown
lock.acquire()
KeyboardInterrupt:
Process finished with exit code 1
Any idea what could I try to solve this?

PdhAddCounterW() failed: unknown error when starting a demo

I followed instructions on https://docs.openvino.ai/latest/omz_demos.html#doxid-omz-demos.
I finished the setup/installation, downloaded the needed models with the omz_download tool and tried to start the interactive demo:
interactive_face_detection_demo ^ --loop ^ -m "C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml"
[ INFO ] version: 2022.1.0
[ INFO ] build: 2022.1.0-7019-cdb9bec7210-releases/2022/1
[ INFO ] Reading model: C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml
[ INFO ] Model name: mobilenet_ssd_672x384
[ INFO ] Inputs:
[ INFO ] data, f32, {1,3,384,672}, [N,C,H,W]
[ INFO ] Outputs:
[ INFO ] detection_out, f32, {1,1,200,7}, [...]
[ INFO ] The model C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml is loaded to CPU
[ INFO ] Device: CPU
[ INFO ] Number of streams: 1
[ INFO ] Number of threads: AUTO
[ ERROR ] PdhAddCounterW() failed: unknown error
How can I get more information about that error / is this a problem with my setup?
(I was able to get everything running on another machine)
System information:
Systemmodell Surface Pro 4
Betriebsystemname Microsoft Windows 10 Pro
Version 10.0.19043 Build 19043
Prozessor Intel(R) Core(TM) i5-6300U CPU # 2.40GHz, 2496 MHz, 2 Kern(e), 4 logische(r) Prozessor(en)
RAM: 4GB
openvino_2022.1.0.643
4.5.5-90-gc3d60a6ca (OpenVINO/2022.1)
Visual Studio 16 2019
Your error appears to be related to Windows performance-counter-API and this error is not related to OpenVINO. For more information about PdhAddCounterW(), you can refer to PdhAddCounterW function (pdh.h).
On another note, try specifying input to the demo as it requires an input to process. Here is an example command:
interactive_face_detection_demo -m "C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml" -i <path_to_video>\<input_video>.mp4

How to Diagnose Weatherreport from CouchDB

After building CouchDB from github. I run weatherreport as recommended in documentation to get the following error. How do you diagnose exactly whats going wrong? This seems like a bunch of random numbers
17:38:27 WARN: 'escriptize' command does not apply to directory /home/test/workspace/CouchDB-ant_rhel/couchdb
17:38:27 [ * ] Setup environment ... ok
17:38:27 [ * ] Ensure CouchDB is built ... ok
17:38:27 [ * ] Ensure Erlang boot script exists ... ok
17:38:27 [ * ] Prepare configuration files ... ok
17:38:27 [ * ] Start node node1 ... ok
17:38:28 [ * ] Check node at http://127.0.0.1:15984/ ... ok
17:38:28 [ * ] Running cluster setup ... ok
17:38:30 [ * ] Exec command bin/weatherreport --etc dev/lib/node1/etc --level error ... ['node1_diag35200#127.0.0.1'] [crit] Bad rpc call executing check weatherreport_check_memory_use: {'EXIT',{badarg,[{erlang,list_to_float,[[101]],[{error_info,#{module => erl_erts_errors}}]},{weatherreport_util,binary_to_float,1,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,117,116,105,108,46,101,114,108]},{line,80}]},{weatherreport_check_memory_use,check,1,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,99,104,101,99,107,95,109,101,109,111,114,121,95,117,115,101,46,101,114,108]},{line,56}]},{weatherreport_check,check,2,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,99,104,101,99,107,46,101,114,108]},{line,81}]},{weatherreport_runner,'-run/2-fun-0-',2,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,114,117,110,110,101,114,46,101,114,108]},{line,54}]},{erlang,apply,2,[]}]}}

Unable to create a window using kivy 1.11.1 and python 3.7.0

I am trying to create a simple program using kivy. The program runs without errors, however, no window appears. Here are the steps I followed for installing kivy:
python -m pip install --upgrade pip wheel setuptools virtualenv
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.* kivy_deps.glew==0.1.*
python -m pip install kivy_deps.gstreamer==0.1.*
python -m pip install kivy_deps.angle==0.1.*
python -m pip install kivy==1.11.1
python -m pip install kivy_examples==1.11.1
This is the program that I'm trying to run:
import kivy
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
label = Label(text = 'Hello from kivy',size_hint = (.5,.5),pos_hint {'center_x':.5,'center_y':.5})
return label
if __name__ == " main" :
app = MainApp()
app.run() #App class contains run() - sets up the graphics
And this is the output I'm getting:
[INFO ] [Logger ] Record log in C:\Users\Ayesha.kivy\logs\kivy_19-12-22_0.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.1.17
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.9
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.22
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\Ayesha\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy__init__.py"
[INFO ] [Python ] v3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\Ayesha\AppData\Local\Programs\Python\Python37\pythonw.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2

Javacard scriptgen

I try to use the oracle java card development kit 3.0.5u2 command line tools.
I use the cap file generated by netbeans
I use verifycap.bat on my cap together with the export files in the api_export_files directory of the sdk.
verifycap.bat -nobanner -nowarn ..\api_export_files\javacard\framework\javacard\framework.exp ..\api_export_files\javacard\security\javacard\security.exp ..\api_export_files\java\lang\javacard\lang.exp kaylat.cap > kaylat.hash
I get a hash file with this content:
[ INFO: ] [v3.0.5] Off-Card Verifier, Version {1}.
[ INFO: ] Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
[ INFO: ] VĂ©rification du fichier CAP kaylat.cap
[ INFO: ] Hash for kaylat/javacard/ConstantPool.cap [SHA-256: ad9ece95c64174d87b92488213081d1f977c975ba116fd7dead60246a1a94099]
[ INFO: ] Hash for kaylat/javacard/StaticField.cap [SHA-256: 5863e9740af5fb905922380b2aa88309a16a285dd3412417ae8af941327901ee]
[ INFO: ] Hash for kaylat/javacard/Descriptor.cap [SHA-256: 957c5fd5ebee857a06b38129d5b94b3a0bf155d989c6db4080bc8f0ec2c26606]
[ INFO: ] Hash for kaylat/javacard/Header.cap [SHA-256: 67802c08d73cee2e77947b76dd5f5f728055fec8c9ab4820369b18f845bb4eab]
[ INFO: ] Hash for kaylat/javacard/Directory.cap [SHA-256: 803ba29574f2013b4dc895253afaf0bc8376deb1110eb35ee90c6e6807b70a59]
[ INFO: ] Hash for kaylat/javacard/Applet.cap [SHA-256: 17b671b4e2371e00eea2717f84cb016baa818a92c46687e25b5392023a071229]
[ INFO: ] Hash for kaylat/javacard/Method.cap [SHA-256: 9e7dd02202e95de04a33fd812f1ab38cf5554ee1ee3c0d982d31140c1313f97f]
[ INFO: ] Hash for kaylat/javacard/Class.cap [SHA-256: f788cc84d355e9a2cda8432c6af815aad6ed5574b5246641122158167850c6dc]
[ INFO: ] Hash for kaylat/javacard/RefLocation.cap [SHA-256: 16e7d9445917130b643bee62728b460c37511ce12b5c65c7653f9f75b8fa5df6]
[ INFO: ] Hash for kaylat/javacard/Import.cap [SHA-256: ce4ee9399ef89f122c68620d0330239a0f40a178992aae6c60fdf02caa492817]
[ INFO: ] 0 warnings and 0 errors.
I run scriptgen.bat:
scriptgen.bat kaylat.cap -hashfile kaylat.hash
This command fails with message:
Missing hash for required component: header.cap
Instead of redirecting the output of verifycap.bat to a file ("> kaylat.hash"), you should probably use the program option "-outfile <file-name>", which will write the digest values in the correct format to the file. Then use this file for input to scriptgen.bat.
If I use the console output of the program as input to the scriptgen.bat, I get the same error. If I use the -outfile option, all works fine.
C:\verifycap.bat
[ INFO: ] Usage: verifycap [options] <export files> <CAP file>
(or)
verifycap <-C | --commandoptionsfile> <command options file>
Where options include:
-digest <alg-name> specify the digest to use (default: SHA-256)
-help Print this message and exit.
-nobanner Suppress banner message.
-nowarn Suppress warning messages.
-outfile <file-name> Specify the name of the output file to store digest (default: no output file created)
-package <pkg> Set the name of the package to be verified
-verbose Turn on verbose mode.
-version Print version number and exit.

Resources