Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in step 6: Create plan #14

Closed
jack-solutions opened this issue Aug 24, 2015 · 48 comments
Closed

issue in step 6: Create plan #14

jack-solutions opened this issue Aug 24, 2015 · 48 comments

Comments

@jack-solutions
Copy link

I've done configuration upto step 5. but in step 6 whenever i try to Create template DB then new window will open and it gives 404 not found error.
odoo log:
2015-08-24 07:54:43,938 30006 INFO odoo.local werkzeug: 127.0.0.1 - - [24/Aug/2015 07:54:43] "GET /oauth2/auth?scope=userinfo+force_login+trial+skiptheuse&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+%22Asia%2FCalcutta%22%2C+%22d%22%3A+%22t1.odoo.local%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&redirect_uri=http%3A%2F%2Fs1.odoo.local%3A80%2Fsaas_server%2Fnew_database&response_type=token&client_id=1b62941e-4a35-11e5-b08b-00e04c049539 HTTP/1.1" 302 -
2015-08-24 07:54:43,954 30006 INFO None werkzeug: 127.0.0.1 - - [24/Aug/2015 07:54:43] "GET /saas_server/new_database HTTP/1.1" 404 -

@yelizariev
Copy link
Contributor

Are you sure, that you set Database Name for saas server?
Which link (with domain) do you see in your browser, when get 404 error.

I close the issue. If it happens, that you configure system properly, I would reopen it.

@jack-solutions
Copy link
Author

"Are you sure, that you set Database Name for saas server?"
-what kind of database name? and where will i set?
-when i click on create template db in Plans(step 6) then it will give 404 error.

following are the screenshots of my configuration.
server database (s1.odoo.local):
providers - odoo 2015-08-24 15-16-20

Portal setting:
saas portal settings - odoo 2015-08-24 15-18-43

Registering Server Database in Main Database:
servers - odoo 2015-08-24 15-20-02

Create plan:
plans - odoo 2015-08-24 15-21-25

@yelizariev
Copy link
Contributor

Do you have dbfilter=%h in configuration file?

@jack-solutions
Copy link
Author

yes
i've did that changed in odoo/openerp/tools/config.py

group.add_option("--db-filter", dest="dbfilter", my_default='%h',help="Filter listed database", metavar="REGEXP")

originally it was my_default='.*'

@yelizariev
Copy link
Contributor

Try to run with --db-filter=%h instead
./odoo.py --db-filter=%h ...

@jack-solutions
Copy link
Author

already tried but got this:
2015-08-24 10:26:00,442 7286 ERROR None openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 1413, in _dispatch_nodb
func, arguments = self.nodb_routing_map.bind_to_environ(request.httprequest.environ).match()
File "/usr/lib/python2.7/dist-packages/werkzeug/routing.py", line 1433, in match
raise NotFound()
NotFound: 404: Not Found

@yelizariev
Copy link
Contributor

show me screenshot of 404 error in browser with url address

@yelizariev
Copy link
Contributor

Also, be sure, that you do this from step 5

click [Open Server]. Be sure that you allow pop-ups in your browser.
log out from SaaS Server
click "Log in via SaaS Portal"

@yelizariev
Copy link
Contributor

You have to use
./odoo.py --db-filter=%h
and database name (i.e. one that you specify at /web/database/manager) for server should be
s1.odoo.local

@jack-solutions
Copy link
Author

In step 5 as you have mention to do following steps:
click [Open Server]. Be sure that you allow pop-ups in your browser.
log out from SaaS Server
click "Log in via SaaS Portal"
now yesterday when i am trying to login via saas portal it gives 404 error.
but now it gives access denied error.
login localhost 2015-08-25 09-53-45

also i want to know that where should i install saas_client module. i think it should be installed in s1.odoo.local(server database).

@yelizariev
Copy link
Contributor

saas_client is installed automatically.

@yelizariev
Copy link
Contributor

Have you installed saas_portal module on s1.odoo.local?

@yelizariev
Copy link
Contributor

ok, I guess you do

@yelizariev
Copy link
Contributor

Which version do you use?
Check OAuth tab in Administration user form in s1.odoo.local
You have to have OAuth User ID = 1 and
OAuth Provider = SaaS

Do you use everywhere Administration login?

@jack-solutions
Copy link
Author

in which module you have given saas_client dependency. because in my case it was not installed automatically. and also why i am getting Access denied error while login via saas portal.

@yelizariev
Copy link
Contributor

saas_client will be installed when you create Client Database

@jack-solutions
Copy link
Author

Have you installed saas_portal module on s1.odoo.local?
-That means i have to install saas_server and saas_portal modules in s1.odoo.local and saas_portal and saas_portal_* modules in odoo.local database.

saas_client will be installed when you create Client Database
-How can i create client database.
i have tried by clicking create button in s1,odoo.local database under Saas Server / SaaS/ database.
but those fields have access issue(for admin user).
databases - odoo 2015-08-25 10-41-09

Check OAuth tab in Administration user form in s1.odoo.local
You have to have OAuth User ID = 1 and
OAuth Provider = SaaS
see the following screenshot.
users - odoo 2015-08-25 10-45-20

@yelizariev
Copy link
Contributor

Sorry, it was typo. It should be

Have you installed saas_server module on s1.odoo.local?

@jack-solutions
Copy link
Author

yes

@yelizariev
Copy link
Contributor

How can i create client database.

You have to create database template first

@jack-solutions
Copy link
Author

from where? saas server (s1.odoo.local)

@yelizariev
Copy link
Contributor

We've updated saas_portal, so now there is no extra steps below in step 5.

Update saas_portal and create new Plan

@yelizariev
Copy link
Contributor

from where? saas server (s1.odoo.local)

via "Create client" button on Plan's form

@yelizariev
Copy link
Contributor

little mistake:

Update saas_portal and create new Server

@jack-solutions
Copy link
Author

-still login via saas portal gives Access Denied.

-don't know why but saas_client is still not installed. my question is where can i install it manually. (either in saas server or saas portal, i guess it should be installed in saas server(s1.odoo.local))

-after saving plan when i click on create client gives this error:

screenshot from 2015-08-25 14 03 00

Traceback (most recent call last):
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/home/mrugank/odoo-dev/odoo/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/home/mrugank/odoo-dev/odoo/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/home/mrugank/odoo-dev/odoo/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 363, in old_api
result = method(recs, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo-saas/saas_portal/models/wizard.py", line 114, in apply
url = wizard.plan_id._create_new_database(dbname=wizard.name, partner_id=wizard.partner_id.id)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 398, in new_api
result = [method(rec, _args, *_kwargs) for rec in self]
File "/home/mrugank/odoo-dev/odoo-saas/saas_portal/models/saas_portal.py", line 200, in _create_new_database
server.action_sync_server()
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 239, in wrapper
return new_api(self, _args, *_kwargs)
File "/home/mrugank/odoo-dev/odoo/openerp/api.py", line 398, in new_api
result = [method(rec, _args, *_kwargs) for rec in self]
File "/home/mrugank/odoo-dev/odoo-saas/saas_portal/models/saas_portal.py", line 117, in action_sync_server
data = simplejson.loads(res.text)
File "/usr/lib/python2.7/dist-packages/simplejson/init.py", line 488, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 389, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@yelizariev
Copy link
Contributor

-after saving plan when i click on create client gives this error:

you have to create template first.

It's issue, that Create Client is visible for Plan without template. We will fix it (cc @kaerdsar )

@yelizariev
Copy link
Contributor

-still login via saas portal gives Access Denied.

You don't need to login via saas if you updated saas_portal

You should click "Create Template".

@jack-solutions
Copy link
Author

-You should click "Create Template".
after updating saas_portal i have followed updated step 5.
but if i click on create template db it gives :

screenshot from 2015-08-25 15 09 32

with this url : http://s1.odoo.local/saas_server/new_database#access_token=juX1YvAY2NuyEcHHDQV3q9SPqbL4TE&token_type=Bearer&state=%7B%22lang%22%3A+%22en_US%22%2C+%22tz%22%3A+%22Asia%2FCalcutta%22%2C+%22d%22%3A+%22t1.odoo.local%22%2C+%22demo%22%3A+0%2C+%22is_template_db%22%3A+1%2C+%22addons%22%3A+%5B%5D%7D&expires_in=3600&scope=userinfo+force_login+trial+skiptheuse

-whatever i've tried yet(for create template) it gives 404 error.
-please also help: where can i install saas_client module.

Thank you for your help.

@yelizariev
Copy link
Contributor

-please also help: where can i install saas_client module.

saas_client is useless, if you have issue with s1.odoo.local

@yelizariev
Copy link
Contributor

@jack-solutions contact me on hangouts: https://plus.google.com/+IvanYelizariev/

@yelizariev
Copy link
Contributor

So, the issue was in apache configuration.

@jack-solutions
Copy link
Author

yes, I've changed the apache config so that it will pass host header and it works. 👍
Thank you so much.

@yelizariev
Copy link
Contributor

Great, thank you for reporting. I've clarified description file according to your experience.

@infoelliex
Copy link

Hi Jack and Ivan,

I also have the same issue. How do you change the apache config to pass the host header to make it work?

I try modify the site-available/000-default.conf by adding

<VirtualHost :>
ProxyPreserveHost On

# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example: 
ProxyPass / http://0.0.0.0:8069/
ProxyPassReverse / http://0.0.0.0:8069/

ServerName localhost

I replace the 0.0.0.0 with ip address, adding different port, or add /saas_server etc and none of them work. I still getting the 404 not found. Please help. Thank you very much.

File "/odoo/custom/addons/saas_portal/models/saas_portal.py", line 292, in create_template
raise Warning(msg)
Warning: Status Code - 404
Reason - NOT FOUND

@infoelliex
Copy link

The 404 not found issue was due to my incorrect configuration on the /etc/hosts and nginx settings. Because of Ivan's advice, the 404 not found issue was resolved. Thank you very much.

@nhkhoaus
Copy link

hi Yelizariev
i install saas server and client, it ok,
i create :
database name : axx correspond domain name : axx.company.com
database name : bxx correspond domain name : bxx.company.com
........
when I enter website, outside the username and password, and then select database: axx, bxx ..
how to config for system auto select database correct, for example
axx.company.com -> axx
bxx.company.com -> bxx
...
user not select database
I use nginx

many thanks.

@soaprofessional
Copy link

soaprofessional commented Mar 19, 2017

Hi @yelizariev / @jack-solutions ,

I am facing the same issue of 404 error when clicking on the create template step.
Can you please share the fix for this? My host file looks like below and I have attached the nginx-config file
nginx.conf.docx

127.0.0.1 s1.odoo.local # portal
127.0.0.1 odoo.local # server
127.0.0.1 t1.odoo.local # template
127.0.0.1 client-1.odoo.local #client
127.0.0.1 localhost

@W360S
Copy link
Contributor

W360S commented Mar 19, 2017

You lost domain template when trying to add template.
you have to config every template you want on the host before generate them.
like: 127.0.0.1 your-template-name.com

@soaprofessional
Copy link

@W360S ,

I am following the manual installation instruction as per https://github.com/it-projects-llc/odoo-saas-tools/blob/10.0/docs/install.rst
I did add the template in the host file (127.0.0.1 client-1.odoo.local) and followed the instructions till step 5 as per the above installation guide . While creating the template DB (clicking "Create Template DB" button) , I am getting 404 error jst like what @jack-solutions was getting. Any help to fix this will be highly appreciated.

@W360S
Copy link
Contributor

W360S commented Mar 20, 2017

ad my skype at: live:chaulb i may help.

@soaprofessional
Copy link

Nevermind, I fixed the 404 issue. The problem was with the db filter in /etc/odoo/odoo.conf file .
I had below configuration in odoo.conf:
; dbfilter = .*
dbfilter = ^%h$

I deleted the first dbfilter line (; dbfilter = .*) and the space in the beginning of second line and the 404 error was gone.

@W360S
Copy link
Contributor

W360S commented Mar 20, 2017

nice

yelizariev pushed a commit that referenced this issue Apr 27, 2017
@yelizariev
Copy link
Contributor

I made a blog post about dbfilter issue https://it-projects-llc.github.io/odoo-saas-tools/blog/reason-not-found

@Crux-un
Copy link

Crux-un commented Oct 15, 2017

does the odoo saas tools run on enterprise version of 10

@W360S
Copy link
Contributor

W360S commented Oct 16, 2017

ofcause no @Crux-un

@Crux-un
Copy link

Crux-un commented Oct 16, 2017

@W360S Is there a tutorial how to install saas with community, i get lots of errors and modules not found.. i downloaded the version on GitHub

@W360S
Copy link
Contributor

W360S commented Oct 16, 2017

@Crux-un you need to check carefully, learn one by one, step by step, saas is a good system but you cant be expert when the first time you meet :) same me from beginning.at the end if you can't setup ping me I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants