design patterns – Should there only ever be one instance of a ViewModel object?

Assume a rather simplistic model:

class Person{   
   static List<Person> LivingPersons

   String Name
   List<Person> Dependents 
}

From this it can (hopefully) be seen that a single Person object can be both within the LivingPersons list and within the Dependents list of another Person object. Similarly, if there were a couple of ViewModels to represent this model:

class ViewModel_LivingPersons{
   static List<ViewModel_Person> LivingPersons
}

class ViewModel_Person{
   String Name
   List<ViewModel_Person> Dependents   
}

If I had a single Person object that resided in both the LivingPersons list and within the Dependents list of another Person, my gut feeling tells me that as it is the same model object being represented there should only ever be one instance of a ViewModel_Person to represent this model object. However, I do not know why, nor if this is best practice.

I’m not certain of the best practices here. I’ve done a bit of searching, but cannot find anything on this particular issue.

Magento2.4.2 – After Installing Fresh Instance All Pages Messy

I had the same issue upgrading from 2.2.9 to 2.4.2. The issue also appears on a fresh install of 2.4.2 open source.

Fixed this by issuing the following SQL statement

"insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);"

n98-magerun2.phar setup:upgrade; 
n98-magerun2.phar setup:di:compile; 
n98-magerun2.phar setup:static-content:deploy en_US en_AU -f

How to specify custom error message on openstack horizon on failure in user data script instance launch

I am trying to launch instances in openstack server using the NS with multiple VNFs into it.

Many times instance launched successfully, but there are some times that some of the application in that instance was unable to start either because of some configuration mistake of may be because of network error or openstack resource failure.

I have looked in the google, but could not found any supporting document regarding this

I want to know if there is any method to set or display custom message on horizon of openstack from the user data scripts of YAML on any failure in instance?

Openstack instance lost internet access after ataching floating ip

Maybe someone has same problem

I have installed Openstack Victoria on two virtualmachines (1 controller node, 1 compute node) running ubuntu 20.04. Each node has two network interfaces, mgmt network and provider network. I have created private network and i have attached it to router. With this configuration i am able to access internet.

But, when i attach floating IP to my instance, it lost internet connectivity. I can access this instance from outside, but instance cannot access network gateway. I checked it with ip netns exec ping 8.8.8.8 it is working until i attach FIP.

I think that is routing problem but i cannot find where? Do you guys have any ideas?

10.0.0.0/24 – mgmt network

10.0.2.0/24 – external (provider) network

configuration of linuxbrdige

root@compute1:/# grep -v “^#” /etc/neutron/plugins/ml2/linuxbridge_agent.ini | grep -v “^$”

(DEFAULT)

(agent)

extensions = qos

(linux_bridge)

physical_interface_mappings = provider:ens34

(network_log)

(securitygroup)

enable_security_group = true

firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

(vxlan)

enable_vxlan = true

local_ip = 10.0.0.131

l2_population = true

root@controller1:/# openstack subnet show provider

| Field | Value |

| allocation_pools | 10.0.2.50-10.0.2.150 |

| cidr | 10.0.2.0/24|

| created_at | 2021-02-22T16:17:20Z |

| description | |

| dns_nameservers | 8.8.8.8|

| dns_publish_fixed_ip | None |

| enable_dhcp | True |

| gateway_ip | 10.0.2.1|

| host_routes | |

| id | 7d07101a-4696-4ff8-88bc-fa4ffde1622f |

| ip_version | 4 |

| ipv6_address_mode | None |

| ipv6_ra_mode | None |

| name | provider |

| network_id | d65d17fe-9829-44d5-bf07-1abb70f9d523 |

| prefix_length | None |

| project_id | 957f142f850240b5801023369eace69a |

| revision_number | 0 |

| segment_id | None |

| service_types | |

| subnetpool_id | None |

root@controller1:/# openstack router show router1

| Field | Value |

| admin_state_up | UP |

| availability_zone_hints | |

| availability_zones | nova |

| created_at | 2021-02-22T16:17:51Z |

| description | |

| distributed | False |

| external_gateway_info | {“network_id”: “d65d17fe-9829-44d5-bf07-1abb70f9d523”, “external_fixed_ips”: ({“subnet_id”: “7d07101a-4696-4ff8-88bc-fa4ffde1622f”, “ip_address”: “10.0.2.51”}), “enable_snat”: true} |

| flavor_id | None |

| ha | False |

| id | fa11f06e-906c-4ae9-8176-20fb74e1cacd |

| interfaces_info | ({“port_id”: “67d37c5f-1250-45e7-a003-78493921b4d6”, “ip_address”: “172.16.1.1”, “subnet_id”: “b0762924-6c7a-453f-a9b8-788e15e5f0c0”}) |

| name | router1 |

| project_id | 957f142f850240b5801023369eace69a |

| revision_number | 4 |

| routes | |

| status | ACTIVE |

root@controller1:/# ip netns

qrouter-fa11f06e-906c-4ae9-8176-20fb74e1cacd (id: 3)

qdhcp-d65d17fe-9829-44d5-bf07-1abb70f9d523 (id: 0)

qdhcp-f6a245eb-001d-47b1-8af5-38178585fe87 (id: 6)

qdhcp-0fb79928-ae24-4d85-8c58-b1acb9c8c9d2 (id: 2)

qdhcp-0ab1f94c-1e06-485c-b024-548a927a5e36 (id: 1)

root@controller1:/# ip netns exec qrouter-fa11f06e-906c-4ae9-8176-20fb74e1cacd ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=11.7 ms

— 8.8.8.8 ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 11.679/11.679/11.679/0.000 ms

root@controller1:/# ip netns exec qrouter-fa11f06e-906c-4ae9-8176-20fb74e1cacd ip route

default via 10.0.2.1 dev qg-61a6ea6f-7e proto static

10.0.2.0/24 dev qg-61a6ea6f-7e proto kernel scope link src 10.0.2.51

172.16.1.0/24 dev qr-67d37c5f-12 proto kernel scope link src 172.16.1.1

So everything is working fine… And now i am attaching FIP

root@controller1:/# openstack floating ip list

| ID | Floating IP Address | Fixed IP Address | Port | Floating Network | Project |

| 8a3333a9-345d-4b2a-9d63-420f09e4c020 | 10.0.2.106| 172.16.1.236| edef7b03-25a9-43b4-9953-831539056ac3 | d65d17fe-9829-44d5-bf07-1abb70f9d523 | 957f142f850240b5801023369eace69a |

It is pingable from my local PC and i can access instance via SSH as well

but i cannot access internet from provider network

root@controller1:/# ip netns exec qrouter-fa11f06e-906c-4ae9-8176-20fb74e1cacd ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

^C

— 8.8.8.8 ping statistics —

3 packets transmitted, 0 received, 100% packet loss, time 2040ms

This is tcpdump from compute node

root@compute1:/# tcpdump -i ens34 icmp

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on ens34, link-type EN10MB (Ethernet), capture size 262144 bytes

17:30:00.258697 IP 10.0.2.106 > 8.8.8.8: ICMP echo request, id 41872, seq 0, length 64

17:30:01.259844 IP 10.0.2.106 > 8.8.8.8: ICMP echo request, id 41872, seq 1, length 64

So packets are going through provider interface -ens34. I think that is routing problem on compute node but i cannot find where it is.

Hardness of an instance of a problem independent of algorithms?

The paper “Where the really hard problems are” (https://www.ijcai.org/Proceedings/91-1/Papers/052.pdf) and others that cite it provide evidence that lots of algorithms for many NP complete problems (when suitably parametrised) perform poorly on the problems that lie on the phase transition from under constrained to over constrained which occurs as the parameter is increased. Is there a way to assign hardness to an instance of say 3SAT, without invoking or involving a specific algorithm that may perform poorly on that instance? Or is this line of thinking necessarily restricted to specific algorithms?

sql server – hide instance not working

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




Move everything from old D8 to new instance of D9

Looking for best practices for moving everything (nodes, blocks, paragraphs, users, content types) from D8.7.8 to a fresh install of D9.1.0

android – ksoap2 post complex object to a wsdl service log error “Object reference not set to an instance of an object”

I’m trying to use the operation “addDTE” from a wsdl sevice that I can’t modify.

Here is what I have tryed using Android Studio:


        SharedPreferences loginAut = getSharedPreferences("Login", android.content.Context.MODE_PRIVATE);
        Autenticacion = loginAut.getString("Token","");

        String soapAction = "http://xxxxxxx.xxx/IServicio/AddDTE";
        String methodName = "AddDTE";
        String NameSpace = "http://xxxxxxx.xxx/";
        String url = "http://xxx.xxx.xx.xxx:xx/xxxxxxxxxx/servicio.svc";

        SoapObject Request = new SoapObject(NameSpace, methodName);

/*
        PropertyInfo objectDTE = new PropertyInfo();
        objectDTE.setName("dte");
        objectDTE.setValue(dte);
        //objectDTE.setNamespace(NameSpace);
        objectDTE.setType(dte.getClass());

 */
        
        SoapObject SoapDTE = new SoapObject("","DTE");
        SoapDTE.addProperty("AuxTipo",dte.AuxTipo);
        SoapDTE.addProperty("CentroDeCosto",dte.CentroDeCosto);
        SoapDTE.addProperty("CodAux",dte.CodAux);
        SoapDTE.addProperty("CodBode",dte.CodBode);
        SoapDTE.addProperty("CodMoneda",dte.CodMoneda);
        SoapDTE.addProperty("CodVendedor",dte.CodVendedor);
        SoapDTE.addProperty("Concepto",dte.Concepto);
        SoapDTE.addProperty("CondPago",dte.CondPago);
        // add detalles
        SoapObject ArrayDetalles = new SoapObject("","ArrayOfDTE_Detalle");
        SoapObject SoapDetalles = new SoapObject("", "DTE_Detalle");

        SoapDetalles.addProperty("Actualizado",detalles.Actualizado);
        SoapDetalles.addProperty("AuxTipo",detalles.AuxTipo);
        SoapDetalles.addProperty("CantDespUVta",detalles.CantDespUVta);
        SoapDetalles.addProperty("CantDespachada",detalles.CantDespachada);
        SoapDetalles.addProperty("CantFactUVta",detalles.CantFactUVta);
        SoapDetalles.addProperty("CantFacturada",detalles.CantFacturada);
        SoapDetalles.addProperty("CodAux",detalles.CodAux);
        SoapDetalles.addProperty("CodBode",detalles.CodBode);
        SoapDetalles.addProperty("CodProd",detalles.CodProd);
        SoapDetalles.addProperty("CodUMed",detalles.CodUMed);
        SoapDetalles.addProperty("Equivalencia",detalles.Equivalencia);
        SoapDetalles.addProperty("Fecha",detalles.Fecha);
        SoapDetalles.addProperty("Linea",detalles.Linea);
        SoapDetalles.addProperty("NroInt",detalles.NroInt);
        SoapDetalles.addProperty("Tipo",detalles.Tipo);
        SoapDetalles.addProperty("TipoOrigen",detalles.TipoOrigen);
        SoapDetalles.addProperty("TotLinea",detalles.TotLinea);

        ArrayDetalles.addProperty("DTE_Detalle",SoapDetalles);

        SoapDTE.addProperty("Detalles",ArrayDetalles);
        // seguimos con DTE
        SoapDTE.addProperty("Estado",dte.Estado);
        SoapDTE.addProperty("FactorCostoImportacion",dte.FactorCostoImportacion);
        SoapDTE.addProperty("Fecha",dte.Fecha);
        SoapDTE.addProperty("FmaPago",dte.FmaPago);
        SoapDTE.addProperty("Folio",dte.Folio);
        SoapDTE.addProperty("Glosa",dte.Glosa);
        SoapDTE.addProperty("IVA",dte.IVA);
        SoapDTE.addProperty("NetoAfecto",dte.NetoAfecto);
        SoapDTE.addProperty("NetoExento",dte.NetoExento);
        SoapDTE.addProperty("NroInt",dte.NroInt);
        SoapDTE.addProperty("Proceso",dte.Proceso);
        SoapDTE.addProperty("Sistema",dte.Sistema);
        SoapDTE.addProperty("SubtipoDocto",dte.SubTipoDocto);
        SoapDTE.addProperty("SubTotal",dte.SubTotal);
        SoapDTE.addProperty("Tipo",dte.Tipo);
        SoapDTE.addProperty("TipoDespacho",dte.TipoDespacho);
        SoapDTE.addProperty("TipoServicioSII",dte.TipoServicioSII);
        SoapDTE.addProperty("Total",dte.Total);
        SoapDTE.addProperty("Usuario",dte.Usuario);

        Request.addProperty("Autenticacion", Autenticacion);
        Request.addProperty("dte",SoapDTE);
        Request.addProperty("auxiliar",null);


        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        soapEnvelope.dotNet = true;
        soapEnvelope.implicitTypes = true;
        soapEnvelope.encodingStyle = SoapSerializationEnvelope.XSD;
        soapEnvelope.skipNullProperties=true;

        MarshalDouble md = new MarshalDouble();
        md.register(soapEnvelope);

        soapEnvelope.addMapping(NameSpace, "dte", DTE.class);

        soapEnvelope.setOutputSoapObject(Request);
        HttpTransportSE transport = new HttpTransportSE(url,30000);

        try {
            transport.call(soapAction, soapEnvelope);
            SoapPrimitive PResponse = (SoapPrimitive) soapEnvelope.getResponse();
            SoapObject Response = (SoapObject) soapEnvelope.bodyIn;

            if(PResponse == null)
                showdte = false;
            else 
                showdte = true;

        } catch (XmlPullParserException | IOException e) {
            e.printStackTrace();
        }

here is the wsdl:

<xs:element name="AddDTE">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Autenticacion" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="dte" nillable="true" type="q2:DTE"/>
<xs:element minOccurs="0" name="auxiliar" nillable="true" type="q3:Auxiliar"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="DTE">
<xs:sequence>
<xs:element minOccurs="0" name="AuxDocNum" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0" name="AuxDocfec" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="AuxGuiaNum" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0" name="AuxTipo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="BoletaFiscal" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="CentroDeCosto" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodAux" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodBod" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodBode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodCCosto" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodListaPrecio" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodLugarDesp" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodMoneda" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodVendedor" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Concepto" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CondPago" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Contacto" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Descto01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Descto02" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Descto03" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Descto04" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Descto05" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DespachadoPor" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Detalles" nillable="true" type="tns:ArrayOfDTE_Detalle"/>
<xs:element minOccurs="0" name="Equivalencia" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="Estado" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="FactorCostoImportacion" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Factura" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0" name="FecHoraCreacion" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="Fecha" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="FechaVenc" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="FmaPago" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="Folio" nillable="true" type="xs:decimal"/>
<xs:element minOccurs="0" name="Glosa" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="IVA" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="ImpresaOk" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="Impuestos" nillable="true" type="tns:ArrayOfDTE_Impto"/>
<xs:element minOccurs="0" name="IndTraslado" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="NetoAfecto" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="NetoExento" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="NroInt" type="xs:int"/>
<xs:element minOccurs="0" name="Orden" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="Patente" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="PorcDesc01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDesc02" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDesc03" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDesc04" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDesc05" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Proceso" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Referencias" nillable="true" type="tns:ArrayOfReferencia"/>
<xs:element minOccurs="0" name="RetiradoPor" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="RutTransportista" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Sistema" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SolicitadoPor" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SubTipDocRef" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SubTipoDocto" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="SubTotal" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="TipDocRef" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Tipo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TipoDespacho" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="TipoServicioSII" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="Total" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="TotalDesc" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Usuario" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="nvnumero" nillable="true" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:element name="DTE" nillable="true" type="tns:DTE"/>
<xs:complexType name="ArrayOfDTE_Detalle">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="DTE_Detalle" nillable="true" type="tns:DTE_Detalle"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfDTE_Detalle" nillable="true" type="tns:ArrayOfDTE_Detalle"/>
<xs:complexType name="DTE_Detalle">
<xs:sequence>
<xs:element minOccurs="0" name="Actualizado" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="AuxTipo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CantDespUVta" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="CantDespachada" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="CantFactUVta" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="CantFacturada" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="CodAux" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodBode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodProd" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="CodUMed" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="DescMov01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DescMov02" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DescMov03" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DescMov04" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DescMov05" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="DetProd" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Equivalencia" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Fecha" nillable="true" type="xs:dateTime"/>
<xs:element minOccurs="0" name="Linea" type="xs:int"/>
<xs:element minOccurs="0" name="NVCorrelaOC" nillable="true" type="xs:int"/>
<xs:element minOccurs="0" name="NroInt" type="xs:int"/>
<xs:element minOccurs="0" name="PorcDescMov01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDescMov02" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDescMov03" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDescMov04" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcDescMov05" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PorcRecMov01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="PreUniMB" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="RecMov01" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="Tipo" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TipoDestino" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TipoOrigen" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="TotLinea" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="TotalDescMov" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="nvCorrela" nillable="true" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:element name="DTE_Detalle" nillable="true" type="tns:DTE_Detalle"/>

when I try it, I got the “Object reference not set to an instance of an object” log. The autentication is correct, and I got the token from the same service, the auxiliar object must be null.

Can you tell If im doing something wrong? this is my first time programming with android studio and working with wsdl.

nginx – Binding secondary IP addresses EC2 instance running Debian Buster

I have an EC2 instance running Nginx on Debian Buster. I added multiple private IPs to the instance (to allow nginx to host multiple websites) using the AWS web console. I then created the script /usr/local/bin/bind_secondary_ips:

#!/bin/bash

interface_mac=$(curl -s http://169.254.169.254/latest/meta-data/mac)
interface_ips=$(curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${interface_mac}/local-ipv4s)
ipaddress_arr=($interface_ips)

for i in "${ipaddress_arr(@):1}"
do             
    ip addr add dev ens5 $i/24
done

To run the script at boot, I created and enabled a systemd service unit named bind-secondary-ips.service as follows:

(Unit)
Description=Bind secondary IP address to network interface
After=default.target
Before=nginx.service

(Service)
ExecStart=/usr/local/bin/bind-secondary-ips
RemainAfterExit=true

(Install)
WantedBy=default.target

I modified the nginx service unit After directive as follows:

After=bind-secondary-ips.service network-online.target remote-fs.target nss-lookup.target

When I restart the instance, the secondary IPs correctly bind to the network interface. However, nginx remains in a dead state. Manually starting nginx after the instance boots works fine.

$ systemctl status nginx
  ● nginx.service - nginx - high performance web server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: inactive (dead)
        Docs: http://nginx.org/en/docs/

I can’t seem to figure out why nginx fails to start at boot time. The logs aren’t showing anything useful either.

OpenVPN server employees and customers config on the same instance and server?

I want to add some firewall rules for my customers and others for the employees.

From my understanding I can do that using different subnet combined with the client-config-dir ccd
Also from my understanding the client-config-dir is based on the CN.
When I tested that I discovered that I can only have one certificat by CN. And I don’t want my employees nor my customers to use the same certificat so this solution seems wrong from my POV.

How can I achieve that ?