Thanks Matt! I tried the example "dce-iperf.cc" in that link. It is still the same mktemp error. I tried with both Richard's iperf version and this one.
Also, I tried to install a "Folder Creator App" before installing the iperf DceApplicationHelper.
I also tried replacing the DceApplicationHelper with this new ApplicationHelper. But still the same error.
####################################
#include "folder-create-helper.h"
#include "dce-application.h"
#include "ns3/log.h"
#include "utils.h"
//#include <fstream>
#include <stdlib.h>
#include <unistd.h>
NS_LOG_COMPONENT_DEFINE ("FolderCreateHelper");
namespace ns3 {
FolderCreateHelper::FolderCreateHelper ()
{
}
FolderCreateHelper::~FolderCreateHelper ()
{
/*
std::stringstream oss;
oss << "rm -rf /tmp/iperf3*";
::system (oss.str ().c_str ());
*/
}
ApplicationContainer
FolderCreateHelper::Install (NodeContainer c)
{
NS_LOG_FUNCTION (this);
ApplicationContainer apps;
for (NodeContainer::Iterator j = c.Begin (); j != c.End (); ++j)
{
int nodeId = (*j)->GetId ();
std::stringstream oss;
oss << "/tmp";
UtilsEnsureDirectoryExists (oss.str ());
}
return DceApplicationHelper::Install (c);
}
ApplicationContainer
FolderCreateHelper::InstallInNode (Ptr<Node> node)
{
NS_LOG_FUNCTION (this);
ApplicationContainer apps;
int nodeId = node->GetId ();
std::stringstream oss;
oss << "/tmp";
UtilsEnsureDirectoryExists (oss.str ());
return DceApplicationHelper::InstallInNode (node);
}
}
###################################################
But, it failed with another error. The server side is OK now, but the client side has the same problem:
jianwel@jianwei-u14:~/projects/ns3/current/source/ns-3-dce$ cat files-6/var/log/8606/*
iperf3 -c 7.0.0.8 -J -i 5 --time 5
Start Time: NS3 Time: 5s ( +5000000000.0ns) , REAL Time: 1492464048
Time: NS3 Time: 5s ( +5000000000.0ns) , REAL Time: 1492464048 --> Starting: /home/jianwel/projects/ns3/new-bake-with-more-module/build/bin/iperf3
Time: NS3 Time: 5s ( +5130128689.0ns) , REAL Time: 1492464050 --> Exit (1)
{
"start": {
"connected": [],
"version": "iperf 3.1",
"system_info": "NODE_6's OS NODE_6 3 12 6",
"timestamp": {
"time": "Fri, 01 Jan 2010 00:00:05 GMT",
"timesecs": 1262304005
},
"connecting_to": {
"host": "7.0.0.8",
"port": 5201
},
"cookie": "NODE_6.1262304005.000000.1ad5cb71083",
"tcp_mss_default": 524
},
"intervals": [],
"end": {
},
"error": "error - unable to create a new stream: No such file or directory"
}
BTW, is the change in the utils/iperf3_1.patch? where can I find that file?