[ixpmanager] Your user account is not associated with any members., Why?

Basil Elbalaawi saifbasilyazan at gmail.com
Tue Dec 29 11:22:36 GMT 2020


Hi Barry

Ok , let me send the output file ixp-manager and the manual configuration
commands , used where arranged by txt file attached.

https://imgur.com/a/tgg6sfk

see attached file

I am waiting your reply,,,

On Tue, Dec 29, 2020 at 12:44 PM Barry O'Donovan <barry.odonovan at inex.ie>
wrote:

> Basil,
>
> what exact instructions are you following for the installation?
>
> How you used the automated installation script?
>
> Have you reviewed the videos?
>
> https://www.ixpmanager.org/download/install
>
>   - Barry
>
> Basil Elbalaawi wrote on 29/12/2020 10:12:
> >
> > Hi Yann
> >
> > i am posed :
> > systemctl restart memcached.service
> > php ${IXPROOT}/artisan update:customer
> >
> > *root at ixpmanager:/srv/ixpmanager# php artisan update:customer*
> >
> >
> > ONLY RUN ONCE AND ONLY WHEN UPGRADING TO IXP Manager v5.0.0 from v4.9.x
> >
> > THIS WILL TRUNCATE THE customer:user n:m TABLE - meaning any users
> > created after upgrading to v5.0.0 will be unlinked from their customers.
> >
> >
> > This command will restructure the customer/user data from 1:m to n:m.
> >
> > Generally, this command should only ever be run once and only when
> > migrating to V5.0.0.
> >
> > Are you sure you wish to proceed?  (yes/no) [no]:
> >   > yes
> >
> > The customer_to_users table has been truncated
> > Migration in progress, please wait...
> >   0/2 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
> > In AbstractMySQLDriver.php line 103:
> >
> >    An exception occurred while executing 'INSERT INTO customer_to_users
> > (privs, extra_attributes, last_login_date, last_login_from,
> > last_login_via, created_at, customer_id, user_id) V
> >    ALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [3,
> > "{\"created_by\":{\"type\":\"migration-script\"}}", null, false, null,
> > "2020-12-29 11:44:47", null, 1]:
> >
> >    SQLSTATE[23000]: Integrity constraint violation: 1048 Column
> > 'customer_id' cannot be null
> >
> >
> > In PDOStatement.php line 129:
> >
> >    SQLSTATE[23000]: Integrity constraint violation: 1048 Column
> > 'customer_id' cannot be null
> >
> >
> > In PDOStatement.php line 127:
> >
> >    SQLSTATE[23000]: Integrity constraint violation: 1048 Column
> > 'customer_id' cannot be null
> >
> >
> >
> > *without any change ! What can I do now???*
> >
> > FYI, i am installed v5.5 before 5 months and upgrade to v5.6 without any
> > problem , now i created now VM with v5.7 and follow every procedure in
> > the manual installation , but after completed then puase
> > http://192.168.1.202/login , get the error as you see in the link:
> > https://imgur.com/a/Rqf0bT5
> >
> >
> > On Tue, Dec 29, 2020 at 10:44 AM Yann Robin
> > <yann at islandbridgenetworks.ie <mailto:yann at islandbridgenetworks.ie>>
> wrote:
> >
> >     Hello,
> >
> >     Did you run the following command line ?
> >
> >     update:customer2users
> >
> >     This command should solve your issue.
> >
> >     Basil Elbalaawi wrote on 27/12/2020 10:19:
> >>     Dear support
> >>
> >>     After I finish the installation , I can't login to the ixpmanager
> >>     web access, whey?
> >>     so you can check the link to see the problem?
> >>
> >>     https://imgur.com/a/Rqf0bT5
> >>
> >>     thanks advanced,,,
> >>
> >>
> >>     _______________________________________________
> >>     INEX IXP Manager mailing list
> >>     ixpmanager at inex.ie <mailto:ixpmanager at inex.ie>
> >>     Unsubscribe or change options here:
> https://www.inex.ie/mailman/listinfo/ixpmanager
> >
> >     --
> >     Kind regards,
> >
> >     Yann Robin
> >
> >     +353 1 531 3334
> >
> >     Island Bridge Networks Ltd.
> >
> >     https://www.islandbridgenetworks.ie/
> >     <http://www.islandbridgenetworks.ie/>
> >     <
> https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach
> >
> >
> >
> >
> > _______________________________________________
> > INEX IXP Manager mailing list
> > ixpmanager at inex.ie
> > Unsubscribe or change options here:
> https://www.inex.ie/mailman/listinfo/ixpmanager
> >
>
>
> --
>
> Kind regards,
> Barry O'Donovan
> INEX Operations
>
> https://www.inex.ie/support/
> +353 1 531 3339
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20201229/16fbbda5/attachment-0001.htm>
-------------- next part --------------
######################## 1- Enable Firewall ##################
How to enable/disable firewall on Ubuntu 20.04 LTS Focal Fossa Linux

The default Ubuntu firewall is ufw, with is short for "uncomplicated firewall.” Ufw is a frontend for the typical Linux iptables commands but it is developed in such a way that basic firewall tasks can be performed without the knowledge of iptables. Additionally, ufw can be managed from a graphical interface. In this article you will learn how to enable and disable firewall on Ubuntu 20.04 LTS Focal Fossa Linux.

$ sudo ufw status
[sudo] password for linuxconfig: 
Status: inactive

For more detailed output regarding your current firewall settings execute:

$ sudo ufw status verbose

To enable your firewall execute the following command.

$ sudo ufw enable

Next, add the HTTP, HTTPS, and SSH services to the ufw firewall.

sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https

##################################################################################

######################### 2- Change Root password ################################

ird at bird:/root$ sudo passwd root
[sudo] Password for bird: 
New password:
Retype new password:
passwd: password updated successfully
ird at bird:/root$ su root
password:
ird at bird:/root#

##################################################################################

################################ Enable SSH Remote access ########################

https://eldernode.com/enable-root-login-via-ssh-in-ubuntu-20/

Configure SSH config to permit root login

Edit /etc/ssh/sshd_config file with following command.

vi /etc/ssh/sshd_config
:set ignorecase
:set hlsearch

find PermitRootLogin and delete No or without-password and type yes.

For example

Before change:

PermitRootLogin without-password

After edit:
/permitrootlogin (for search after that press 'Enter' then 'shift+8')

PermitRootLogin yes

after edit the SSH config file, press Ctrl + x and press Enter button twice for save and exit.

4- Restart SSH service for loading new configuration on SSH_config file.

sudo systemctl restart sshd.

####################################################################

################################ 3- Change Ip Address To Static #################################


https://www.linuxtechi.com/assign-static-ip-address-ubuntu-20-04-lts/

Or 

https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-20-04-focal-fossa-desktop-server


root at ixpmanager:~# ip add sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:b8:29:8f brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.202/24 brd 192.168.1.255 scope global ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:feb8:298f/64 scope link
       valid_lft forever preferred_lft forever
3: ens38: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:b8:29:99 brd ff:ff:ff:ff:ff:ff
    inet 185.153.160.202/24 brd 185.153.160.255 scope global ens38
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:feb8:2999/64 scope link
       valid_lft forever preferred_lft forever


root at ixpmanager:~#vi /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
         dhcp4: false
         addresses: [192.168.1.202/24]
         gateway4: 192.168.1.1
         nameservers:
           addresses: [8.8.8.8,8.8.4.4,192.168.1.1]

    ens38:
         dhcp4: false
         addresses: [185.153.160.202/24]


   version: 2



root at bird:~# sudo netplan apply

######################### 4- Pre-Requirements ########################

root at ixpmanager:~# apt update

root at ixpmanager:~# apt dist-upgrade

root at ixpmanager:~# apt <tab> --------------> Not running

root at ixpmanager:~#apt-get install bash-completion


root at ixpmanager:~# vi .bashrc

Change The Following:

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi


root at ixpmanager:~# source .bashrc


root at ixpmanager:~# apt <tab>   ---------> Running

root at ixpmanager:~# apt <tab>
autoclean     build-dep     depends       edit-sources  install       policy        remove        showsrc       upgrade
autopurge     changelog     dist-upgrade  full-upgrade  list          purge         search        source
autoremove    clean         download      help          moo           rdepends      show          update


root at ixpmanager:~# apt install -qy apache2 php7.4 php7.4-intl php-rrd php7.4-cgi php7.4-cli php7.4-snmp php7.4-curl  php-memcached libapache2-mod-php7.4 mysql-server mysql-client php7.4-mysql memcached snmp php7.4-mbstring php7.4-xml php7.4-gd php7.4-bcmath bgpq3 php-memcache unzip php7.4-zip git php-yaml php-ds libconfig-general-perl libnetaddr-ip-perl mrtg libconfig-general-perl libnetaddr-ip-perl rrdtool librrds-perl curl composer
    



############################# 5 Get the IXP Manager Source #############################

root at ixpmanager:~# IXPROOT=/srv/ixpmanager

root at ixpmanager:~# cd /srv

root at ixpmanager:/srv# git clone https://github.com/inex/IXP-Manager.git ixpmanager

root at ixpmanager:~# cd $IXPROOT

root at ixpmanager:/srv/ixpmanager# git checkout release-v5

root at ixpmanager:/srv/ixpmanager# chown -R www-data: bootstrap/cache storage


################################# 6 Initial Setup and Dependencies ######################

root at ixpmanager:~# cd $IXPROOT


root at ixpmanager:/srv/ixpmanager# composer install --no-dev --prefer-dist


root at ixpmanager:/srv/ixpmanager# cp .env.example .env


root at ixpmanager:/srv/ixpmanager# php artisan key:generate



################################# 7 Database Setup ######################

root at ixpmanager:~# mysql -u root

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE `ixpmanager` CHARACTER SET = 'utf8mb4' COLLATE = 'utf8mb4_unicode_ci';

Query OK, 1 row affected, (0.00 sec)


mysql> CREATE USER `ixpmanager`@`localhost` IDENTIFIED BY 'ixpmanager';


Query OK, 1 row affected, (0.00 sec)


mysql> GRANT ALL ON `ixpmanager`.* TO `ixpmanager`@`localhost`;


Query OK, 1 row affected, (0.00 sec)


mysql> CREATE USER 'demo'@'%' IDENTIFIED BY 'demo';


Query OK, 1 row affected, (0.00 sec)


mysql> GRANT ALL ON *.* TO 'demo'@'%';


Query OK, 1 row affected, (0.00 sec)


mysql> FLUSH PRIVILEGES;


Query OK, 1 row affected, (0.00 sec)


mmysql> exit (or CTRL+D)
Bye



root at ixpmanager:~# vi /etc/mysql/mysql.conf.d/mysqld.cnf

Change:

bind-address           = 127.0.0.1

to 

#bind-address           = 127.0.0.1



root at ixpmanager:~# systemctl restart mysql.service


root at ixpmanager:~# cd /srv/ixpmanager/


root at ixpmanager:/srv/ixpmanager# vi .env

Change :

#MySQL Connection Details
DB_HOST="127.0.0.1"
DB_DATABASE="ixp"
DB_USERNAME="ixp"
DB_PASSWORD="password"


TO:


# MySQL Connection Details
DB_HOST="localhost"
DB_DATABASE="ixpmanager"
DB_USERNAME="ixpmanager"
DB_PASSWORD="ixpmanager"



root at ixpmanager:/srv/ixpmanager# php artisan doctrine:schema:create



root at ixpmanager:/srv/ixpmanager# php artisan migrate

Do you really wish to run this command? (yes/no)  [no]:

> yes


root at ixpmanager:/srv/ixpmanager# mysql -u root ixpmanager < $IXPROOT/tools/sql/views.sql


######################################### Configuration #####################################


Change TO:


# Set this to false in production (but change it to true if you have installation or
# other issues running IXP Manager).
APP_DEBUG=true

# Web address where IXP Manager is accessed. This is a **required** setting. It is
# currently used for generating all URLs within IXP Manager (action, assets, etc.).
# It is also used / required for sending emails via CLI scripts.
#
APP_URL="http://192.168.1.202"  (or to: "http://ixp.ps-ix.ps" and check DNS)


# See http://php.net/manual/en/timezones.php for a list of timezones:
APP_TIMEZONE="Asia/Gaza"

# Laravel log format (storage/log). See config/log.php and
# https://laravel.com/docs/5.4/errors
APP_LOG="single"

# info by default, one of: debug, info, notice, warning, error, critical, alert, emergency.
APP_LOG_LEVEL=debug

# MySQL Connection Details
DB_HOST="localhost"
DB_DATABASE="ixpmanager"
DB_USERNAME="ixpmanager"
DB_PASSWORD="ixpmanager"


#######################################################################################
# See config/cache.php
CACHE_DRIVER=memcached

#######################################################################################

#######################################################################################
# see config/doctrine.php
DOCTRINE_PROXY_AUTOGENERATE=false
DOCTRINE_CACHE=memcached
DOCTRINE_CACHE_NAMESPACE=IXPMANAGERNAMESPACE

#######################################################################################


#################################### Initial Database Objects ################


root at ixpmanager:/srv/ixpmanager# mysql -u ixpmanager "-pixpmanager" ixpmanager





mysql> INSERT INTO ixp ( name, shortname, address1, country )
          VALUES ( 'Some city internet Exchange', 'SCIX', 'Some city', 'IE' );
       SET @ixpid = LAST_INSERT_ID();


mysql> INSERT INTO infrastructure ( ixp_id, name, shortname, isPrimary )
           VALUES ( @ixpid, 'SCIX LAN1', 'SCIX LAN1', '1' );
       SET @infraid = LAST_INSERT_ID();


mysql> INSERT INTO company_registration_detail ( registeredName ) VALUES ('Some city internet Exchange');
       SET @crdid = LAST_INSERT_ID();



mysql> INSERT INTO company_billing_detail ( billingContactName, invoiceMethod, billingFrequency )
           VALUES ('Some city internet Exchange', 'EMAIL', 'NOBILLING');
       SET @cbdid = LAST_INSERT_ID();




mysql> INSERT INTO cust ( name, shortname, type, abbreviatedName, autsys, maxprefixes, peeringemail, nocphone, noc24hphone, nocemail, nochours, nocwww, peeringpolicy, corpwww, datejoin, status, activepeeringmatrix, isReseller, company_registered_detail_id, company_billing_details_id )
          VALUES ( 'Some city internet Exchange', 'SCIX', 3, 'SCIX', '65535', 100, 'bbalaawi at mtit.gov.ps', +97259409108, '082854808', 'NOC at mtit.gov.ps', '24x7', '', 'mandatory', 'http://ixp.ps-ix.ps', NOW(), 1, 1, 0, @crdid, @cbdid );
       SET @custid = LAST_INSERT_ID();



mysql> INSERT INTO customer_to_ixp ( customer_id, ixp_id ) VALUES ( @custid, @ixpid );



#######################################
root at ixpmanager:/srv/ixpmanager# php -r 'echo password_hash( "ixpmanager", PASSWORD_BCRYPT ) . "\n";'
$2y$10$e962qAs/lpvo9r3TfhJu9uY3tmRepr7ysBrplPlLqj0rvynnxDfDO
##################################



mysql> INSERT INTO user ( custid, username, password, email, privs, disabled, created )
           VALUES ( @custid, 'admin', '$2y$10$e962qAs/lpvo9r3TfhJu9uY3tmRepr7ysBrplPlLqj0rvynnxDfDO', 'bbalawi at mtit.gov.ps', 3, 0, NOW() );
       SET @userid = LAST_INSERT_ID();



mysql> INSERT INTO customer_to_users ( customer_id, user_id, privs, created_at )
           VALUES ( @custid, @userid, 3, NOW() );


mysql> INSERT INTO contact ( custid, name, email, created )
    VALUES ( @custid, 'contact00', 'info at mtit.gov.ps', NOW() );




And finally seed the database:


root at ixpmanager:~# cd $IXPROOT

root at ixpmanager:/srv/ixpmanager# php artisan db:seed --force --class=IRRDBs

root at ixpmanager:/srv/ixpmanager# php artisan db:seed --force --class=Vendors

rroot at ixpmanager:/srv/ixpmanager# php artisan db:seed --force --class=ContactGroups



File Permissions:


The web server needs write access to some directories:



root at ixpmanager:/srv/ixpmanager#chown -R www-data: storage/ bootstrap/cache/ database/Proxies/



root at ixpmanager:/srv/ixpmanager#chmod -R u+rwX storage/ bootstrap/cache/ database/Proxies/



root at ixpmanager:~# vi /etc/apache2/sites-enabled/000-default.conf

CHANGE:

ServerAdmin webmaster at localhost
DocumentRoot /var/www/html


TO:

   ServerAdmin webmaster at localhost
 DocumentRoot /srv/ixpmanager/public
 <Directory /srv/ixpmanager/public>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ /index.php [NC,L]
 </Directory>


     ErrorLog  ${APACHE_LOG_DIR}/error.log
    CustomLog   ${APACHE_LOG_DIR}/access.log combined





root at ixpmanager:/srv/ixpmanager#a2enmod rewrite


root at ixpmanager:/srv/ixpmanager#service apache2 restart



Congratulations!


###################################### THE END ############################################


More information about the ixpmanager mailing list