Member since
β06-20-2017
12
Posts
0
Kudos Received
0
Solutions
β08-19-2017
04:41 AM
@Jasper THANKS for the hint! In fact it was missing from the HCP documentation. Important to mention the order in which it appears is crucial: here my yaml configuration file (spring section) that is finally working and I'm able to connect to metron UI π spring:
jpa:
database: MYSQL
hibernate:
ddl-auto: update
datasource:
platform: mysql
url: jdbc:mysql://myhost.localdomain:3306/metronrest
driverClassName: com.mysql.jdbc.Driver
username: metron
password: metron
Cheers! Frank.
... View more
β08-17-2017
08:16 PM
I have the same issue. even though I changed the spring configuration in application.yml to mysql I could still see the error referring to org.h2.jdbc.JdbcSQLException while my config in application.yml: spring:
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://myhost:3306/metronrest
username: metron
password: metron debugging log shows ... 2017-08-17T15:29:49.938 DEBUG [org.springframework.security.web.FilterChainProxy] - /api/v1/user at position 5 of 11 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
2017-08-17T15:29:49.938 DEBUG [org.springframework.security.web.authentication.www.BasicAuthenticationFilter] - Basic Authentication Authorization header found for user 'metron'
2017-08-17T15:29:49.938 DEBUG [org.springframework.security.authentication.ProviderManager] - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
2017-08-17T15:29:49.939 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - Executing prepared SQL query
2017-08-17T15:29:49.939 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - Executing prepared SQL statement [select username,password,enabled from users where username = ?]
2017-08-17T15:29:49.939 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Fetching JDBC Connection from DataSource
2017-08-17T15:29:49.940 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource
2017-08-17T15:29:49.940 DEBUG [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Translating SQLException with SQL state '42S02', error code '42102', message [Table "USERS" not found; SQL statement:
select username,password,enabled from users where username = ? [42102-192]]; SQL was [select username,password,enabled from users where username = ?] for task [PreparedStatementCallback]
2017-08-17T15:29:49.940 DEBUG [org.springframework.security.authentication.DefaultAuthenticationEventPublisher] - No event was found for the exception org.springframework.security.authentication.InternalAuthenticationServiceException
2017-08-17T15:29:49.940 DEBUG [org.springframework.security.web.authentication.www.BasicAuthenticationFilter] - Authentication request for failed: org.springframework.security.authentication.InternalAuthenticationServiceException: PreparedStatementCallback; bad SQL grammar [select username,password,enabled from users where username = ?]; nested exception is org.h2.jdbc.JdbcSQLException: Table "USERS" not found; SQL statement:
select username,password,enabled from users where username = ? [42102-192]
2017-08-17T15:29:49.940 DEBUG [org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint] - Trying to match using RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest] it seems it's still trying to use h2?
... View more
β07-31-2017
08:59 PM
Hi @asubramanian, have you encountered this issue before? when trying to connect to Metron UI it always fails with no detail other than the message "Login failed for metron" I can login to mysql using the metron metron username and pass. no issues Also in the HCP doc it is mentioned that to make sure http://METRON_HOST:8082/swagger-ui.html# in bk_installation pdf: 14.Make sure you can access the Swagger UI at http://host:port/swagger-ui.html#/.
The exposed REST endpoints can be accessed with the Swagger UI at http://host:port/
swagger-ui.html#/. The default port is 8082 but can be changed in the $METRON_HOME/
config/application.yml file by setting "server.port" to the desired port.
when I go to the url it asks for username and password. I assume it's metron credentials. but it's keeps poping the login box. If I cancel it, the landing page looks like this: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Mon Jul 31 16:55:39 EDT 2017
There was an unexpected error (type=Unauthorized, status=401).
PreparedStatementCallback; bad SQL grammar [select username,password,enabled from users where username = ?]; nested exception is org.h2.jdbc.JdbcSQLException: Table "USERS" not found; SQL statement: select username,password,enabled from users where username = ? [42102-192] I don't get it why it's complaining about h2.jdbc connection while I already change the connection detail to mysql in ../config/application.yml Any hint would be appreciated! Frank
... View more
β07-20-2017
10:35 PM
Hi Michel, I'm facing the same issue even when I'm trying to connect to Metron Management UI, it always gives me "Login failed for metron" and what is interesting is according to HCP install docs, when I test the swagger (http://:8082/swagger-ui.html#)>:8082/swagger-ui.html#) connection it asks for username and password and it keeps looping no matter what you enter. if I cancel the login pop-up I can see that it was trying to connect using org.h2.jdbc.JdbcSQLException despite that application.yml clearly is mentioned that mysql is used.
This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Jul 20 18:18:35 EDT 2017
There was an unexpected error (type=Unauthorized, status=401).
PreparedStatementCallback; bad SQL grammar [select username,password,enabled from users where username = ?]; nested exception is org.h2.jdbc.JdbcSQLException: Table "USERS" not found; SQL statement: select username,password,enabled from users where username = ? [42102-192]
Have you encountered anything like this? Thanks, Frank
... View more
β07-20-2017
03:33 PM
hi Balakrishna, I suggest you drop what you're doing with the community metron installation and go to https://docs.hortonworks.com/HDPDocuments/HCP1/HCP-1.1.0/index.html and follow instructions on installing HCP which is the HortonWorks cybersecurity package (latest Metron version) Although the installation is much faster and easier than the painful Metron-0.4.0, HCP does not install everything for you. there are a lot of manual steps to do afterward. Frank
... View more
β07-20-2017
03:25 PM
hi @asubramanian do you know how to troubleshoot the metron UI? because as I mention in my earlier comment to Michel, that I cannot login to my metron UI. I get the login page but when I punch metron metron as username and pass it says "Login failed for metron" Any help would be appreciated. Frank
... View more
β07-20-2017
03:20 PM
Michel, I have the same issues with the new HCP package. it seems it's missing a lot more that the previous way on installing Metron. I did rebuild my Metron installation with HCP and now I regret it! I cannot even login to Metron UI: it gives: "Login Failed for metron" all the Ambari "quick links" are not there obviously since you need to install them manually AFTER installing HCP. isn't HCP stands for the whole Cyber package?? Frank
... View more
β07-20-2017
03:11 PM
Hi @msumbul, @asubramanian, I had the same question and when you suggested doesn't work since both processes are not registered as services. since they are launched via nohup start_..... here what I get when I try it: $ service metron-rest stop Redirecting to /bin/systemctl stop metron-rest.service Failed to stop metron-rest.service: Unit metron-rest.service not loaded. $ service metron-rest start Redirecting to /bin/systemctl start metron-rest.service Failed to start metron-rest.service: Unit not found. Any suggestions? Frank
... View more
β06-21-2017
05:14 PM
For the records, for a more cleaner way, the issue was with SELinux set to enforcing disable it by running this as root: setenforce 0 then re-run : mvn clean install -DskipTests -PHDP-2.5.0.0
... View more
β06-20-2017
07:18 PM
Last attempt is to install and configure ambari agents manually which is very simple but when I start the agent I got this error: Verifying ambari-agent process status...
ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/am bari-agent.out:
====================
from resource_management.libraries.functions import *
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions /__init__.py", line 25, in <module>
from resource_management.libraries.functions.default import *
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions /default.py", line 24, in <module>
from resource_management.libraries.script import Script
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/__ init__.py", line 23, in <module>
from resource_management.libraries.script.script import *
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/sc ript.py", line 36, in <module>
from ambari_commons.constants import UPGRADE_TYPE_HOST_ORDERED
ImportError: cannot import name UPGRADE_TYPE_HOST_ORDERED
====================
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log Any idea??
... View more
β06-20-2017
03:10 PM
Thanks for your tips @Jay SenSharma In fact I did try it with and without DN. my /etc/hosts files are properly defined on all 3 servers. I don't have use a DNS the openssl test reveals that it's working. Even with just the ambari server name - not the FQDN. I'm suspecting the embedded DB is the cause. We I used mysql in the previous ambari version - 2.4.x it was working on this step of the process - Registering the hosts. So I changed to mysql , reset everything and retried in vain... Any suggestions please? Thanks!
... View more
β06-20-2017
04:59 AM
I recently installed 3 hosts centos7 from scratch to create a hadoop cluster using Ambari - latest 2.5.x ssh is checked. passwordless checked I'm using postgres db Ambari wizard: to when I click on Install options | 3 hosts | ssh key | Click 'Confirm Hosts' from the log: Command start time 2017-06-19 23:50:16
('WARNING 2017-06-19 20:35:35,699 NetUtil.py:93 - Failed to connect to https://ambarisrv:8440/connection_info due to [Errno 111] Connection refused
INFO 2017-06-19 20:35:35,700 security.py:100 - SSL Connect being called.. connecting to the server
ERROR 2017-06-19 20:35:35,701 Controller.py:415 - Unable to reconnect to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain (attempts=21, details=Request to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain failed due to [Errno 111] Connection refused)
INFO 2017-06-19 20:35:52,609 Controller.py:277 - Heartbeat with server is running...
INFO 2017-06-19 20:35:52,610 NetUtil.py:62 - Connecting to https://ambarisrv:8440/connection_info
WARNING 2017-06-19 20:35:52,612 NetUtil.py:93 - Failed to connect to https://ambarisrv:8440/connection_info due to [Errno 111] Connection refused
INFO 2017-06-19 20:35:52,612 security.py:100 - SSL Connect being called.. connecting to the server
ERROR 2017-06-19 20:35:52,613 Controller.py:415 - Unable to reconnect to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain (attempts=22, details=Request to https://ambarisrv:8441/agent/v1/heartbeat/host1.localdomain failed due to [Errno 111] Connection refused)
... if I do from host1: [root@host1 ~]# wget https://ambarisrv:8440
--2017-06-19 23:59:03 -- https://ambarisrv:8440/
Resolving ambarisrv (ambarisrv)... 192.168.xx.xx Connecting to ambarisrv (ambarisrv)|192.168.xx.xx|:8440... connected. ERROR: cannot verify ambarisrv's certificate, issued by β/C=XX/L=Default City/O=Default Company Ltdβ:
Self-signed certificate encountered. ERROR: certificate common name ββ doesn't match requested host name βambarisrv'. To connect to ambarisrv insecurely, use `--no-check-certificate'. #if I run it with --no-check-certificate, it works. [root@host1 ~]# wget https://ambarisrv:8440 --no-check-certificate
--2017-06-19 23:59:20-- https://ambarisrv:8440/
Resolving ambarisrv (ambarisrv)... 192.168.xx.xx Connecting to ambarisrv (ambarisrv)|192.168.xx.xx|:8440... connected.
WARNING: cannot verify shark's certificate, issued by β/C=XX/L=Default City/O=Default Company Ltdβ:
Self-signed certificate encountered.
WARNING: certificate common name ββ doesn't match requested host name βsharkβ.
HTTP request sent, awaiting response... 200 OK
Length: 0
Saving to: βindex.html.1β
[ <=> ] 0 --.-K/s in 0s
2017-06-19 23:59:20 (0.00 B/s) - βindex.html.1β saved [0/0] I'm sure it's not related to a server certificate or something of the likes I checked the agents have been installed on both hosts but it's failing on the registration It worked before I upgraded from Ambari 2.4. with 2.5 it seems to react differently??
Any thoughts on that?? Thanks!!!
... View more
Labels:
- Labels:
-
Apache Ambari