Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataCenter dc is null #27

Open
amiribrahim opened this issue Dec 9, 2021 · 1 comment
Open

DataCenter dc is null #27

amiribrahim opened this issue Dec 9, 2021 · 1 comment

Comments

@amiribrahim
Copy link

amiribrahim commented Dec 9, 2021

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
Copy link
Author

amiribrahim commented Dec 10, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant