Nice! Make sure you enable selinux again and do it properly, I’d be
supprised if there wasn’t any relevant booleans to get it working.

There really is no reason to run anything with selinux disabled :-)

On Fri, 24 Nov 2017 at 10:01, <[email protected]> wrote:

> That was it, thanks.
>
>
> On Friday, 24 November 2017 07:08:20 UTC, Ivan Necas wrote:
>
>> Seeing the facts, that the connection seems to work from scripts but not
>> from the service,
>> I would recommend trying `setenforce 0` for start to rule out SELinux
>> could be the case here
>>
>> -- Ivan
>>
>> čt 23. 11. 2017 v 20:57 odesílatel <[email protected]> napsal:
>>
>>> Hi, im running into this issue with foreman 1.15 and an external rds
>>> mysql database
>>>
>>> the installation from a fresh new ami:
>>>
>>> foreman-installer \
>>>   --foreman-db-type=mysql \
>>>   --foreman-db-host=host.us-west-2.rds.amazonaws.com \
>>>   --foreman-db-database=foreman \
>>>   --foreman-db-username=foreman \
>>>   --foreman-db-password=password
>>>
>>> I can telnet the db host from the server port 3306 and connect with the
>>> same credentials from /etc/foreman/database.yaml from the command line
>>> using the mysql command.
>>>
>>> The instalation does create the tables inside the database, so the
>>> connection can be possible from the host.
>>>
>>> after that::
>>>
>>> Web application could not be started
>>>
>>> Can't connect to MySQL server on 
>>> 'engineering.ctkb3rwlea2h.us-west-2.rds.amazonaws.com' (13) (Mysql2::Error)
>>>   
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:89:in
>>>  `connect'
>>>   
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:89:in
>>>  `initialize'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in
>>>  `new'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in
>>>  `mysql2_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in
>>>  `new_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in
>>>  `checkout_new_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in
>>>  `acquire_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in
>>>  `block in checkout'
>>>   /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in
>>>  `checkout'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in
>>>  `block in connection'
>>>   /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in
>>>  `connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in
>>>  `retrieve_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:113:in
>>>  `retrieve_connection'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:87:in
>>>  `connection'
>>>   
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/ancestry-2.2.1/lib/ancestry/has_ancestry.rb:46:in
>>>  `has_ancestry'
>>>   /usr/share/foreman/app/models/concerns/nested_ancestry_common.rb:7:in 
>>> `block in <module:NestedAncestryCommon>'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/concern.rb:120:in
>>>  `class_eval'
>>>   
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/concern.rb:120:in
>>>  `append_features'
>>>   /usr/share/foreman/app/models/taxonomy.rb:5:in `include'
>>>   /usr/share/foreman/app/models/taxonomy.rb:5:in `<class:Taxonomy>'
>>>   /usr/share/foreman/app/models/taxonomy.rb:1:in `<top (required)>'
>>>   
>>> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
>>>  `require'
>>>   /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/ker
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Foreman users" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>
>>
>>> Visit this group at https://groups.google.com/group/foreman-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to