Why is powershell showing only 0 values for available cipher suite? - azure

I have multiple VMs within the azure cloud. All of them, except one, are unable to connect to certain services using SSL with the message
Invoke-Webrequest : The request was aborted: Could not create SSL/TLS secure channel.
I already tried all suggested solutions from setting System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; to messing with registry settings.
Now I noticed that the cipher suites on the servers are very different.
Not working:
KeyType : 0
Certificate :
MaximumExchangeLength : 0
MinimumExchangeLength : 0
Exchange :
HashLength : 0
Hash :
CipherBlockLength : 0
CipherLength : 0
BaseCipherSuite : 0
CipherSuite : 0
Cipher :
Name : TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Protocols : {}
Working
KeyType : 0
Certificate : RSA
MaximumExchangeLength : 65536
MinimumExchangeLength : 0
Exchange : ECDH
HashLength : 0
Hash :
CipherBlockLength : 16
CipherLength : 128
BaseCipherSuite : 49199
CipherSuite : 49199
Cipher : AES
Name : TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Protocols : {771, 65277}
How is this possible and how can I fix it?

Related

Prompt not enough free space when I use swupdate

I encountered a problem when using the swupdate image built by yocto.
Software Update started !
[network_initializer] : Software update started
[extract_file_to_tmp] : Found file
[extract_file_to_tmp] : filename sw-description
[extract_file_to_tmp] : size 303
[get_common_fields] : Version 0.1.0
[get_common_fields] : Description Firmware update for XXXXX Project
[parse_hw_compatibility] : Accepted Hw Revision : 1.0
[parse_hw_compatibility] : Accepted Hw Revision : 1.2
[parse_hw_compatibility] : Accepted Hw Revision : 1.3
[_parse_images] : Found Image: rootfs.ext4.gz in device : /dev/mmcblk2p4 for handler raw
[check_hw_compatibility] : Hardware myir Revision: 1.0
[check_hw_compatibility] : Hardware compatibility verified
[extract_files] : Found file
[extract_files] : filename rootfs.ext4.gz
[extract_files] : size 373258053 required
ERROR : Not enough free space to extract rootfs.ext4.gz (needed 373258053, got 223219712)
Image invalid or corrupted. Not installing ...
[network_initializer] : Main thread sleep again !
Waiting for requests...
ERROR : Writing to IPC fails due to Broken pipe
As shown in the figure, it indicates that there is not enough space, and then I use resize2fs /dev/mmcblk2p4 to expand the space. Now it has 1g of space. But still the same hint. Please let me know what you think.
Try using the installed-directly flag in the sw-description file.
files: (
{
filename = "rootfs.ext4.gz";
sha256 = "bc57b9c737033d0d6826db51618d596da7ecf3fdc0cb48dc9986a6094f529413";
type = "archive";
path = "/path/to/extract";
preserve-attributes = true;
installed-directly = true; <---------- this option
properties: {
create-destination = "true";
}
}

Finding physical adresses of registers in memoryspace

I'm trying to the state of the PRM_RSTST register of my ARM Cortex A8 processor to find the reason of resets because WDIOC_GETBOOTSTATUS isn't implemented for my processor, a TI8148. I know for the datasheet that the offset/adress is supposed to be 0xA8. However if I try to read in in my kernel driver with __raw_readl(0xA8) I get a seg fault. The other idea I had was to use /dev/mem, however if I go in with devmem2 0xA8 I get
/dev/mem opened.Unhandled fault: Precise External Abort on non-linefetch (0x018) at 0x401270a8
Memory mapped at address 0x40127000.
Bus error (core dumped)
So I looked at the mapping of memory with cat /proc/iomem
00000000-00000000 : omap2-nand.0
08000000-08000003 : omap2-nand
20000000-2fffffff : pcie-nonprefetch
47400000-47400fff : usbss
47401000-474017ff : musb0
47401000-474017ff : musb0
47401800-47401fff : musb1
47401800-47401fff : musb1
48010000-480100ff : omap-iommu.1
48010000-480100ff : omap-iommu.1
48020000-48021fff : omap_uart.0
48020000-48021fff : omap_uart
48022000-48023fff : omap_uart.1
48022000-48023fff : omap_uart
48024000-48025fff : omap_uart.2
48024000-48025fff : omap_uart
48028000-48028fff : omap_i2c.1
48028000-48028fff : omap_i2c
4802a000-4802afff : omap_i2c.2
4802a000-4802afff : omap_i2c
48030100-480301ff : omap2_mcspi.1
48030100-480301ff : omap2_mcspi.1
48032000-48032fff : omap_gpio.0
48038000-4803afff : mcasp
48038000-4803afff : davinci-mcasp
4803c000-4803efff : mcasp
4803c000-4803efff : davinci-mcasp
4804c000-4804cfff : omap_gpio.1
48080000-48081fff : omap2_elm.1
48080000-48081fff : omap2_elm.1
480c0000-480c0fff : omap_rtc
480c0000-480c0fff : omap_rtc
480c8000-480c8143 : omap-mailbox
48105500-481058ff : ti81xxvin
48105a00-48105dff : ti81xxvin
481a0100-481a01ff : omap2_mcspi.2
481a0100-481a01ff : omap2_mcspi.2
481a2100-481a21ff : omap2_mcspi.3
481a2100-481a21ff : omap2_mcspi.3
481a4100-481a41ff : omap2_mcspi.4
481a4100-481a41ff : omap2_mcspi.4
481a6000-481a7fff : omap_uart.3
481a6000-481a7fff : omap_uart
481a8000-481a9fff : omap_uart.4
481a8000-481a9fff : omap_uart
481aa000-481abfff : omap_uart.5
481aa000-481abfff : omap_uart
481ac000-481acfff : omap_gpio.2
481ae000-481aefff : omap_gpio.3
481c7000-481c7fff : omap_wdt
481c7000-481c7fff : omap_wdt
481cc000-481cffff : d_can
481cc000-481cffff : d_can
481d8100-481e80ff : mmci-omap-hs.0
481d8100-481e80ff : mmci-omap-hs
49000000-49007fff : edma_cc0
49000000-49007fff : edma
49800000-498003ff : edma_tc0
49900000-499003ff : edma_tc1
49a00000-49a003ff : edma_tc2
49b00000-49b003ff : edma_tc3
4a100000-4a1007ff : cpsw.0
4a100000-4a1007ff : eth0
4a100800-4a1008ff : davinci_mdio.0
4a100800-4a1008ff : davinci_mdio.0
4a100900-4a1009ff : cpsw.0
4a100900-4a1009ff : eth0
4a140000-4a150fff : ahci.0
51000000-51003fff : pcie-regs
55082000-550820ff : omap-iommu.0
55082000-550820ff : omap-iommu.0
80000000-bfffffff : pcie-inbound0
80000000-917fffff : System RAM
80044000-8058cfff : Kernel text
8058e000-8061770f : Kernel data
bd000000-bf7fffff : System RAM
So apparently 0x40127000, where devmem2 wants to look isn't mapped.
So where do I find the register with offset 0xA8?

Unexpected token G in JSON at position 0 video-length

I am using video-length to get duration of video in nodejs. The code worked fine in Centos.
In Ubuntu 16.x it is showing error:
SyntaxError: Unexpected token G in JSON at position 0
at JSON.parse (<anonymous>)
at VideoLength (/.../node_modules/video-length/video-length.js:14:24)
I have used below code to get duration:
const VideoLength = require('video-length');
VideoLength(video, {
bin: '/usr/bin/mediainfo',
extended: true
})
.then(data => {
console.log("data: %j", data)
duration = data['duration']
console.log("duration: " + duration)
})
.catch(err => {
console.log(err);
})
I have installed mediainfo also. Please guide me if I am doing anything wrong.
After debugging video-length.js, I've found below difference in the stdout obtained in centos and Ubuntu.
In Centos:
{
"media": {
"#ref": "/var/kurento/tmp/30/27122019/1514kurento-recording.webm",
"track": [
{
"#type": "General",
"VideoCount": "1",
"FileExtension": "webm",
"Format": "WebM",
"Format_Version": "2",
"FileSize": "157078809",
"FrameRate": "25.028",
"IsStreamable": "Yes",
"Encoded_Date": "UTC 2019-12-27 09:44:33",
"File_Modified_Date": "UTC 2019-12-27 10:56:31",
"File_Modified_Date_Local": "2019-12-27 16:26:31",
"Encoded_Application": "GStreamer Matroska muxer",
"Encoded_Library": "GStreamer matroskamux version 1.8.1.1",
"extra": {
"IsTruncated": "Yes"
}
},
{
"#type": "Video",
"StreamOrder": "0",
"ID": "1",
"UniqueID": "2934041311738436184",
"Format": "VP8",
"CodecID": "V_VP8",
"Width": "1920",
"Height": "1080",
"PixelAspectRatio": "1.000",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.028",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"Title": "Video",
"Language": "en",
"Default": "Yes",
"Forced": "No"
}
]
}
}
In Ubuntu:
General
Count : 308
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Count of video streams : 1
Video_Format_List : VP8
Video_Format_WithHint_List : VP8
Codecs Video : V_VP8
Video_Language_List : English
Complete name : /var/kurento/tmp/27/23012020/1355kurento-recording.webm
Folder name : /var/kurento/tmp/27/23012020
File name : 1355kurento-recording
File extension : webm
Format : WebM
Format : WebM
Format/Url : http://www.webmproject.org/
Format/Extensions usually used : webm
Commercial name : WebM
Format version : Version 2
Internet media type : video/webm
Codec : WebM
Codec : WebM
Codec/Url : http://www.webmproject.org/
Codec/Extensions usually used : webm
File size : 1760787
File size : 1.68 MiB
File size : 2 MiB
File size : 1.7 MiB
File size : 1.68 MiB
File size : 1.679 MiB
Duration : 45037
Duration : 45s 37ms
Duration : 45s 37ms
Duration : 45s 37ms
Duration : 00:00:45.037
Duration : 00:00:45.037
Overall bit rate : 312772
Overall bit rate : 313 Kbps
Encoded date : UTC 2020-01-23 08:25:19
File last modification date : UTC 2020-01-23 08:26:04
File last modification date (local) : 2020-01-23 13:56:04
Writing application : GStreamer Matroska muxer
Writing application : GStreamer Matroska muxer
Writing library : GStreamer matroskamux version 1.8.1.1
Writing library : GStreamer matroskamux version 1.8.1.1
Video
Count : 311
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
ID : 1
ID : 1
Unique ID : 3811409054155698551
Format : VP8
Format/Url : http://www.webmproject.org/
Commercial name : VP8
Codec ID : V_VP8
Codec ID/Url : http://www.webmproject.org/
Codec : V_VP8
Codec : V_VP8
Bit rate : 293486
Bit rate : 293 Kbps
Width : 1920
Width : 1 920 pixels
Height : 1080
Height : 1 080 pixels
Pixel aspect ratio : 1.000
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Frame rate mode : VFR
Frame rate mode : Variable
Compression mode : Lossy
Compression mode : Lossy
Delay : 0
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Title : Video
Language : en
Language : English
Language : English
Language : en
Language : eng
Language : en
Default : Yes
Default : Yes
Forced : No
Forced : No
Don't know the reason for the difference in structure. Still debugging for the cause. Any help will be highly appreciated.
It is good that you found the issue by yourself, As you can see the stdout in Ubuntu is not a valid JSON string and code in lib doing JSON.parse to parse out to object hence it is throwing error.
I would suggest you not using that library because that library itself not tested. If you have other option I would suggest you go with this:https://github.com/caffco/get-video-duration
Install
$ npm install --save get-video-duration
Usage
const { getVideoDurationInSeconds } = require('get-video-duration')
// From a local path...
getVideoDurationInSeconds('video.mov').then((duration) => {
console.log(duration)
})
// From a URL...
getVideoDurationInSeconds('http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4').then((duration) => {
console.log(duration)
})
// From a readable stream...
const fs = require('fs')
const stream = fs.createReadStream('video.mov')
getVideoDurationInSeconds(stream).then((duration) => {
console.log(duration)
})

Service Fabric internal DNS suddenly stops working

Normally, we can ping another service by its service name using Azure Service Fabric DNS. Around 1am last night, this stopped working. No code or configuration was changed, and nothing was deployed. Now, from within a container, we cannot ping another service:
Some info: We're running Service Fabric in Azure and running a Windows cluster. All our services are running in Docker containers, using Docker for Windows.
Things we've tried: Rebooting the VMs, deleting and re-deploying all apps, restarting the Naming Service and DNS service in the cluster.
Anyone seen anything like this? I'm looking for tips on what could be wrong, or on how to debug this issue further. Again, nothing was deployed and no code or configuration was changed. It just seems Service Fabric's internal DNS suddenly went down and will not come up again. Thanks!
Update: Output of Get-ServiceFabricNodeHealth on one of the nodes:
NodeName : _B_41
AggregatedHealthState : Ok
HealthEvents :
SourceId : System.FabricNode
Property : Certificate_client
HealthState : Ok
SequenceNumber : 132078454391466815
SentAt : 7/17/2019 1:57:19 PM
ReceivedAt : 7/17/2019 1:57:24 PM
TTL : Infinite
Description : Certificate expiration: thumbprint = adf7ae93a524d181106b0467a1f8e3375e1bf65f, expiration = 2020-06-20 01:17:33.000, remaining lifetime is
338:11:20:13.853, please refresh ahead of time to avoid catastrophic failure. Warning threshold Security/CertificateExpirySafetyMargin is configured at 30:0:00:00.000, if
needed, you can adjust it to fit your refresh process.
RemoveWhenExpired : False
IsExpired : False
Transitions : Warning->Ok = 7/13/2019 11:22:17 AM, LastError = 1/1/0001 12:00:00 AM
SourceId : System.FabricNode
Property : Certificate_cluster
HealthState : Ok
SequenceNumber : 132078386480915827
SentAt : 7/17/2019 12:04:08 PM
ReceivedAt : 7/17/2019 12:04:23 PM
TTL : Infinite
Description : Certificate expiration: thumbprint = adf7ae93a524d181106b0467a1f8e3375e1bf65f, expiration = 2020-06-20 01:17:33.000, remaining lifetime is
338:13:13:24.908, please refresh ahead of time to avoid catastrophic failure. Warning threshold Security/CertificateExpirySafetyMargin is configured at 30:0:00:00.000, if
needed, you can adjust it to fit your refresh process.
RemoveWhenExpired : False
IsExpired : False
Transitions : Warning->Ok = 7/13/2019 7:04:12 AM, LastError = 1/1/0001 12:00:00 AM
SourceId : System.FabricNode
Property : Certificate_server
HealthState : Ok
SequenceNumber : 132078441374480374
SentAt : 7/17/2019 1:35:37 PM
ReceivedAt : 7/17/2019 1:35:54 PM
TTL : Infinite
Description : Certificate expiration: thumbprint = adf7ae93a524d181106b0467a1f8e3375e1bf65f, expiration = 2020-06-20 01:17:33.000, remaining lifetime is
338:11:41:55.551, please refresh ahead of time to avoid catastrophic failure. Warning threshold Security/CertificateExpirySafetyMargin is configured at 30:0:00:00.000, if
needed, you can adjust it to fit your refresh process.
RemoveWhenExpired : False
IsExpired : False
Transitions : Warning->Ok = 7/13/2019 4:35:41 AM, LastError = 1/1/0001 12:00:00 AM
SourceId : System.RA
Property : RAStoreProvider
HealthState : Ok
SequenceNumber : 132072866375071389
SentAt : 7/11/2019 2:43:57 AM
ReceivedAt : 7/13/2019 1:15:33 PM
TTL : Infinite
Description : Store provider type ESE created and opened successfully.
RemoveWhenExpired : False
IsExpired : False
Transitions : Warning->Ok = 7/11/2019 2:44:27 AM, LastError = 1/1/0001 12:00:00 AM
SourceId : System.FM
Property : State
HealthState : Ok
SequenceNumber : 181
SentAt : 7/11/2019 2:44:15 AM
ReceivedAt : 7/13/2019 1:15:33 PM
TTL : Infinite
Description : Fabric node is up.
RemoveWhenExpired : False
IsExpired : False
Transitions : Warning->Ok = 7/11/2019 2:44:44 AM, LastError = 1/1/0001 12:00:00 AM
Update 2: Network interface info from within Docker container:

Get-DscConfiguration : The target namespace does not exist. DSC Linux

I was testing out DSC with linux,
Here are the details of the linux server i am using
PS C:\Windows\system32> Get-CimInstance -CimSession $Session -namespace root/omi -ClassName omi_identify
InstanceID : 2FDB5542-5896-45D5-9BE9-DC04430AAABE
SystemName : CENTOSTESTDSC
ProductName : OMI
ProductVendor : Microsoft
ProductVersionMajor : 1
ProductVersionMinor : 0
ProductVersionRevision : 8
ProductVersionString : 1.0.8
Platform : LINUX_X86_64_GNU
OperatingSystem : LINUX
Architecture : X86_64
Compiler : GNU
ConfigPrefix : GNU
ConfigLibDir : /opt/omi-1.0.8/lib
ConfigBinDir : /opt/omi-1.0.8/bin
ConfigIncludeDir : /opt/omi-1.0.8/include
ConfigDataDir : /opt/omi-1.0.8/share
ConfigLocalStateDir : /opt/omi-1.0.8/var
ConfigSysConfDir : /opt/omi-1.0.8/etc
ConfigProviderDir : /opt/omi-1.0.8/etc
ConfigLogFile : /opt/omi-1.0.8/var/log/omiserver.log
ConfigPIDFile : /opt/omi-1.0.8/var/run/omiserver.pid
ConfigRegisterDir : /opt/omi-1.0.8/etc/omiregister
ConfigSchemaDir : /opt/omi-1.0.8/share/omischema
ConfigNameSpaces : {root-check, interop, root-omi, root-cimv2}
PSComputerName : 123.112.123.156
When i try to invoke a DSC configuration against the Linux VM i get an error as below.
I am using the latest PSDSC tar file from below location
wget https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/download/V1.1.0-466/PSDSC.tar.gz
Can some one help please.

Resources