unrecognized service ubuntu что делать

unrecognized service when starting ssh

I’m trying to connect to a remote Ubuntu computer at work via SSH from my laptop running Ubuntu.

At first, I just tried running:

But nothing happened.

Searching for a tutorial on the net, I followed the instructions on this page

I suppose I need to activate the possibility for such a connection, so I typed in the terminal on my laptop

After typing my password, I received the following message:

I wish someone could help me understand what should be done for the SSH remote connection to work.

1 Answer 1

I’m assuming that you’ve already configured port forwarding and are able to get through to the machine at work.

Otherwise, even after following my answer, you won’t get very far.

The SSH server is not installed by default.

You will need to install it by running these commands in a terminal ( ctrl + alt + t ) on the machine you wish to connect to:

Then you will be able to connect normally by running:

However, in that state you have a security risk.

You need to harden it from the standard setup. I’ve gone through several suggestions on my blog but at the very least, I’d suggest:

They take about 10 minutes in total and you go from a 1/10000 chance of being broken in to a probability so small, there isn’t enough paper in the world to write its fraction. Assuming you’re careful with your key, it has a password of its own and you don’t trumpet your credentials all over the net.

Источник

sudo service mongodb restart gives «unrecognized service error» in ubuntu 14.0.4

I just installed mongoDB on ubuntu 14.0.4. I tried to start the shell but I’m getting a connection refused error.

So I decided to try to restart the service but that’s failing too. I get the following error message:

what i’ve tried so far:

I found another post here: can’t start mongodb as sudo which made a comment about remove the mongo lock file.

I deleted the lock file and then retried my command but it still fails as you can see below:

But I can start it using /etc/init.d as you can see below:

Any ideas on why I can’t start it using the service command would be appreciated. From what I’ve read, i should be using sudo service mongodb

11 Answers 11

Write mongodb instead of mongod

I got the same error one day You should use this:

1.Get the status of your mongo service:

2.If it’s not started repair it like this:

And check again if the service is started again(1)

For me the solution was to replace

You need to make sure the file (ex. /etc/init.d/mongodb) has execute permissions.

For debian, from the 10gen repo, between 2.4.x and 2.6.x, they renamed the init script /etc/init.d/mongodb to /etc/init.d/mongod, and the default config file from /etc/mongodb.conf to /etc/mongod.conf, and the PID and lock files from «mongodb» to «mongod» too. This made upgrading a pain, and I don’t see it mentioned in their docs anywhere. Anyway, the solution is to remove the old «mongodb» versions:

Now, look and see what config changes you need to keep, and put them in mongod.conf.

Читайте также:  Снится что копаю картошку к чему

I installed mongo server on Debian Jessie using manual from official site.

After looking into installed package contents, I noticed that it contains only Systemd service unit, but no SystemV init script:

But my system was running on SysV init:

So, there are 2 options now:

For me nothing have helped, I’ve ended up with a solution:

create /lib/systemd/system/mongod.service file with content

then start/stop commands should work

I think you may have installed the version of mongodb for the wrong system distro.

Take a look at how to install mongodb for ubuntu and debian:

I had a similar problem, and what happened was that I was installing the ubuntu packages in debian

If you’re on Ubuntu 16.04 and face the unrecognized service error, these instructions will fix it for you:-

Make sure to edit the version number with the appropriate latest version and save the file.

Let the installation complete.

Ubuntu 16.04 solution If you are using Ubuntu 16.04, you may run into an issue where you see the error mongodb: unrecognized service due to the switch from upstart to systemd. To get around this, you have to follow these steps.

Update apt with the command sudo apt-get update

Install the official MongoDB version from the standard repositories with the command sudo apt-get install mongodb in order to get the service set up properly

Remove what you just installed with the command sudo apt-get remove mongodb && sudo apt-get autoremove

Now follow steps 1 through 5 listed above to install MongoDB; this should re-install the latest version of MongoDB with the systemd services already in place. When you issue the command systemctl status mongodb you should see that the server is active.

Источник

sudo сервис mongodb перезапуск дает «unrecognized service error» в ubuntu 14.0.4

Я только что установил mongoDB на ubuntu 14.0.4. Я попытался запустить shell, но получил ошибку отказа в соединении.

Поэтому я решил попробовать перезапустить службу, но это тоже не удалось. Я получаю следующее сообщение об ошибке:

то, что я пробовал до сих пор:

Я нашел здесь еще один пост: can’t start mongodb as sudo, в котором был сделан комментарий об удалении файла блокировки mongo.

Я удалил файл блокировки, а затем повторил свою команду, но она все равно не работает, как вы можете видеть ниже:

Но я могу начать его с помощью /etc/init.d, как вы можете видеть ниже:

Любые идеи о том, почему я не могу запустить его с помощью команды service, будут оценены по достоинству. Из того, что я прочитал, я должен использовать sudo service mongodb

11 ответов

Напишите mongodb вместо mongod

Однажды я получил ту же ошибку, вы должны использовать это:

1.Get статус вашей службы mongo:

2.If он не начал ремонтировать его таким образом:

И проверьте еще раз, запущена ли служба снова(1)

Для меня решение состояло в том, чтобы заменить

Вам необходимо убедиться, что файл (например, /etc/init.d/mongodb) имеет разрешения на выполнение.

Для debian, из репо 10gen, между 2.4.x и 2.6.x, они переименовали сценарий инициализации /etc/init.d/mongodb в /etc/init.d/mongod, а файл конфигурации по умолчанию с /etc/mongodb.conf на /etc/mongod.conf, а также файлы PID и блокировки с «mongodb» на «mongod». Это сделало обновление болезненным, и я нигде не вижу упоминания об этом в их документах. В любом случае, решение состоит в том, чтобы удалить старые версии «mongodb»:

Читайте также:  к чему снится темненький мужчина

Теперь посмотрите и посмотрите, какие изменения конфигурации вам нужно сохранить, и поместите их в mongod.conf.

Для меня ничего не помогло, я пришел к решению:

создать файл /lib/systemd/system/mongod.service с содержимым

тогда команды start/stop должны работать

Изучив содержимое установленного пакета, я заметил, что он содержит только сервисный блок Systemd, но не сценарий инициализации SystemV:

Но моя система работала на SysV init:

Итак, теперь есть 2 варианта:

Я устанавливаю Mongodb в несколько раз в Ubuntu 15.04, но он не устанавливается должным образом, и mongo shell имеет ошибку :  mongo MongoDB shell version: 3.0.1 connecting to: test 2015-04-07T18:46:14.958+0430 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused.

Я думаю, что вы, возможно, установили версию mongodb для неправильного системного дистрибутива.

Посмотрите, как установить mongodb для ubuntu и debian:

У меня была аналогичная проблема, и произошло то, что я устанавливал пакеты ubuntu в debian

Это простое решение, которое сработало для меня с той же проблемой (я думаю): mv /var/lib/mongodb /var/lib/mongodb_backup mkdir /var/lib/mongodb chmod 700 /var/lib/mongodb chown mongodb:daemon /var/lib/mongodb systemctl restart mongodb or service mongod restart

Если вы находитесь на Ubuntu 16.04 и столкнулись с ошибкой непризнанной службы, эти инструкции исправят ее для вас:-

Обязательно отредактируйте номер версии с соответствующей последней версией и сохраните файл.

Дайте установке завершиться.

решение Ubuntu 16.04 Если вы используете Ubuntu 16.04, вы можете столкнуться с проблемой, в которой вы видите ошибку mongodb: непризнанная служба из-за переключения с upstart на systemd. Чтобы обойти это, вы должны выполнить следующие действия.

Обновите apt с помощью команды sudo apt-get update

Удалите то, что вы только что установили, с помощью команды sudo apt-get remove mongodb && sudo apt-get autoremove

Теперь выполните шаги 1-5, перечисленные выше, чтобы установить MongoDB; это должно переустановить последнюю версию MongoDB с уже установленными службами systemd. При выполнении команды systemctl status mongodb вы должны увидеть, что сервер активен.

Похожие вопросы:

Я пытаюсь установить bundle(bundle установки) в Ubuntu 14.0.4 установлен Ruby 1.8.7.And не удается установить bundle и отображается сообщение об ошибке: An error occurred while installing nokogiri.

У меня есть экземпляр AWS ubuntu, где я обновил а) версию ubuntu (до 16.04.2 с 16.04) и Б) версию mongoDB (до 3.4.3 с 3.2). Однако, когда я это сделал, mongoDB отключился от всех моих баз данных. Я.

Я устанавливаю Mongodb в несколько раз в Ubuntu 15.04, но он не устанавливается должным образом, и mongo shell имеет ошибку :  mongo MongoDB shell version: 3.0.1 connecting to: test.

У меня есть сервер ubuntu с nginx, rails, ruby, unicorn и capistrano, у меня все настроено, и нет никаких проблем при выполнении производство колпачков deploy:check но когда я выполнить.

Недавно вышло новое обновление к юбилейному обновлению Windows 10 включает в себя подсистему Linux на основе Ubuntu 14.04 и теперь я хочу, чтобы вся моя рабочая среда была в этой подсистеме Linux. Я.

Есть несколько сообщений, связанных с Mongodb 3.2, но когда я попытался установить 3.4, запуск не происходит. Вместо этого в файле журнала появляется необычная ошибка (показанная в самом конце.

Читайте также:  Мама что такое склероз

Источник

ZoneMinder Forums

Ubuntu 10.04 Desktop install-httpd unrecognized service SOLV

Ubuntu 10.04 Desktop install-httpd unrecognized service SOLV

Post by GrayBeardNerd » Tue Aug 30, 2011 3:17 am

I used the Wiki «Ubuntu 10.04 (Lucid Lynx) Desktop» install instructions and followed them exactly.

When I do the service httpd start, I get «httpd: unrecognized service»

Does this mean that there is something wrong with apache2?

I do a service zoneminder start and I can get the console (localhost/zm)

My camera shows up fine with XawTV

I’ve created a single local monitor with defaults including /dev/vedeo (0) and NTSC

On the ZM Console, I clink on Monitor-1 and get the window, but it always says, «Waiting for localhost. «

During the install when it said Starting web server apache2,
apache2: Could not reliably determine the server’s fully qualified domain name, using 127 0 1 1 for ServerName.

No crash messages from apache2.

My /etc/apache2/httpd.conf file is empty.

If I search the forum with «+httpd +unrecognized +service» I get one match with someone with a Fedora issue and a response to install apache2.

Google gives a bewildering variety of answers to the missing service. Apache org only has one hit on the search.

This is the fourth time I’ve formatted the disc and started the install. I don’t understand what I am doing different from the Wiki instructions.

Источник

дурацкий вопрос, но все же.

не отображается иконка сети на панели, то есть пока сеть не подключена иконка видна, как вот тут: http://itmages.ru/image/view/478023/7f1c0467

после подключения, на мести иконки остается пустота: http://itmages.ru/image/view/478027/335ecd36

система mint 12 lxde, пробовал менять тему иконок, а так же удалять и снова добавлять апплет, не помогло.

ах да, еще этот глюк наблюдается в livecd

А в настройках ничего нет?

когда нажимаю на апплет, то там в выпадающем меню иконка уже есть, но почему то не могу сделать screenshot

Частый глюк gnome 2, у меня нечто подобное с обновлятором в Centos было. Забей.

Частый глюк gnome 2, у меня нечто подобное с обновлятором в Centos было. Забей.

У меня lxde. Ну если это частый глюк, то ладно, фиг с ним.

Если не поможет, то надо искать значки.

Если не поможет, то надо искать значки.

попробовал, пишет что-то странное: NetworkManager: unrecognized service

команда наверное должна быть: sudo service network-manager restart впрочем, это все равно не помогло(((

Возможно, в Mint’е оно называется несколько иначе: например, без больших букв.

Хинт: начинайте набирать название сервиса, а затем жмите ― должно сработать автодополнение.

Значит, нет нужного значка. Установите тему значков Tango: ЕМНИП, nm-applet по умолчанию должен подхватить их.

Значит, нет нужного значка. Установите тему значков Tango: ЕМНИП, nm-applet по умолчанию должен подхватить их.

Установил и выбрал тему иконок tango, перезагрузился, проблема осталось прежней. еще полазил в системных папках /usr/share/icons/Tango/22×22/status там все иконки есть.

Хм. А какая сейчас тема значков установлена?

Если какая-либо кастомная, то попробуйте установить Tango и [в случае фейла] повторите трюк с рестартом NetworkManager’а.

Хм. А какая сейчас тема значков установлена?

в Synaptic установил пакет: Tango icon theme, затем в настройках внешнего вида выбрал: Tango

повторите трюк с рестартом NetworkManager’а

Источник

Обзорно-познавательный сайт