111 connection refused linux

111: соединение отказано

Когда я пытаюсь установить пакеты с помощью sudo apt-get install, независимо от того, что я пытаюсь установить, он возвращает ошибку 111: Соединение отказано.

Веб-браузер работает, но не sudo apt-get install. Я попытался установить инструменты Ruby, PHP и RHC с открытой сменой, а также попытался использовать Synaptic для обновления / установки пакетов, но мне это не удалось.

Я получаю ошибки, подобные следующим, каждый раз:

Я использую Ubuntu 14.04.1 LTS.

Я подключаюсь к своему маршрутизатору adsl по беспроводной сети и запускаю образ, полученный из моего университета, работающего на vmware, с использованием Windows 10. В университете использовался прокси-сервер, но я отредактировал его в файле настроек M2 и отредактировал firefox для автоматического определения прокси чтобы мой интернет заработал

Пожалуйста, может кто-нибудь помочь мне разобраться, как это исправить?

5 ответов

Посмотрите, есть ли в прокси /etc/apt/apt.conf (или где-то в /etc/apt/apt/apt.conf.d ).

Там будет файл со строкой что-то вроде: Acquire::http::Proxy «http://155.238.4.87:8080»;

Прокомментируйте строки, поставив # в начале и попробуйте еще раз.

Не удалось подключиться к хххх:8080

Подключение к IP:8080 указывает, что вы используете прокси.

Вот несколько предложений:

  • Проверить по: apt-config dump | grep -i proxy ,
  • Если прокси используется, отредактируйте /etc/apt/apt.conf файл или проверьте конфигурационные файлы в /etc/apt/apt.conf.d/ или найти по grep -ri proxy /etc/apt/ , затем настройте или удалите прокси.

Чтобы проверить прямое подключение к security.ubuntu.com , бежать:

Чтобы проверить соединение через прокси, запустите:

Отладить сеть для apt-get Команда, вы можете запустить:

Проверьте правила брандмауэра и конфигурацию сети.

Я решаю эту ошибку, удаляя настройки сети.

Если я увижу это

Я захожу в настройки системы сети и выбираю сеть, затем в раскрывающемся меню выберите » Метод прокси-сервера сети», выберите » Вручную», а затем УДАЛИТЕ все настройки. Нажмите Применить, чтобы сохранить сделанные вами настройки или настройки.

В терминале делаю

если нет вывода, вы закончили и можете apt-get update

Если вы используете версию Ubuntu WSL(Windows Subsystem для Linux), убедитесь, что у вас не включены сторонние антивирусы / брандмауэры.

Попробуйте деактивировать их и посмотрите, вернется ли соединение в нормальное состояние.

Известны проблемы, связанные со сторонними брандмауэрами, которые плохо работают с WSL.

См. WSL GitHub, выпуски 475 и 1720 для более подробной информации.

Первая проверка /etc/apt/apt.conf : если вы нашли Acquire::http::proxy «http://x.x.x.x:8080/» только что прокомментировал это с ( # ) в начале строки.

Тогда проверь /etc/environment : если вы нашли http_proxy=»http://x.x.x.x:8080/» только что прокомментировал это с ( # ) в начале строки.

Старый пост, я знаю, но была такая же проблема 18.04, и ни одно из найденных мной сообщений не имело решения, которое в конечном итоге сработало для нас. Добавляем в коллектив.

Без прокси / Без прокси. Пинг нормально. resolv.conf имеет только записи внутреннего сервера имен.

Проблема устранена путем удаления записи вручную:

Порт, к которому вы пытаетесь подключиться, не открыт на IP-адресе, к которому вы пытаетесь подключиться, по одной из следующих причин.

Вы подключаетесь к неправильному IP-адресу. Использовать nmap на сервере с именем хоста localhost ( nmap localhost ), чтобы проверить, правильно ли работает сервер на нужном вам порту, и на клиенте с общедоступным IP-адресом вашего сервера, чтобы проверить, открыт ли порт назначения.

Вы не смогли открыть порт на брандмауэре.

Ваша система настроена на использование локального HTTP-прокси для apt-соединений, и такой прокси не запущен. Многие компании и высшие учебные заведения имеют ограничения, в том числе политику контроля типов веб-сайтов, к которым вы можете получить доступ.

Источник

Решение проблемы с ошибкой Connection refused to MongoDB errno 111

Ошибка Connection refused to MongoDB errno 111 может появится в разных ситуациях, у неё могут быть различные причины. Поэтому рассмотрим разные варианты решения.

1. Удаление файла mongod.lock

Одной из вероятных причин может быть файл mongod.lock, который по каким-то причинам не был удалён программой автоматически. Вы можете сделать это и перезапустить службу (перезапуск службы показан на примере для Debian и производных):

2. Настройка bind_ip = localhost в /etc/mongod.conf

При внешнем подключении нужно обязательно в файле /etc/mongod.conf изменить значение директивы bind_ip на

Можно просто закомментировать эту строку.

Даже при внутреннем подключении может провялятся ошибка Connection refused to MongoDB errno 111, то попробуйте заменить bind_ip = localhost на

3. Нет места для размещения базы данных

Эта же самая ошибка может происходить по весьма тривиальной причине – недостаточно место для размещения БД. Проверить количество свободного пространства на жёстком диске можно командой:

Решением в этом случае является увеличение свободного места или перенос базы данных в другое место, для этого в файле /etc/mongodb.conf замените значение директивы

4. Неверные права на директорию /var/lib/mongodb

В некоторых ситуациях, к примеру, при переносе файлов БД на другой сервер и размещении их в каталог /var/lib/mongodb под учётной записью суперпользователя, может получится так, что владельцем каталога /var/lib/mongodb (в котором хранятся базы данных) будет не mongod. Чтобы это исправить нужно выполнить команды вида:

Если вы не меняли значение директории с БД по умолчанию, то команды будут такими:

5. Проблемы с SELinux

В этом случае вам должны помочь команды:

Возможно, здесь перечислены далеко не все причины ошибки «Connection refused to MongoDB errno 111», но, по крайней мере, рассмотрены самые частые с конкретными решениями.

Кстати, о том, как правильно делать резервные копии БД MongoDB можно почитать в официальной документации (на английском):

Источник

Linux Error 111: Connection refused

When attempting to start the listener you get an error like the one below.

Problem:

The hosts file does not contain the correct address or name for the server. This can also occur if the loopback address is not present. Edit /etc/hosts and verify that the host name and address are correct. Also verify that 127.0.0.1 localhost.localdoman localhost are present.

Save the changes and restart the listener.

Share this:

21 thoughts on “Linux Error 111: Connection refused”

It really worked. thanks a lot.

But can you tell me how the loop back entry in /etc/hosts relates to listener ?

hi,Thank you very much.

Really Itz good solution, it was worked and given results at the time of botttle neck.

Thank you very much.

After some googling I came accross this post. It helped me. For me the problem was the server on which the Oracle DB was installed was a VM and it was moved. So, had to change the ip address mention in the hosts file and it started working.
Thanks for the inputs.

This worked specially with copied VM where network settings needs to be rebuilt. Thank you!

Your suggestion to put in the lines in the /etc/host file:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

fixed the problem! Thanks!

This worked like a charm !!

Had i not read your post, it were going to be a huge challenge for me getting a workaround to this problem. I’ve spent a whole day trying to resolve this silly little issue – almost done every revamp possible but couldn’t overcome this problem. A big thanks to you, would you be able to shed some light as to why would we require uncommenting the loopback ? What kind of significance does it actually play ?

Thank you again.

Thanks for such a great solution. Saved my day 😀

Источник

Linux Error:111:Connection refused & Linux Error:29:Illegal seek

I have installed the rpm pack oracle-xe-univ-10.2.0.1-1.0.i386.rpm in Red Hat Enterprise Linux. I was able to install the rpm pack and am able to initiat sqlplus on the server and even run sql queries.
However i am facing the following issues:-
1) While browsing http://127.0.0.1:8090/apex for accessing the database home page i am getting the error message «The connection was refused when connecting to http://127.0.0.1:8090/apex» (i have mentioned 8090 as the HTTP port during configuration and this is the URL which was listed after the configuration).
2) I am unable to start the listerner service.

Please help me to resolve the above issues.

Following is the message while checking the listener status:-_

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHL-Research-001)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused

Following is the message while initiating a listener:-_

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=RHL-Research-001)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused

Following is the content of the listerner.ora file:-_

[[email protected] admin]# cat listener.ora
# listener.ora Network Configuration File:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = RHL-Research-001)(PORT = 1521))
)
)

Following is the content of /etc/hosts:-_

[[email protected] admin]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 RHL-Research-001 localhost.localdomain localhost
[[email protected] admin]#

Following is the pinging status:-_

[[email protected] admin]# ping RHL-Research-001
PING RHL-Research-001 (127.0.0.1) 56(84) bytes of data.
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=0 ttl=0 time=0.050 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=1 ttl=0 time=0.049 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=2 ttl=0 time=0.051 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=3 ttl=0 time=0.052 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=4 ttl=0 time=0.050 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=5 ttl=0 time=0.046 ms
64 bytes from RHL-Research-001 (127.0.0.1): icmp_seq=6 ttl=0 time=0.051 ms

— RHL-Research-001 ping statistics —
7 packets transmitted, 7 received, 0% packet loss, time 6016ms
rtt min/avg/max/mdev = 0.046/0.049/0.052/0.009 ms, pipe 2

Answers

post results from following command

Is any type of Operating System Virtualization installed on this system?

Thanks for the quick reply.

Following is the output of env|sort:-

[[email protected] admin]# env | sort
BASH_ENV=/root/.bashrc
_=/bin/env
COLORTERM=
DISPLAY=:0
G_BROKEN_FILENAMES=1
GDMSESSION=Default
GS_LIB=/root/.kde/share/fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
HISTSIZE=1000
HOME=/root
HOSTNAME=RHL-Research-001
INPUTRC=/etc/inputrc
KDE_MULTIHEAD=false
KONSOLE_DCOP=DCOPRef(konsole-16837,konsole)
KONSOLE_DCOP_SESSION=DCOPRef(konsole-16837,session-1)
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=root
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
OLDPWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/9844
SHELL=/bin/bash
SHLVL=3
SSH_AGENT_PID=9779
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-cvec9699/agent.9699
TERM=xterm
USERNAME=root
USER=root
XAUTHORITY=/root/.Xauthority
XMODIFIERS=@im=none

Please let me know how the issues can be fixed.

Indicates some sort of OS/Networking misconfiguration

When all else fails Read The Fine Manual

By the way, the manual above clearly states that you should NOT be logged onto the OS as user «root»!

Edited by: sb92075 on Feb 22, 2010 6:39 PM

This is a normal dedicated linux installation with no Operating System Virtualization. The OS user «Oracle» is the owner of the oracle software & while connecting to oracle i am doing the SU to change the user context.

Yes i have refered to the same document hosted at http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm and have strictly followed steps 4.1 & 4.3 (wherein it says to login with root permissions and install the software). However after doing the same i am unable to connect to http://127.0.0.1:8090/apex/ and further getting errors while starting the listener service.

The listener must be started by the «oracle» user

do the following & post the results

env | sort
lsnrctl start

Following is the output of the commands env|sort followed by lnsrctl start:-

bash-2.05b$ env|sort
BASH_ENV=/root/.bashrc
_=/bin/env
COLORTERM=
DISPLAY=:0
G_BROKEN_FILENAMES=1
GDMSESSION=Default
GS_LIB=/root/.kde/share/fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
HISTSIZE=1000
HOME=/usr/lib/oracle/xe
HOSTNAME=RHL-Research-001
INPUTRC=/etc/inputrc
KDE_MULTIHEAD=false
KONSOLE_DCOP=DCOPRef(konsole-9868,konsole)
KONSOLE_DCOP_SESSION=DCOPRef(konsole-9868,session-1)
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PWD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/9844
SHELL=/bin/bash
SHLVL=4
SSH_AGENT_PID=9779
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-cvec9699/agent.9699
TERM=xterm
USERNAME=root
USER=oracle
XAUTHORITY=/root/.Xauthority
XMODIFIERS=@im=none
bash-2.05b$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 — Production on 23-FEB-2010 08:25:33

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait.

TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek


The listener must be started by the «oracle» user
The listener must be started by the «oracle» user
The listener must be started by the «oracle» user
The listener must be started by the «oracle» user

do the following & post the results

env | sort
lsnrctl start

Still i am getting the same error.

I logged-in as oracle and ran the commands env|sort followed by lsnrctl start. Following is the output.

bash-2.05b$ env|sort
COLORTERM=
DISPLAY=:0
G_BROKEN_FILENAMES=1
GDMSESSION=Default
GS_LIB=/usr/lib/oracle/xe/.kde/share/fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/usr/lib/oracle/xe/.gtkrc:/usr/lib/oracle/xe/.gtkrc-kde
HISTSIZE=1000
HOME=/usr/lib/oracle/xe
HOSTNAME=RHL-Research-001
INPUTRC=/etc/inputrc
KDE_MULTIHEAD=false
KONSOLE_DCOP=DCOPRef(konsole-17943,konsole)
KONSOLE_DCOP_SESSION=DCOPRef(konsole-17943,session-1)
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=
MAIL=/var/spool/mail/oracle
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
PWD=/usr/lib/oracle/xe
SESSION_MANAGER=local/RHL-Research-001:/tmp/.ICE-unix/17894
SHELL=/bin/bash
SHLVL=3
SSH_AGENT_PID=17835
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-lrb17782/agent.17782
TERM=xterm
USERNAME=oracle
USER=oracle
_=/usr/bin/env
XAUTHORITY=/usr/lib/oracle/xe/.Xauthority
XMODIFIERS=@im=none
bash-2.05b$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 — Production on 23-FEB-2010 08:52:40

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait.

TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek

cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
mv listener.ora listener.ora.sav
lsnrctl start

CUT lines above & PASTE into terminal window owned by user «oracle»

CUT commands & results then PASTE back here

I had to re-install the linux server and install the oracle rpm again . resulting in delayed reply.

Currently still i am unable to access http://127.0.0.1:8090/apex. The following error message is being displayed
«The connection was refused when attempting to contact http://127.0.0.1:8090/apex»

However now the listener service has started successfully.

Following is the output of the command lsnrctl status:-

bash-2.05b$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 — Production on 24-FEB-2010 17:55:02

Copyright (c) 1991, 2005, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 — Production
Start Date 24-FEB-2010 17:35:26
Uptime 0 days 0 hr. 19 min. 36 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary.
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=selinux)(PORT=1521)))
Services Summary.
Service «PLSExtProc» has 1 instance(s).
Instance «PLSExtProc», status UNKNOWN, has 1 handler(s) for this service.
Service «XE» has 1 instance(s).
Instance «XE», status BLOCKED, has 1 handler(s) for this service.
Service «XE_XPT» has 1 instance(s).
Instance «XE», status BLOCKED, has 1 handler(s) for this service.
The command completed successfully

Following is the output of the command env|sort:-

Источник

Читайте также:  Изменить пароль пользователя windows 10 через реестр
Оцените статью