Azure SQL Edge container failed to start on M1, when mapping volume to relative path - sql-server

On an M1 Macbook, I followed online examples and successfully start Azure SQL Edge container with basic configuration.
Then I want to map a volume (mySpecialFolder) by "Path to the host, relative to the Compose file".
Here we want "./mySpecialFolder:/tmp", not "mySpecialFolder:/tmp".
services:
mssql:
container_name: mssql
image: "mcr.microsoft.com/azure-sql-edge:latest"
environment:
SA_PASSWORD: "something"
ACCEPT_EULA: "Y"
expose:
- 1433
ports:
- 1433:1433
networks:
- sql
volumes:
- ./mySpecialFolder:/tmp
- mssqlsystem:/var/opt/mssql
It failed to load and reports
Azure SQL Edge will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2140520.
2022/07/29 11:00:39 [launchpadd] INFO: Extensibility Log Header: <timestamp> <process> <sandboxId> <sessionId> <message>
2022/07/29 11:00:39 [launchpadd] WARNING: Failed to load /var/opt/mssql/mssql.conf ini file with error open /var/opt/mssql/mssql.conf: no such file or directory
2022/07/29 11:00:39 [launchpadd] INFO: DataDirectories = /bin:/etc:/lib:/lib32:/lib64:/sbin:/usr/bin:/usr/include:/usr/lib:/usr/lib32:/usr/lib64:/usr/libexec/gcc:/usr/sbin:/usr/share:/var/lib:/opt/microsoft:/opt/mssql-extensibility:/opt/mssql/mlservices:/opt/mssql/lib/zulu-jre-11:/opt/mssql-tools
2022/07/29 11:00:39 Drop permitted effective capabilities.
2022/07/29 11:00:39 [launchpadd] INFO: Polybase remote hadoop bridge disabled
2022/07/29 11:00:39 [launchpadd] INFO: Launchpadd is connecting to mssql on localhost:1431
2022/07/29 11:00:39 [launchpadd] WARNING: Failed to connect to SQL because: dial tcp 127.0.0.1:1431: connect: connection refused, will reattempt connection.
This program has encountered a fatal error and cannot continue running at Fri Jul 29 11:00:40 2022
The following diagnostic information is available:
Reason: 0x00000007
Status: 0xc0000002
Message: Failed to load KM driver [Npfs]
Stack Trace:
file://package4/windows/system32/sqlpal.dll+0x000000000030E879
file://package4/windows/system32/sqlpal.dll+0x000000000030DB54
file://package4/windows/system32/sqlpal.dll+0x000000000030AB96
file://package4/windows/system32/sqlpal.dll+0x000000000030961D
file://package4/windows/system32/sqlpal.dll+0x000000000034EE01
Stack:
IP Function
---------------- --------------------------------------
0000aaaac9c2ba70 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x25d0
0000aaaac9c2b618 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x2178
0000aaaac9c39d74 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x108d4
0000aaaac9c3a75c std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x112bc
0000aaaac9ced6c4 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_
0000ffffb9e44df8 S_SbtUnimplementedInstruction+0x2542b4
0000ffffb9e4472c S_SbtUnimplementedInstruction+0x253be8
0000ffffb9e45238 S_SbtUnimplementedInstruction+0x2546f4
0000ffffb9e3ca90 S_SbtUnimplementedInstruction+0x24bf4c
0000ffffb9e395dc S_SbtUnimplementedInstruction+0x248a98
0000ffffb9ed8ddc S_SbtUnimplementedInstruction+0x2e8298
0000ffffb9e38e44 S_SbtUnimplementedInstruction+0x248300
0000ffffb9e38b98 S_SbtUnimplementedInstruction+0x248054
0000ffffb9e38604 S_SbtUnimplementedInstruction+0x247ac0
0000ffffb9e38ffc S_SbtUnimplementedInstruction+0x2484b8
0000ffffbdb248a4 CallGuestFunction+0x84
0000ffffbdb1f964 Sbt::Dispatcher::SimulateCpu(Sbt::GuestCtx*)+0x2c
0000ffffbdb20d9c Sbt::RuntimeImpl::SimulateCpu(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)+0x3c8
0000ffffbdb219e4 Sbt::SimulateCpu(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)+0x30
0000ffffbdb22c04 SbtRtSimulateCpu+0x84
0000aaaac9c42164 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x18cc4
0000aaaac9c3fe34 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::~_Sp_counted_base()+0x16994
Process: 24 - sqlservr
Thread: 28 (application thread 0x4)
Instance Id: 76bd6c34-28e2-4a7f-9e5a-f3ffa17d9c1a
Crash Id: a022551e-96fe-4a59-ada3-4da01d244653
Build stamp: 06cd67626d2ebedd8721dc1bd892cdda65157cdcd6ac004bb81acdd6498ec618
Distribution: Ubuntu 18.04.6 LTS aarch64
Processors: 5
Total Memory: 8232747008 bytes
Timestamp: Fri Jul 29 11:00:40 2022
Last errno: 2
Last errno text: No such file or directory

Related

Error : increase sysctl fs.aio-max-nr while configuring SQL Server in Ubuntu

I have successfully installed SQL Server in Ubuntu 20.04.5. But while configuring SQL Server running the command /opt/mssql/bin/mssql-conf setup and answering to all questions, I got the following error
The following diagnostic information is available:
Reason: 0x00000003
Status: 0x0000000b
Message: Unable to create a new asynchronous I/O context. Please increase sysctl fs.aio-max-nr
Stack:
IP Function
---------------- --------------------------------------
0000555a422995b2 <unknown>
0000555a42298fd0 <unknown>
0000555a422032af <unknown>
0000555a422b1d11 <unknown>
0000555a422b1af8 <unknown>
0000555a42253096 <unknown>
0000555a4225386e <unknown>
0000555a422bf0ca <unknown>
0000555a421fa8ad <unknown>
00007f7ed3521083 __libc_start_main+0xf3
0000555a421fa77e <unknown>
Process: 13543 - sqlservr
Thread: 13543
Instance Id: e13b426f-6907-4503-b340-4d6575d62a76
Crash Id: 48813d78-4d11-482e-8318-bbd3b504e5ab
Build stamp: d81e9b6de06534e649bd57dd609aa3050f5e380f361b7f8a80a80eeb71e7422c
Distribution: Ubuntu 20.04.5 LTS
Processors: 2
Total Memory: 270359584768 bytes
Timestamp: Tue Dec 6 03:58:53 2022
Last errno: 11
Last errno text: Resource temporarily unavailable
Capturing a dump of 13543
sqlservr: utils.cpp:561: uintptr_t GetEndOfLibOSVmRange(): Assertion `GetGlobals()->GetStatics()->IsLibOSVmmRangeEndValid()' failed.
Any help will be greatly appreciated

Asimbench benchmark running in gem5 fails with "fatal: Unable to find destination for [0x40008000:0x40008040] on system.iobus"

I have downloaded asimbench files which provided in the gem5.org website and I have modified the config/common/FSConfig.py with following changes:
def makeArmSystem(..)
..................
self.cf0 = CowIdeDisk(driveID='master')
self.cf2 = CowIdeDisk(driveID='master')
self.cf0.childImage(mdesc.disk())
self.cf2.childImage(disk("sdcard-1g-mxplayer.img"))
#Old platforms have a built-in IDE or CF controller. Default to
#the IDE controller if both exist. New platforms expect the
#storage controller to be added from the config script.
if hasattr(self.realview, "ide"):
#self.realview.ide.disks = [self.cf0]
self.realview.ide.disks = [self.cf0, self.cf2]
elif hasattr(self.realview, "cf_ctrl"):
#self.realview.cf_ctrl.disks = [self.cf0]
self.realview.cf_ctrl.disks = [self.cf0, self.cf2]
else:
self.pci_ide = IdeController(disks=[self.cf0])
pci_devices.append(self.pci_ide
I used this command:
./build/ARM/gem5.opt configs/example/fs.py --mem-size=8192MB
--disk-image=/home/yaz/gem5/full_system_images/disks/ARMv7a-ICS-Android.SMP.Asimbench-v3.img
--kernel=/home/yaz/gem5/full_system_images/binaries/vmlinux.smp.ics.arm.asimbench.2.6.35
--os-type=android-ics --cpu-type=MinorCPU --machine-type=VExpress_GEM5 --script=/home/yaz/gem5/full_system_images/boot/adobe.rcS
warn: CheckedInt already exists in allParams. This may be caused by
the Python 2.7 compatibility layer. warn: Enum already exists in
allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by
the Python 2.7 compatibility layer. gem5 Simulator System.
http://gem5.org gem5 is copyrighted software; use the --copyright
option for details. gem5 version 20.0.0.3 gem5 compiled Jul 7 2020
16:17:12 gem5 started Jul 16 2020 04:41:50 gem5 executing on
yazeed-OptiPlex-9010, pid 3367 command line: ./build/ARM/gem5.opt
configs/example/fs.py --mem-size=8192MB
--disk-image=/home/yaz/gem5/full_system_images/disks/ARMv7a-ICS-Android.SMP.Asimbench-v3.img
--kernel=/home/yaz/gem5/full_system_images/binaries/vmlinux.smp.ics.arm.asimbench.2.6.35
--os-type=android-ics --cpu-type=MinorCPU --machine-type=VExpress_GEM5 --script=/home/yaz/gem5/full_system_images/boot/adobe.rcS
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
info: kernel located at: /home/yaz/gem5/full_system_images/binaries/vmlinux.smp.ics.arm.asimbench.2.6.35
system.vncserver: Listening for connections on port 5900
system.terminal: Listening for connections on port 3456
system.realview.uart1.device: Listening for connections on port 3457
system.realview.uart2.device: Listening for connections on port 3458
system.realview.uart3.device: Listening for connections on port 3459
0: system.remote_gdb: listening for remote gdb on port 7000 info:
Using bootloader at address 0x80000000
info: Using kernel entry physical address at 0x140008000 warn: DTB file specified, but no
device tree support in kernel
**** REAL SIMULATION ****
warn:Existing EnergyCtrl, but no enabled DVFSHandler found. info: Entering
event queue # 0. Starting simulation...
fatal: Unable to find destination for [0x40008000:0x40008040] on system.iobus
Memory Usage: 8786764 KBytes
Thanks for helping

Unable to connect with AWS host url using Embedded C SDK

I am trying to run subscribe_publish_sample on device(ARM architecture). For this I have cross compiled the code and copied to device. Required certificates also copied to device. I am getting following error.
Please let me know for any mistake.
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
Configurations :
#define AWS_IOT_MQTT_HOST "215740087218.iot.ap-south-1.amazonaws.com" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
#define AWS_IOT_MQTT_CLIENT_ID "RaspberryPi" ///< MQTT client ID should be unique for every device
#define AWS_IOT_MY_THING_NAME "RaspberryPi" ///< Thing Name of the Shadow this device is associated with
#define AWS_IOT_ROOT_CA_FILENAME "rootCA.crt" ///< Root CA file name
#define AWS_IOT_CERTIFICATE_FILENAME "7256bcd191-certificate.pem.crt" ///< device signed certificate file name
#define AWS_IOT_PRIVATE_KEY_FILENAME "7256bcd191-private.pem.key" ///< Device private key filename
// =================================================
======================================================================================
Certificates copied to device :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ls
7256bcd191-certificate.pem.crt 7256bcd191-private.pem.key 7256bcd191-public.pem.key README.txt rootCA.crt
ARN : arn:aws:iot:ap-south-1:215740087218:thing/RaspberryPi
Policy attached : arn:aws:iot:ap-south-1:215740087218:policy/RaspberrypiPolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:*",
"Resource": "*"
}
]
}
==============================================================================
Debug Logs for sample :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample# ./subscribe_publish_sample
AWS IoT SDK Version 3.0.1-
DEBUG: main L#159 rootCA /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/rootCA.crt
DEBUG: main L#160 clientCRT /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-certificate.pem.crt
DEBUG: main L#161 clientKey /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-private.pem.key
Connecting...
DEBUG: iot_tls_connect L#130
. Seeding the random number generator...
DEBUG: iot_tls_connect L#138 . Loading the CA root certificate ...
DEBUG: iot_tls_connect L#144 ok (0 skipped)
DEBUG: iot_tls_connect L#146 . Loading the client cert. and key...
DEBUG: iot_tls_connect L#159 ok
DEBUG: iot_tls_connect L#161 . Connecting to 215740087218.iot.ap-south-1.amazonaws.com/8883...
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
telnet logs :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# telnet 215740087218.iot.ap-south-1.amazonaws.com 8883
telnet: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
ping response:
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ping 215740087218.iot.ap-south-1.amazonaws.com
ping: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
Mosquitto_sub response :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# mosquitto_sub --cafile rootCA.crt --cert 7256bcd191-certifi
cate.pem.crt --key 7256bcd191-private.pem.key -h 215740087218.iot.ap-south-1.amazonaws.com -p 8883 -q 0 -d -t sdkTest/sub -i Raspberr
yPi
Unable to connect (Lookup error.).
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
The host name you provided seems to be incorrect:
nslookup 215740087218.iot.ap-south-1.amazonaws.com
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find 215740087218.iot.ap-south-1.amazonaws.com: NXDOMAIN
This is confirmed by the error as well (in net_socket.h from the SDK):
#define MBEDTLS_ERR_NET_UNKNOWN_HOST -0x0052 /**< Failed to get an IP address for the given hostname. */
Read AWS IoT Connecting Devices. You need to provide the endpoint specific to your account.

Cause: Command execution failed on the local server with non-zero exit code

Failed to fetch information from target servers
Cause: Command execution failed on the local server with non-zero exit code.
command: /usr/local/psa/bin/ipmanage --xml-info
exit code: 255
stdout: <ipinfo>
<ip name="193.160.214.57">
<state>0</state>
<type>shared</type>
<ip_address>193.160.214.57</ip_address>
<mask>255.255.255.255</mask>
<iface>venet0</iface>
<clients>0</clients>
<hostings>0</hostings>
<ftps>false</ftps>
<publicIp></publicIp>
</ip>
</ipinfo>
stderr: [2019-10-20 21:21:51.133] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/f2bmng' '--reload'] with exit code [1]
PHP Fatal error: Uncaught PleskUtilException: f2bmng failed: 2019-10-20 21:21:51,115 fail2ban.jailreader [17670]: ERROR No file(s) found for glob /var/log/secure
2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail
ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload']' returned non-zero exit status 255 in /usr/local/psa/admin/plib/Service/Agent.php:210
Stack trace:
#0 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(490): Service_Agent->execAndGetResponse('f2bmng', Array, '')
#1 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(458): Ip_Ban_Manager->_callUtility('--reload')
#2 /usr/local/psa/admin/plib/Fail2Ban/EventListener.php(123): Ip_Ban_Manager->reload()
#3 [internal function]: Plesk\Fail2Ban\EventListener->applyChanges()
#4 {main}
thrown in /usr/local/psa/admin/plib/Service/Agent.php on line 210
That is a critical error, migration was stopped.
I don't know what is "wrong" with your plesk (not so familiar with), but fail2ban error is pretty simply:
ERROR No file(s) found for glob /var/log/secure
2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail
Your ssh jail seems to be configured to monitor /var/log/secure which is not exist. Either you have to specify proper logpath (/var/log/auth.log?) where ssh logs authentication errors;
or if it is systemd journal on your system, you have to specify backend = systemd for that.
Related fail2ban jail.local would be:
[ssh]
# backend = systemd
logpath = /var/log/auth.log
But you can surely configure this in plesk settings too.
Also note your jail is called ssh, where normally original default jail of fail2ban is sshd (but it could be indeed configured with this name from your maintainer).

Start Riak crashing after 30 seconds

$ riak start crashing after 30 seconds of its start. I'm having following (changes) settings in my riak.conf:
search = on
storage_backend = leveldb
riak_control = on
crash.log contains the following:
2016-06-30 14:49:38 =ERROR REPORT====
** Generic server yz_solr_proc terminating
** Last message in was {check_solr,0}
** When Server state == {state,"./data/yz",#Port<0.9441>,8093,8985}
** Reason for termination ==
** "solr didn't start in alloted time"
2016-06-30 14:49:38 =CRASH REPORT====
crasher:
initial call: yz_solr_proc:init/1
pid: <0.582.0>
registered_name: yz_solr_proc
exception exit: {"solr didn't start in alloted time",[{gen_server,terminate,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
ancestors: [yz_solr_sup,yz_sup,<0.578.0>]
messages: [{'EXIT',#Port<0.9441>,normal}]
links: [<0.580.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 376
stack_size: 27
reductions: 16170
neighbours:
2016-06-30 14:49:38 =SUPERVISOR REPORT====
Supervisor: {local,yz_solr_sup}
Context: child_terminated
Reason: "solr didn't start in alloted time"
Offender: [{pid,<0.582.0>},{name,yz_solr_proc},{mfargs,{yz_solr_proc,start_link,["./data/yz","./data/yz_temp",8093,8985]}},{restart_type,permanent},{shutdown,5000},{child_type,worker}]
2016-06-30 14:49:39 =ERROR REPORT====
** Generic server yz_solr_proc terminating
** Last message in was {#Port<0.12204>,{exit_status,1}}
** When Server state == {state,"./data/yz",#Port<0.12204>,8093,8985}
** Reason for termination ==
** {"solr OS process exited",1}
2016-06-30 14:49:39 =CRASH REPORT====
crasher:
initial call: yz_solr_proc:init/1
pid: <0.7631.0>
registered_name: yz_solr_proc
exception exit: {{"solr OS process exited",1},[{gen_server,terminate,6,[{file,"gen_server.erl"},{line,744}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
ancestors: [yz_solr_sup,yz_sup,<0.578.0>]
messages: [{'EXIT',#Port<0.12204>,normal}]
links: [<0.580.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1598
stack_size: 27
reductions: 8968
neighbours:
2016-06-30 14:49:39 =SUPERVISOR REPORT====
Supervisor: {local,yz_solr_sup}
Context: child_terminated
Reason: {"solr OS process exited",1}
Offender: [{pid,<0.7631.0>},{name,yz_solr_proc},{mfargs,{yz_solr_proc,start_link,["./data/yz","./data/yz_temp",8093,8985]}},{restart_type,permanent},{shutdown,5000},{child_type,worker}]
2016-06-30 14:49:39 =SUPERVISOR REPORT====
Supervisor: {local,yz_solr_sup}
Context: shutdown
Reason: reached_max_restart_intensity
Offender: [{pid,<0.7631.0>},{name,yz_solr_proc},{mfargs,{yz_solr_proc,start_link,["./data/yz","./data/yz_temp",8093,8985]}},{restart_type,permanent},{shutdown,5000},{child_type,worker}]
2016-06-30 14:49:39 =SUPERVISOR REPORT====
Supervisor: {local,yz_sup}
Context: child_terminated
Reason: shutdown
Offender: [{pid,<0.580.0>},{name,yz_solr_sup},{mfargs,{yz_solr_sup,start_link,[]}},{restart_type,permanent},{shutdown,5000},{child_type,supervisor}]
2016-06-30 14:49:39 =SUPERVISOR REPORT====
Supervisor: {local,yz_sup}
Context: shutdown
Reason: reached_max_restart_intensity
Offender: [{pid,<0.580.0>},{name,yz_solr_sup},{mfargs,{yz_solr_sup,start_link,[]}},{restart_type,permanent},{shutdown,5000},{child_type,supervisor}]
Make sure the ports used by Solr are available. The defaults are 8093 for search, and 8985 for JMX.
Tune your system to improve performance. Follow Improving Performance for Linux.
In riak.conf, increase the JVM's heap size, the default of 1G is often not enough. For example, search.solr.jvm_options=-d64 -Xms2g -Xmx4g -XX:+UseStringCache -XX:+UseCompressedOops (see Search Settings).
On a slow machine, Solr just may take longer to start. Try increasing search.solr.start_timeout.
Solr directories must be writable (usually /var/lib/riak/data/yz*), and a compatible JVM be used.
Riak's internal solr use localhost and 127.0.0.1 as default host. So it should have defined in /etc/hosts file:
127.0.0.1 localhost
FYI, if you use windows your hosts file location could be different.

Resources