Oracle listener не запускается
Я пытаюсь запустить службу Oracle, но она не запускается. Он показывает мне:
Я выполняю следующую команду: sudo ./lsnrctl start
LSNRCTL для Linux: версия 11.2.0.2.0 - производство, 31 января 2017 г. 20:31:26
Авторское право (c) 1991, 2011, Oracle. Все права защищены.
Раньше он работал нормально, но после изменения имени системы перестал работать.
Я не согласен. Они могут быть установлены, но если это так, они не экспортируются или имеют неправильные значения. Сделайте export | grep ORA , проверьте, все ли есть, и исправьте. Если вы действительно уверены, что проблема не в этом, покажите фактическую команду, которую вы запускаете (возможно, вы пытаетесь запустить через sudo / su и теряете среду или что-то в этом роде).
7 Answers 7
Step 1: Check your ip address and copy it.
Step 2: Open (listener.ora) in notepad and replace the HOST ip address with your current ip address.That you copied earlier.
Note: Do not forget to replace the second entry of HOST ip.
Step 3: Now open (tnsnames.ora) with notepad and replace HOST ip address with your current ip address.
Finally start your listner service from windows services or from command prompt. Hope this will work. Worked for me.
This worked for me. i was starting the service second time after installation of DB server in my local setup. My Ip address was assigned dynamically by wifi router, and hence the ip address entry which worked first time did not work the next time i connected to the network. I changed the host as localhost instead of ipv4 address in both the .ora files and it worked! I also added hosts file entry for localhost. In windows 7 this path is in C:\Windows\System32\drivers\etc.
Open listener.ora file located at C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\
& then check computer name is same as in HOST attribute
Regards Irshad N
I fixed this issue by replacing the HOST values in the following two .ora files with "localhost". Change [username] to your username. The files may be in a different location on your computer.
Note that there is one change in listener.ora and two changes in tnsnames.ora.
After making the change, I rebooted my computer. I haven't had any problem since.
C:\app[username]\product\18.0.0\dbhomeXE\NETWORK\ADMIN\listener.ora DEFAULT_SERVICE_LISTENER = XE
C:\app[username]\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
При выполнении команды lsnrctl status я получаю следующие ошибки:
Он работал нормально до перезапуска, но теперь он не работает, и я также не могу получить доступ к своей домашней странице Oracle.
Мой listener.ora : (Здесь была ошибка из-за неуместных скобок, добавление нескольких пробелов решило проблему TNS-12518)
Ниже приводится вывод команды lsnrctl start .
Ниже приводится последняя необходимая запись из файла журнала.
Пытался разрешить TNS-12518, и слушатель запущен, но все еще не может получить доступ к домашней странице Oracle
Вывод lnsrctl stat
Команда успешно завершена
1. Проверьте переменные среды (должны быть установлены для System , а не для пользователя):
2. Проверьте правильность определения в listener.ora
3. перезапустите службу (Services> OracleServiceXE)
После этого вы можете увидеть новую службу OracleXETNSListenerXE.
Уже есть старый OracleXETNSListener.
Я запустил оба, а затем смог установить успешное соединение.
Если все работает, но вы по-прежнему не можете подключиться, проверьте, нет ли ошибки: ORA-12557: TNS: адаптер протокола не загружается .
У меня такая же проблема. Решение в моем случае: запустить CMD от имени АДМИНИСТРАТОРА. затем введите и выполните: "lsnrctl start" подождите около 2 минут, после чего все должно работать. (в моем случае было всего 50 секунд, но на всякий случай)
Я решил это, обновив файл listener.ora внутри каталога oracle oraclexe \ app \ oracle \ product \ 11.2.0 \ server \ network \ ADMIN.
Это случилось со мной из-за того, что я изменил имя своей системы, но внутри listener.ora было старое имя для HOST.
Это может быть одной из причин . для тех, кто все еще сталкивается с такой проблемой, тоже могут подумать об этой возможности.
Убедитесь, что переменная среды ORACLE_HOME указывает на правильный дом оракула. В моем случае это было изменено другой установкой программного обеспечения.
У меня возникла аналогичная проблема при установке oracle 11gR2 на сервер Windows 2012. проблема решается, когда я запускаю cmd.exe с правами администратора и запускаю «lsnrctl start LISTENER».
Я столкнулся с той же проблемой и причиной: у меня персональный ПК с Windows. И я изменил имя компьютера, и это не отразилось на listener.ora. Обновление ORACLE_HOME \ network \ ADMIN \ listener.ora с обновленным именем хоста устранило проблему.
В моем случае я попытался запустить слушатель через консоль:
Эта команда напечатала следующую ошибку:
Итак, я выполнил следующие действия:
- Проверьте, содержит ли файл Oracle listener.ora или sqlnet.ora специальные символы
- Проверьте, не имеет ли файл Oracle listener.ora или sqlnet.ora` неправильный формат или синтаксис
- Проверьте, есть ли в файле Oracle listener.ora или sqlnet.ora какие-нибудь выровненные по левому краю круглые скобки, которые не принимаются парсером Oracle.
Взгляните на эти файлы и проверьте правильный синтаксис. Если возможно, удалите / переименуйте sqlnet.ora и попробуйте перезапустить слушатель. Или удалите / переименуйте файл listener.ora или sqlnet.ora и заново создайте его должным образом. Это определенно решит проблему.
В моем случае каким-то образом служба слушателя Windows перестала работать, поэтому я не смог подключиться к Qracle с помощью SQL Developer. Однако мне удалось подключиться через sqlplus .
Ниже решение работало для меня:
Во-первых, убедитесь, что ваша служба прослушивателя запущена.
Если служба прослушивателя не запущена, перезапустите службу прослушивателя с помощью диспетчера задач Windows или используйте служебную программу командной строки DOS, чтобы перезапустить службу Windows с помощью команды net start :
Попробуйте запустить службу прослушивания, используя lsnrctl из командной строки DOS.
Мне удалось решить проблему, из-за которой произошел сбой конфигурации в контейнере докеров, на котором запущена песочница Hortonworks HDP 2.6.
Если первоначальная конфигурация не удалась, слушатель будет запущен, и его сначала нужно будет убить:
Следующим шагом будет решение проблемы с общей памятью, которая приводит к сбою процесса настройки.
Изменить / добавить строку в:
Затем перезагрузите конфигурацию:
Имейте в виду, что в следующий раз, когда вы перезапустите контейнер докеров, вам, возможно, придется выполнить команду «mount -a».
В моем случае служба прослушивателя не запускалась, потому что она была настроена на прослушивание VPN-соединения, а также других серверных интерфейсов.
Как только я подключился к VPN, он просто запустился.
Однако трюк @ Imre с "lsnrctl start" направил меня на верный путь.
Служба прослушивателя остановлена в services.msc .
Пароль пользователя был изменен.
В моем случае с Windows прослушиватель не запускался, и lsnrctl start зависал навсегда. Решением было убить все процессы extproc. Я подозреваю, что это было забавно связано с моим vpn
15 Answers 15
I had the same problem. Solution in my case: run CMD as ADMINISTRATOR. then type and execute: "lsnrctl start" wait about 2 minutes then should work. (in my case was only 50 seconds, but just to be on the safe side)
For me, lsnrctl start was hanging because I had an open connection and an uncommitted transaction in a database link/external heterogeneous connection. Once I closed it the listener started right up.
I had this problem again. I think this only happens if you have Oracle installed in Windows with Virtual user. At first everything will be fine but as soon as you edit the listener the problem will present itself. I think it's file ownership/permission issue. Once you edit (or replace) the file the Virtual oracle user probably no longer can access it which is why it only works when ran as Administrator (who has access to all files)
Thanks. That was the way for me to find out that there was an error when starting it. Windows was saying that "maybe no one needs this service so that is why it is not starting". Fixed the error, and then started ok.
3.Restart the service (Services > OracleServiceXE)
After that you may see a new service called OracleXETNSListenerXE.
There is already an old OracleXETNSListener.
I started both and then I was able to make a successful connection.
If everything is running but you still can't connect, check if there is no error: ORA-12557: TNS:protocol adapter not loadable.
To correct the error go back to the Environment variables and this time edit the one called: Path. Be sure that C:\oraclexe\app\oracle\product\11.2.0\server\bin is somewhere at the beginning, definitely before any other path pointing to a different version of the Oracle DB.
I am unable to restart/start/stop TNSListener service. I am getting following error:- "The OracleDb_10gTNSListener Service on local computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance logs and Alerts Service". Please help me
Actually I don't have the solution to this problem but most time I just try to restart it several times. Is the OracleService started?
3 Answers 3
try to run like
Please change the ORACLE_HOME,your_db_name value according to your environment
sudo su - oracle -c "ORACLE_SID=db_name; ORACLE_HOME=path; export ORACLE_SID ORACLE_HOME; export PATH=$ORACLE_HOME/bin:$PATH;$ORACLE_HOME/bin/lsnrctl start" No it is still not working
@NitinNandankar - just saying "not working" isn't very helpful - what happens now? (I would do sudo su oracle without the dash so it doesn't try to start a login shell; and also you may need to escape the $ , .i.e. to finish with . \$ORACLE_HOME/bin/lsnrctl start" - otherwise that will be interpreted before the sudo call, not within it.
If you want to keep running the listener as root, you can see the error messages using:
. which uses your starting (non-root) environment's $ORACLE_HOME ; otherwise you can set and use that value explicitly:
From chat that gets around the message error and shows you something more useful:
Your /etc/hosts file links your machine name sam.samson to localhost/127.0.0.1, and also from chat your listener contains:
As the error message refers to EXTPROC_FOR_XE, and removing that line apparently allows the TCP port to start, Oracle seems to have that linked to the old host name (which now doesn't resolve properly), or something along those lines. You could probably change the key name to something new, but removing it completely may be OK for you.
It isn't necessary, or really a good idea, to run any Oracle processes as root. It's normal to have a dedicated oracle account, and dba group. But you will have a lot of log files etc. that are now owned y root, so in order to change to run under a different account you would need to shut everything down, remove or change the ownership of all the relevant files, and then restart things under the right account.
Your database may continue to try to register against the old name. If lsnrctl services doesn't show the XE service, after starting the database or issuing alter database register , that may be the next problem. If you log in locally through SQL*Plus (by setting ORACLE_SID, not using a TNS alias) you can check what show parameters listener shows, and if LOCAL_LISTENER is referring to the old machine name, change it to match the new name. It may also be using a TNS alias for the listener, so make sure your tnsnames.ora is also up-to-date. Or it may now just work.
I am getting the following errors while from the lsnrctl status command:
It was working fine before restart but now it is not working and I also can't access my Oracle homepage.
My tnsnames.ora is:
My listener.ora is: (Here were error due to brackets misplaced adding few spaces resolved the problem TNS-12518)
Following is the output of lsnrctl start command
Following is the Last entry needed from log file.
Tried to resolve TNS-12518 and listener started but still not able to access Oracle home page
output of lnsrctl stat
T he command completed successfully
The error "no listener" is fairly self-explanatory isn't it? You don't have a listener running. Is it set up to start automatically on reboot? Has it tried to start but failed - does a manual lsnrctl start work? If it won't start then check the error message that gives and the listener log file.
Does the listener log show why it isn't starting? It'll be under somewhere like C:\app\PNA105\diag\tnslsnr\.
3 ответа
Попробуй бежать как
Измените значение ORACLE_HOME, your_db_name в соответствии с вашей средой
Sudo su - oracle -c "ORACLE_SID = db_name; ORACLE_HOME = path; export ORACLE_SID ORACLE_HOME; export PATH = $ ORACLE_HOME / bin: $ PATH; $ ORACLE_HOME / bin / lsnrctl start" Нет, он все еще не работает
- просто сказать «не работает» не очень полезно - что теперь происходит? (Я бы сделал sudo su oracle без тире, чтобы он не пытался запустить оболочку входа; а также вам может потребоваться экранировать $ , .ie, чтобы закончить с . \$ORACLE_HOME/bin/lsnrctl start" - в противном случае это будет интерпретироваться перед вызовом sudo, а не внутри него.
. который использует вашу начальную (некорневую) среду $ORACLE_HOME ; в противном случае вы можете явно установить и использовать это значение:
Ваш файл / etc / hosts связывает имя вашей машины sam.samson с localhost / 127.0.0.1, а также из чата, который ваш слушатель содержит:
Нет необходимости или действительно хорошей идеи запускать какие-либо процессы Oracle от имени пользователя root. Наличие выделенной учетной записи oracle и группы dba - это нормально. Но у вас будет много файлов журналов и т. Д., Которые теперь принадлежат корню y, поэтому для перехода к запуску под другой учетной записью вам нужно будет закрыть все, удалить или изменить владельца всех соответствующих файлов, а затем перезапустите вещи под правильной учетной записью.
Ваша база данных может продолжать попытки регистрации со старым именем. Если lsnrctl services не показывает службу XE после запуска базы данных или выдачи alter database register , это может быть следующей проблемой. Если вы входите в систему локально через SQL * Plus (установив ORACLE_SID, а не используя псевдоним TNS), вы можете проверить, что показывает show parameters listener , и если LOCAL_LISTENER ссылается на старое имя компьютера, измените его, чтобы оно соответствовало новое имя. Он также может использовать псевдоним TNS для прослушивателя, поэтому убедитесь, что ваш tnsnames.ora также обновлен. Или теперь это может просто работать.
I am trying to start my oracle service, but it is not starting. It is showing me :
Following command i am executing : sudo ./lsnrctl start
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 31-JAN-2017 20:31:26
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Message 1070 not found; No message file for product=network, facility=TNSTNS-12545: Message 12545 not found; No message file for product=network, facility=TNS TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS TNS-00515: Message 515 not found; No message file for product=network, facility=TNS Linux Error: 2: No such file or directory
Earlier it was working fine, but after chaning my system name, it stopped working.
Those messages usually mean you haven't set (and exported) ORACLE_HOME, and maybe other environment variables.
I disagree. They may be set, but if so are not exported, or are not set to the right values. Do export | grep ORA and check everything is there and correct. If you're really convinced that isn't the problem then show the actual command you run (maybe you're trying to run via sudo/su and losing the environment, or something).
Читайте также: