[ 
https://issues.apache.org/jira/browse/MADLIB-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15863416#comment-15863416
 ] 

John Grant commented on MADLIB-1068:
------------------------------------

Thanks Satoshi. Couldn't figure out how to pass ?sslmode=disable in connection 
string to madpack so disabled SSL in the server configuration:

{code}
sudo -u postgres psql -c "SHOW ssl;"
 ssl
-----
 off
(1 row)
{code}

Uninstall, install and install-check via madpack again. No joy:

{code}
madpack -s madlib -c postgres@localhost -p postgres install-check
Password for user postgres:
madpack.py : INFO : Detected PostgreSQL version 9.6.
TEST CASE RESULT|Module: array_ops|array_ops.sql_in|PASS|Time: 341 milliseconds
TEST CASE RESULT|Module: bayes|gaussian_naive_bayes.sql_in|PASS|Time: 899 
milliseconds
TEST CASE RESULT|Module: bayes|bayes.sql_in|PASS|Time: 2694 milliseconds
TEST CASE RESULT|Module: crf|crf_train_small.sql_in|PASS|Time: 1567 milliseconds
TEST CASE RESULT|Module: crf|crf_train_large.sql_in|PASS|Time: 2946 milliseconds
TEST CASE RESULT|Module: crf|crf_test_small.sql_in|PASS|Time: 1427 milliseconds
TEST CASE RESULT|Module: crf|crf_test_large.sql_in|PASS|Time: 1495 milliseconds
madpack.py : ERROR : Failed executing 
/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp
madpack.py : ERROR : Check the log at 
/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.log
TEST CASE RESULT|Module: 
elastic_net|elastic_net_install_check.sql_in|FAIL|Time: 638 milliseconds
madpack.py : ERROR : SQL command failed:
SQL: DROP SCHEMA IF EXISTS madlib_installcheck_elastic_net CASCADE;
psql: FATAL:  the database system is in recovery mode

Traceback (most recent call last):
  File 
"/home/john/incubator-madlib-latest_release/build/src/bin/../madpack/madpack.py",
 line 1365, in <module>
    main(sys.argv[1:])
  File 
"/home/john/incubator-madlib-latest_release/build/src/bin/../madpack/madpack.py",
 line 1352, in main
    _internal_run_query("DROP SCHEMA IF EXISTS %s CASCADE;" % (test_schema), 
True)
  File 
"/home/john/incubator-madlib-latest_release/build/src/bin/../madpack/madpack.py",
 line 176, in _internal_run_query
    return run_query(sql, show_error, con_args)
  File 
"/home/john/incubator-madlib-latest_release/build/src/bin/../madpack/madpack.py",
 line 141, in run_query
    raise Exception
Exception
{code}

elastic_net_install_check.sql_in.log

{code}
-- Switch to test user:
SET ROLE madlib_191_installcheck;
SET
-- Set SEARCH_PATH for install-check:
SET search_path=madlib_installcheck_elastic_net,madlib;
SET
/* ------------------------------------------------------------------------
 * Install check for Elastic Net
 * ------------------------------------------------------------------------ */
DROP TABLE IF EXISTS lin_housing_wi;
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:12:
 NOTICE:  table "lin_housing_wi" does not exist, skipping
DROP TABLE
CREATE TABLE lin_housing_wi (id serial, x float8[],y float8);
CREATE TABLE
COPY lin_housing_wi (x, y) FROM STDIN NULL '?';
COPY 510
DROP TABLE IF EXISTS elastic_type_src;
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:527:
 NOTICE:  table "elastic_type_src" does not exist, skipping
DROP TABLE
CREATE TABLE elastic_type_src ( var_int int, var_float8 float8, var_sint 
smallint);
CREATE TABLE
COPY elastic_type_src (var_int, var_float8, var_sint) FROM stdin DELIMITER ',' 
NULL '?' ;
COPY 4
DROP TABLE IF EXISTS housing_test;
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:537:
 NOTICE:  table "housing_test" does not exist, skipping
DROP TABLE
CREATE TABLE housing_test (id serial, x float8[],y float8);
CREATE TABLE
COPY housing_test (x, y) FROM STDIN NULL '?';
COPY 9
DROP TABLE IF EXISTS housing_test_null;
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:551:
 NOTICE:  table "housing_test_null" does not exist, skipping
DROP TABLE
CREATE TABLE housing_test_null (id serial, x float8[],y float8);
CREATE TABLE
COPY housing_test_null (x, y) FROM STDIN NULL '?';
COPY 9
create function check_elastic_net ()
returns void as $$
begin
    EXECUTE 'drop table if exists house_en';
    PERFORM elastic_net_train(
        'lin_housing_wi',
        'house_en',
        'y',
        'x',
        'gaussian',
        1,
        0.2,
        True,
        NULL,
        'fista',
        '{eta = 2, max_stepsize = 0.5, use_active_set = f}',
        NULL,
        2000,
        1e-6
    );

    PERFORM assert(relative_error(log_likelihood, -14.41122) < 0.000001,
        'Elastic Net: log-likelihood mismatch (gaussian)!'
    ) from house_en;

    EXECUTE 'DROP TABLE IF EXISTS house_en_pred';
    PERFORM elastic_net_predict('house_en',
                                'lin_housing_wi',
                                'id',
                                'house_en_pred');

    EXECUTE 'DROP TABLE IF EXISTS house_test_gaussian';
    PERFORM elastic_net_predict('house_en',
                                'housing_test',
                                'id',
                                'house_test_gaussian');

        EXECUTE 'DROP TABLE IF EXISTS house_test_null_gaussian';
        PERFORM elastic_net_predict('house_en',
                                'housing_test_null',
                                'id',
                                'house_test_null_gaussian');

    -- huge lamda making all coef to be zeroes
    EXECUTE 'drop table if exists house_en';
    PERFORM elastic_net_train(
        'lin_housing_wi',
        'house_en',
        'y',
        'x',
        'gaussian',
        1,
        1e300,
        True,
        NULL,
        'fista',
        '{eta = 2, max_stepsize = 0.5, use_active_set = f}',
        NULL,
        2000,
        1e-6
    );

    EXECUTE 'DROP TABLE IF EXISTS house_en_pred';
    PERFORM elastic_net_predict('house_en',
                                'lin_housing_wi',
                                'id',
                                'house_en_pred');

    EXECUTE 'DROP TABLE IF EXISTS house_test_gaussian';
    PERFORM elastic_net_predict('house_en',
                                'housing_test',
                                'id',
                                'house_test_gaussian');

    EXECUTE 'DROP TABLE IF EXISTS house_test_null_gaussian';
        PERFORM elastic_net_predict('house_en',
                                'housing_test_null',
                                'id',
                                'house_test_null_gaussian');


    EXECUTE 'drop table if exists house_en';
    PERFORM elastic_net_train(
        'lin_housing_wi',
        'house_en',
        'y < 20',
        'x',
        'binomial',
        1,
        0.1,
        True,
        NULL,
        'fista',
        'eta = 2, max_stepsize = 0.5, use_active_set = f, random_stepsize = t',
        NULL,
        20000,
        1e-6
    );

    PERFORM assert(relative_error(log_likelihood, -0.542468) < 1e-4,
        'Elastic Net: log-likelihood mismatch (use_active_set = f)!'
    ) from house_en;

    EXECUTE 'DROP TABLE IF EXISTS house_test_binomial';
        PERFORM elastic_net_predict('house_en',
                                'housing_test',
                                'id',
                                'house_test_binomial');

        EXECUTE 'drop table if exists house_test_null_binomial';
        PERFORM elastic_net_predict('house_en',
                                'housing_test_null',
                                'id',
                                'house_test_null_binomial');


    EXECUTE 'drop table if exists house_en';
    PERFORM elastic_net_train(
        'lin_housing_wi',
        'house_en',
        'y < 20',
        'x',
        'binomial',
        1,
        0.1,
        True,
        NULL,
        'fista',
        'eta = 2, max_stepsize = 0.5, use_active_set = t, activeset_tolerance = 
1e-6, random_stepsize = t',
        NULL,
        20000,
        1e-6
    );

    PERFORM assert(relative_error(log_likelihood, -0.542468) < 1e-4,
        'Elastic Net: log-likelihood mismatch (use_active_set = t)!'
    ) from house_en;

    EXECUTE 'DROP TABLE IF EXISTS house_test_binomial';
        PERFORM elastic_net_predict('house_en',
                                'housing_test',
                                'id',
                                'house_test_binomial');

        EXECUTE 'drop table if exists house_test_null_binomial';
        PERFORM elastic_net_predict('house_en',
                                'housing_test_null',
                                'id',
                                'house_test_null_binomial');


    EXECUTE 'DROP TABLE IF EXISTS elastic_type_res';
    PERFORM elastic_net_train('elastic_type_src',
                'elastic_type_res',
                'var_int < 0',
                '*',
                'binomial',
                0.6,
                0.02,
                TRUE,
                NULL,
                'fista',
                '',
                '',
                10000,
                1e-6
        );

end;
$$ language plpgsql volatile;
CREATE FUNCTION
select check_elastic_net();
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:736:
 NOTICE:  table "house_en" does not exist, skipping
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:736:
 server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
psql:/tmp/madlib.hzYPIC/elastic_net/test/elastic_net_install_check.sql_in.tmp:736:
 connection to server was lost
{code}

Tried installing on a fresh Ubuntu 16.10 & default PostgreSQL 9.5 instance but 
MADlib would not compile. I think the newer C++ compiler is the problem.

To sanity check I'll try installing MADlib on Ubuntu 14.04.



> madpack install-check fails on PostgreSQL 9.6.2 & Ubuntu 16.04.2
> ----------------------------------------------------------------
>
>                 Key: MADLIB-1068
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1068
>             Project: Apache MADlib
>          Issue Type: Question
>          Components: Madpack
>            Reporter: John Grant
>         Attachments: elastic_net_install_check.sql_in.log
>
>
> I am installing MADlib from source and concerned about the errors *madpack 
> ... install-check* reports. Here are the commands used:
> {code}
> apt install postgresql-server-dev-9.6
> apt install postgresql-plpython-9.6
> apt install cmake g++ libkrb5-dev m4 libboost-dev
> git clone https://github.com/apache/incubator-madlib
> cd incubator-madlib
> ./configure
> cd build/
> make
> make install
> src/bin/madpack -s madlib -c postgres/*@localhost/revit -p postgres install
> ...
> ...
> ...
> madpack.py : INFO : MADlib 1.10.0 installed successfully in MADLIB schema.
> {code}
> Next I run *madpack ... install-check* but it fails. Should I be concerned or 
> is this possibly a bug? See attached log file:
> {code}
> root@pg203:/home/john/incubator-madlib/build# src/bin/madpack -s madlib -c 
> postgres/*@localhost/revit -p postgres install-check
> madpack.py : INFO : Detected PostgreSQL version 9.6.
> TEST CASE RESULT|Module: array_ops|array_ops.sql_in|PASS|Time: 303 
> milliseconds
> TEST CASE RESULT|Module: bayes|gaussian_naive_bayes.sql_in|PASS|Time: 862 
> milliseconds
> TEST CASE RESULT|Module: bayes|bayes.sql_in|PASS|Time: 2674 milliseconds
> TEST CASE RESULT|Module: crf|crf_train_small.sql_in|PASS|Time: 1725 
> milliseconds
> TEST CASE RESULT|Module: crf|crf_train_large.sql_in|PASS|Time: 2920 
> milliseconds
> TEST CASE RESULT|Module: crf|crf_test_small.sql_in|PASS|Time: 1377 
> milliseconds
> TEST CASE RESULT|Module: crf|crf_test_large.sql_in|PASS|Time: 1470 
> milliseconds
> madpack.py : ERROR : Failed executing 
> /tmp/madlib.erAH0G/elastic_net/test/elastic_net_install_check.sql_in.tmp
> madpack.py : ERROR : Check the log at 
> /tmp/madlib.erAH0G/elastic_net/test/elastic_net_install_check.sql_in.log
> TEST CASE RESULT|Module: 
> elastic_net|elastic_net_install_check.sql_in|FAIL|Time: 522 milliseconds
> madpack.py : ERROR : SQL command failed:
> SQL: DROP SCHEMA IF EXISTS madlib_installcheck_elastic_net CASCADE;
> psql: could not connect to server: Connection refused
>         Is the server running on host "localhost" (::1) and accepting
>         TCP/IP connections on port 5432?
> FATAL:  the database system is in recovery mode
> FATAL:  the database system is in recovery mode
> Traceback (most recent call last):
>   File "/home/john/incubator-madlib/build/src/bin/../madpack/madpack.py", 
> line 1574, in <module>
>     main(sys.argv[1:])
>   File "/home/john/incubator-madlib/build/src/bin/../madpack/madpack.py", 
> line 1505, in main
>     _internal_run_query("DROP SCHEMA IF EXISTS %s CASCADE;" % (test_schema), 
> True)
>   File "/home/john/incubator-madlib/build/src/bin/../madpack/madpack.py", 
> line 182, in _internal_run_query
>     return run_query(sql, show_error, con_args)
>   File "/home/john/incubator-madlib/build/src/bin/../madpack/madpack.py", 
> line 147, in run_query
>     raise Exception
> Exception
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to