Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

while restarting openerp server i got error: [Errno 98] Address already in use

By
Vaibhav
on 10/11/13, 2:56 PM 24,148 views

I have created 2 OpenERP instances in ubuntu 12.04 I have extracted openerp-7.0-latest.tar.gz this file 2 times as folder name openerp-7.0-test1 openerp-7.0-test2 I did changes in both config files having path openerp/tools/config.py I have changed only port numbers for test1 folder Port number is default 8069 and for test2 folder orinstance port number is 8099 when i have started openerp from test1 folder it is running fine. when i opened other terminal to run test2 instance it is showing me following error.

   user@ubuntu:~/openerp-7.0-test2$ ./openerp-server
   2013-10-11 16:11:47,496 15915 INFO ? openerp: OpenERP version 7.0-20130605-231041
  2013-10-11 16:11:47,496 15915 INFO ? openerp: addons paths: /home/user/openerp-7.0-test1/openerp/addons
 2013-10-11 16:11:47,496 15915 INFO ? openerp: database hostname: localhost
 2013-10-11 16:11:47,496 15915 INFO ? openerp: database port: 5432
 2013-10-11 16:11:47,496 15915 INFO ? openerp: database user: fabian
2013-10-11 16:11:47,956 15915 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-            Python/2.0.14` detected
 Exception in thread Thread-1:
 Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
   self.run()
 File "/usr/lib/python2.7/threading.py", line 504, in run
     self.__target(*self.__args, **self.__kwargs)
 File "/home/fabian/openerp-7.0-castel/openerp/service/wsgi_server.py", line 436, in serve
    httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 399, in make_server
    passthrough_errors, ssl_context)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 331, in __init__
     HTTPServer.__init__(self, (host, int(port)), handler)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
   self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
   SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
   self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
   return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

I have tried following command to change addons path but still it is showing me same error

  ./openerp-servver --addons=<path for test2 addons> --config=<path for config file of test2 instance>
3
Mayur Maheshwari
On 3/1/14, 3:06 AM

Easy and best way to resolve this error

Link : http://maheshwarimayur.blogspot.in/2013/02/socketerror-errno-98-address-already-in.html

give me up votes if answer helps you .

1
Jay Patel (jpa)
On 3/23/15, 5:23 AM

List of currently running services,

$ ps -ef

$ ps -ef | grep openerp-server 
Here I'm find services (name: openerp-server
$ ps -ef | grep openerp-server
pc       6399  2391  0 14:06 pts/1    00:00:02 python ./openerp-server
pc       7488  2391  0 14:39 pts/1    00:00:00 grep --color=auto openerp-server

Did you notice above result PID (6399) running openerp. Kill that service using following command,

 $ sudo kill -9 -6399 

Now services is completely stop, you can start again normally.




1

Atul Kumar jain

--Atul Kumar jain--
914
| 5 3 7
Indore, India
--Atul Kumar jain--

.

Atul Kumar jain
On 3/23/15, 6:31 AM

change the port by running  this command

     ./openerp-server --xmlrpc-port 8090


and if you are using configuration then add/edit

    xmlrpc_port = 8090



1

IBS

--IBS--
1302
| 4 5 8
Tétouan, Morocco
--IBS--

For more informations about IBS, please visit our website at www.ibs-na.com.

For a specific questions, collaboration or help, please send us an email to support@ibs-na.com

IBS
On 10/11/13, 3:34 PM

This openerp/tools/config.py is not the configuration file.

You need to create an actual configuration file named openerp-server.conf, here is a simple one: LINK to get started.

You can get details on individual config values here:

LINK

Run your server with argument -c openerp-server.conf

Also, this message means OpenERP is running already. It probably isn't running properly, but it is using the default ports. Kill this process if you want to start it properly

Bista Solutions US, Ray Carnes
on 10/11/13, 4:08 PM

I have tried same but i was not able to resolve same problem.

Vaibhav
on 10/16/13, 1:34 PM

So I have tried to change in other files and it works :path is as "openerp/service/wsgi_server.py". inthis file I have given port number hard coded.i have changed on line number 435 Existing line is port = config['xmlrpc_port'] and I have replaced it with port =8089 and it is working fine thank you

Vaibhav
on 10/16/13, 1:34 PM

is this a right way to do such things ?

Vaibhav
on 10/16/13, 1:38 PM
1
Ram Peri
On 3/1/14, 12:54 AM

Here are some basic commands you need to know.

ps -ef | grep openerp-server

This will show you all the instances of openerp that are already running.

When the server runs, it occupies a port (binds to port 8069) and if you try to run the server once more, you get this error.

Now, you will very likely see some output for the previous command which shows that the server is already running (if you have installed using sudo apt-get install openerp, the server is automatically started as a service for you)

use this command to stop the process (only if you really have to) kill <pid> where <pid> is the number you see in the first column of the command ps -ef ... above.

Now you can try starting the server once more.

0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 3/1/14, 6:25 AM

Hi;

[Errno98] means that a Port is already in use by another application !!!

The question is: Which Application and which port ???

This can be done as described by Ram perf (ps -ef | grep openerp-server).

You will probably found that it's openerp-server running on port 8069.

The second question now is: Why you are getting this [Error98] when starting the Second instance and not when starting the First instance ???

This is because when you started the first instance, the default port 8069 is Free ....

But, when you start the second instance the port 8069 is in use by the first instance.

Tthe Second question leads to a Third Question: Which port (we are talking about) ???

The port is: 8069 , Cause it' already in use by the first Instance (test1).

The next question (you may QUESTION , Mr Vaihbav) is: But I'm running the Second instance on port 8099 not on port 8069 ??

No Mr Vaihbab, you are running the second instance (test2) also on port 8069. Cause you did not changed the port of the second instance in the openerp-server.conf, and it's still using the default port 8069 !!!

What you should do now: Change the port of the second instance to 8099 in the server configuration file "openerp-server.conf" of the second instance.

You don't have to kill any other running process. Just re-start the second instance with the right config file on the right port.

If you do a Kill, you will kill the first instance, and i suppose that you need the 2 instances running.

If you want to verify, Take a look at your log file (or look in your console log), to see which port is already in use.

Last thing: The configuration of an OpenERP instance is entirely handled by the openerp-server.conf and by the parameters you pass to the server when starting from command line (Shell) or included in a script.

Best regards.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 10/11/13, 2:56 PM
Seen: 24148 times
Last updated: 3/23/15, 6:32 AM