SAL OSX setup.

74 views
Skip to first unread message

inaky.m...@teamlewis.com

unread,
Jul 3, 2017, 8:58:18 AM7/3/17
to sal-discuss
Hi Guys,

I'm pretty new with SAL, and currently I'm trying to perform my first setup. Unfortunately at the moment, I'm always getting the next error code. Could you please take a look and let me know if you do have any idea? Many thanks in advance.


Environment:


Request Method: GET

Django Version: 1.10
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'sal',
 'server',
 'api',
 'catalog',
 'inventory',
 'licenses',
 'bootstrap3',
 'watson',
 'datatableview',
 'search')
Installed Middleware:
('django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'server.middleware.AddToBU.AddToBU',
 'search.current_user.CurrentUserMiddleware')



Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
  39.             response = get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py" in inner
  47.         return func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/views.py" in login
  87.     current_site = get_current_site(request)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/sites/shortcuts.py" in get_current_site
  15.         return Site.objects.get_current(request)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/sites/models.py" in get_current
  65.             return self._get_site_by_id(site_id)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/sites/models.py" in _get_site_by_id
  35.             site = self.get(pk=site_id)

File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py" in manager_method
  85.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in get
  379.         num = len(clone)

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in __len__
  238.         self._fetch_all()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in _fetch_all
  1085.             self._result_cache = list(self.iterator())

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in __iter__
  54.         results = compiler.execute_sql()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  833.         cursor = self.connection.cursor()

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py" in cursor
  231.             cursor = self.make_debug_cursor(self._cursor())

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py" in _cursor
  204.         self.ensure_connection()

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py" in ensure_connection
  199.                 self.connect()

File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py" in __exit__
  94.                 six.reraise(dj_exc_type, dj_exc_value, traceback)

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py" in ensure_connection
  199.                 self.connect()

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py" in connect
  171.         self.connection = self.get_new_connection(conn_params)

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/base.py" in get_new_connection
  176.         connection = Database.connect(**conn_params)

File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py" in connect
  164.     conn = _connect(dsn, connection_factory=connection_factory, async=async)

Exception Type: OperationalError at /login
Exception Value: could not connect to server: No route to host
Is the server running on host "172.17.0.2" and accepting
TCP/IP connections on port 5432?


Graham Gilbert

unread,
Jul 3, 2017, 10:16:33 AM7/3/17
to sal-d...@googlegroups.com
Firstly, running this on macOS is definitely not recommended. I have never run Sal in production on macOS.  Secondly you haven't said what steps you have taken. 

Sent from my iPhone

From: sal-d...@googlegroups.com <sal-d...@googlegroups.com> on behalf of inaky.m...@teamlewis.com <inaky.m...@teamlewis.com>
Sent: Monday, July 3, 2017 5:58:18 AM
To: sal-discuss
Subject: [sal-discuss] SAL OSX setup.
 
--
You received this message because you are subscribed to the Google Groups "sal-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sal-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

inaky.m...@teamlewis.com

unread,
Jul 3, 2017, 12:29:53 PM7/3/17
to sal-discuss
Hi Graham,

Thx for your reply. I've followed getting started instructions described for SAL on github https://github.com/salopensource/sal/wiki/Getting-Started to try getting up and running the tool. If you advise me try to build in on a Linux machine I'll try to get a VM.

Many Thanks, 

Iñaky

Ryan Snyder

unread,
Jul 3, 2017, 12:31:52 PM7/3/17
to sal-d...@googlegroups.com
I would suggest to use Docker. It is so easy to get going and manage.


Ryan

CONFIDENTIALITY NOTICE & ABUSE REPORTING:
This message and any attachments are confidential and may be protected by state and/or federal law. 

If you are not the named recipient of this message, you are hereby notified that any disclosure, copying,
distribution or use of this message or any attachment is prohibited.  If you have received this message in
error, please notify the sender immediately by replying to the sender and delete this copy from your system. 
Thank you for your cooperation.  If you would like to report an inappropriate message that was sent to you
please forward the message to em...@glenbard.org

Be Green Keep It On Screen - Do Not Print This Message

Graham Gilbert

unread,
Jul 3, 2017, 12:35:14 PM7/3/17
to sal-d...@googlegroups.com
Please don't use that repo, it's an old one. I should probably remove it. There is no longer a separate github repo for the Docker container. 

If you are using that getting started guide, I would suggest waiting a few minutes between starting the database and app containers. The error is that the app isn't able to connect to the database. 

Sent from my iPhone

From: sal-d...@googlegroups.com <sal-d...@googlegroups.com> on behalf of Ryan Snyder <Ryan_...@glenbard.org>
Sent: Monday, July 3, 2017 9:31:37 AM
To: sal-d...@googlegroups.com
Subject: Re: [sal-discuss] SAL OSX setup.
 
For more options, visit https://groups.google.com/d/optout.

inaky.m...@teamlewis.com

unread,
Jul 4, 2017, 2:33:59 AM7/4/17
to sal-discuss
Hi Ryan

Thx for your reply, I've used docker and followed, SAL "getting started guide stored on GitHub. Apparently my issue is related between DB connection and SAL.

Cheers,

Iñaky

To unsubscribe from this group and stop receiving emails from it, send an email to sal-discuss+unsubscribe@googlegroups.com.

inaky.m...@teamlewis.com

unread,
Jul 17, 2017, 5:32:01 AM7/17/17
to sal-discuss
Hi Graham,

Following your advises, I built the tool over a Linux OS, and everything is running smoothly. At the moment I'm not using puppet labs and I understand main plugins are developed for Puppet. Aren't they? Anyway thx a lot, for your replies and support with this lovely tool.
To unsubscribe from this group and stop receiving emails from it, send an email to sal-discuss+unsubscribe@googlegroups.com.

Graham Gilbert

unread,
Jul 17, 2017, 7:13:23 AM7/17/17
to sal-d...@googlegroups.com
Facter is separate from puppet. If you don’t want to use puppet, disable it’s launchdaemons

Sent from my iPhone

Sent: Monday, July 17, 2017 10:32:00 AM
To: sal-discuss
Reply all
Reply to author
Forward
0 new messages