Cloudslab / cloudsimsdn

CloudSimSDN is an SDN extension of CloudSim project to simulate Networking, SDN and SFC features in the context of edge and cloud data centers.
GNU General Public License v2.0
94 stars 60 forks source link

DataCenter dc is null #27

Open amiribrahim opened 2 years ago

amiribrahim commented 2 years ago

Tried to run the examples but getting the below error (tried both master and latest release 2.0.1-beta). The mvn clean install finished successfully. using java 1.8, with eclipse Version: 2021-09 (4.21.0)

============= SDNBroker.printResult() Group analysis =======================
Group num: 0, groupNumWorkloads:114
Group num: 0, groupTotalServetime:330.2069866666666
Group num: 0, groupTotalServetimeCPU:188.06399999999994
Group num: 0, groupTotalServetimeNetwork:142.14298666666662
Group num: 0, group avg Serve time:2.8965525146198825
Group num: 0, group avg Serve time CPU:1.6496842105263152
Group num: 0, group avg Serve time Network:1.2468683040935669
103.0: ========== EXPERIMENT FINISHED ===========
java.lang.NullPointerException: Cannot invoke "org.cloudbus.cloudsim.sdn.physicalcomponents.SDNDatacenter.getNOS()" because "dc" is null
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.getAllHostList(SimpleExampleInterCloud.java:212)
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.startSimulation(SimpleExampleInterCloud.java:192)
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.main(SimpleExampleInterCloud.java:168)
Unwanted errors happen 

image

amiribrahim commented 2 years ago

After investigation, this is happening because the datacenter of type: net doesn't have PEs!

java.lang.Exception: net : Error - this entity has no PEs. Therefore, can't process any Cloudlets.
    at org.cloudbus.cloudsim.Datacenter.<init>(Datacenter.java:104)
    at org.cloudbus.cloudsim.sdn.physicalcomponents.SDNDatacenter.<init>(SDNDatacenter.java:61)
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.createSDNDatacenter(SimpleExampleInterCloud.java:293)
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.createPhysicalTopology(SimpleExampleInterCloud.java:231)
    at org.cloudbus.cloudsim.sdn.example.SimpleExampleInterCloud.main(SimpleExampleInterCloud.java:152)

Still need your help to get the example running without such error or the subsequent runtime error that happens when getting AllHostList and AllSwitchList that belong to a null datacenter!