When I run systemctl status mssql-server.service,there are no errors reported,Active is active(running)
mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-11-18 10:16:13 CST; 32s ago
Docs: https://learn.microsoft.com/en-us/sql/linux
Main PID: 478033 (sqlservr)
Tasks: 34
Memory: 1.5G
CGroup: /system.slice/mssql-server.service
├─478033 /opt/mssql/bin/sqlservr
└─478037 /opt/mssql/bin/sqlservr
11月 18 10:16:13 systemd[1]: mssql-server.service: Main process exited, code=exited, status=1/FAILURE
11月 18 10:16:13 systemd[1]: mssql-server.service: Failed with result 'exit-code'.
11月 18 10:16:13 systemd[1]: Stopped Microsoft SQL Server Database Engine.
11月 18 10:16:13 systemd[1]: mssql-server.service: Found left-over process 478029 (sh) in control group while starting unit. Ignoring.
11月 18 10:16:13 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
11月 18 10:16:13 systemd[1]: mssql-server.service: Found left-over process 478031 (tar) in control group while starting unit. Ignoring.
11月 18 10:16:13 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
11月 18 10:16:13 systemd[1]: mssql-server.service: Found left-over process 478032 (bzip2) in control group while starting unit. Ignoring.
11月 18 10:16:13 systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
11月 18 10:16:13 systemd[1]: Started Microsoft SQL Server Database Engine.
but ,when I try to connect local service by sqlcmd sqlcmd -S localhost -U SA -p
i got
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
understand, SQLServer has benn started, but can`t connect.
Another question, in the /var/opt/mssql/log path, generated many log file
enter image description here
Related
enter image description here
I am trying to install netboxtool but when i try to start postgesql it giving me below errors.Selinux already disabled.
[1][root#it ~]# systemctl start postgresql-13 Job for postgresql-13.service failed because the control process exited with error code. See "systemctl status postgresql-13.service" and "journalctl -xe" for details. [root#it ~]# journalctl -xe -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit session-6.scope has finished starting up.
-- The start-up result is done. Apr 09 19:32:45 it sshd[2686]: pam_unix(sshd:session): session opened for user root by (uid=0) Apr 09 19:32:45 it systemd-logind[641]: New session 6 of user root. -- Subject: A new session 6 has been created for user root -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-- A new session with the ID 6 has been created for the user root.
-- The leading process of the session is 2686. Apr 09 19:32:50 it polkitd[1383]: Registered Authentication Agent for unix-process:2714:612049 (system bus name :1.38 [/usr/bin/pkttyagent --notify-fd 5 --fallbac Apr 09 19:32:50 it systemd1: Starting PostgreSQL 13 database server... -- Subject: Unit postgresql-13.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit postgresql-13.service has begun starting up. Apr 09 19:32:50 it postgresql-13-check-db-dir[2720]: "/var/lib/pgsql/13/data/" is missing or empty. Apr 09 19:32:50 it postgresql-13-check-db-dir[2720]: Use "/usr/pgsql-13/bin/postgresql-13-setup initdb" to initialize the database cluster. Apr 09 19:32:50 it postgresql-13-check-db-dir[2720]: See /usr/share/doc/postgresql13-13.6/README.rpm-dist for more information. Apr 09 19:32:50 it systemd1: postgresql-13.service: control process exited, code=exited status=1 Apr 09 19:32:50 it systemd1: Failed to start PostgreSQL 13 database server. -- Subject: Unit postgresql-13.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit postgresql-13.service has failed.
-- The result is failed. Apr 09 19:32:50 it systemd1: Unit postgresql-13.service entered failed state. Apr 09 19:32:50 it systemd1: postgresql-13.service failed. Apr 09 19:32:50 it polkitd[1383]: Unregistered Authentication Agent for unix-process:2714:612049 (system bus name :1.38, object path /org/freedesktop/PolicyKit1/A lines 2130-2166/2166 (END)
The error states that the default data directory /var/lib/pgsql/13/data is missing. Check if that exists and create it.
I installed Apache2 on Raspberry Pi4 B but it is not starting. If anyone had the same issue, please let me know the solution.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-06-07 21:07:32 EEST; 22ms ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 30140 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)
Jun 07 21:07:32 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Jun 07 21:07:32 raspberrypi apachectl[30140]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 07 21:07:32 raspberrypi apachectl[30140]: Action 'start' failed.
Jun 07 21:07:32 raspberrypi apachectl[30140]: The Apache error log may have more information.
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=127/n/a
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 07 21:07:32 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Problem solved with:
sudo apt install --reinstall apache2-bin
sudo service apache2 start
I am running SQL server on ubuntu 18.04 which I was able to connect to successfully via SSMS. But I am not able to connect anymore.
My first instinct was to check if the SQL server was running by executing
sudo systemctl status mssql-server
lo and behold the SQL server instance was active so I rebooted the entire server and ran the above command again and saw the following:
mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-10-16 16:49:17 UTC; 1min 13s ago
Docs: https://learn.microsoft.com/en-us/sql/linux
Process: 1025 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=1/FAILURE)
Main PID: 1025 (code=exited, status=1/FAILURE)
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Scheduled restart job, restart counter is at 3.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: Stopped Microsoft SQL Server Database Engine.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Start request repeated too quickly.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Oct 16 16:49:17 lamp-xxxxx systemd[1]: Failed to start Microsoft SQL Server Database Engine.
I checked the logs at /var/opt/mssql/log/errorlog and found this .
2019-10-14 13:52:56.16 spid51 CImageHelper::Init () Failed load of
symbol file with path = /binn/;/BINN - Not enough storage is available to
process this command.
2019-10-14 13:52:56.17 spid51 CImageHelper::Init () Failed load of
symbol file with path = /binn/;/BINN - Not enough storage is available to process this command.
2019-10-14 13:52:56.19 spid51 Error: 19099, Severity: 16, State: 1.
2019-10-14 13:52:56.19 spid51 Trace ID '1' was stopped because of an error. Cause: 0x80070005(Access is denied.). Restart the trace after correcting the problem.
2019-10-14 13:52:56.20 spid51 Error: 17053, Severity: 16, State: 1.
2019-10-14 13:52:56.20 spid51 FCB::MakePreviousWritesDurable: Operating system error (null) encountered.
2019-10-14 13:52:56.21 spid51 Error: 9001, Severity: 21, State: 1.
2019-10-14 13:52:56.21 spid51 The log for database 'master' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.
2019-10-14 13:52:56.24 spid51 Error: 9001, Severity: 21, State: 16.
I'm not an expert and don't know the next move to make.
So the reason for this error was getting was because I messed up with the file ownership..
running the following command fixed it for me too bad I spend so much time on this:
cd /var/opt
sudo chown mssql:mssql -R mssql
time to take that dump :-D.
Every time i checked the MSSQL service is failing i have over 5 GB memory on my virtual server. I have changed the sql port to 1533.
r*****k:~# sudo systemctl status mssql-server
● mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Fri 2017-11-17 15:39:39 UTC; 1min 37s ago
Process: 4906 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=255)
Main PID: 4906 (code=exited, status=255)
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Unit entered failed state.
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.
Nov 17 15:39:39 SV0*****.com systemd[1]: Stopped Microsoft SQL Server Database Engine.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Start request repeated too quickly.
Nov 17 15:39:39 SV0*****.com systemd[1]: Failed to start Microsoft SQL Server Database Engine.
r*****k:/var/opt/mssql# cat mssql.conf
> [EULA] accepteula = Y</br>
>
> [network] ipaddress = 6*.*1.1*2.*8 kerberoskeytabfile =
> /var/opt/mssql/secrets/mssql.keytab tcpport = 1533
>
> [memory] memorylimitmb = 3328
>
> [filelocation] defaultdatadir = /tmp/data
Anyone can help to stable the mssql service on the vm.
Does your Ubuntu server have the firewall enabled? If so, it may be blocking port 1533, which is preventing the service from starting on that custom port.
You may want to look in /var/log/messages for additional information as well.
I have installed MSSSQL on Centos 7. Installation is completed but when I am a connection to the SQL via sqlcmd It is giving the following error.
[root#S*03****k ~]# sqlcmd -S 127.0.0.1 -U sa -P H*****3
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
root#S*****k ~]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 699/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 793/master
tcp6 0 0 :::80 :::* LISTEN 704/httpd
tcp6 0 0 :::22 :::* LISTEN 699/sshd
Can anyone help?
After wasting so many days i have come to know that this happens due to Stopped SQL Service. I have tried to start but some how this is not get up.
Every time i checked the MSSQL service is failing i have over 5 GB memory on my virtual server.
r*****k:~# sudo systemctl status mssql-server
● mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Fri 2017-11-17 15:39:39 UTC; 1min 37s ago
Process: 4906 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=255)
Main PID: 4906 (code=exited, status=255)
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Unit entered failed state.
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.
Nov 17 15:39:39 SV0*****.com systemd[1]: Stopped Microsoft SQL Server Database Engine.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Start request repeated too quickly.
Nov 17 15:39:39 SV0*****.com systemd[1]: Failed to start Microsoft SQL Server Database Engine.
Finally, i have created a new virtual machine and SQL Service is working fine. SQL Databases are working as expected.