Archived
This forum has been archived. Please start a new discussion on GitHub.
IceGrid.DeploymentException
I use AdminPrx to deploy ApplicationDescriptor to IceGrid and node.
Program run OK at my local computer, but when I upload it to remove Linux server, run it, and got the following error message:
IceGrid.DeploymentException
reason = "couldn't load `PsServer192.168.8.30' on node `192.168.8.30':
couldn't create configuration file: /tmp/servers/PsServer192.168.8.30/config/config"
What is the problem?
Here is my code:
Program run OK at my local computer, but when I upload it to remove Linux server, run it, and got the following error message:
IceGrid.DeploymentException
reason = "couldn't load `PsServer192.168.8.30' on node `192.168.8.30':
couldn't create configuration file: /tmp/servers/PsServer192.168.8.30/config/config"
What is the problem?
Here is my code:
ApplicationUpdateDescriptor applicationUpdateDescriptor = this
.createApplicationUpdateDescriptor();
NodeUpdateDescriptor nodeUpdateDescriptor = new NodeUpdateDescriptor();
nodeUpdateDescriptor.description = new BoxedString();
nodeUpdateDescriptor.loadFactor = new BoxedString();
nodeUpdateDescriptor.name = nodeId;
nodeUpdateDescriptor.propertySets = new HashMap<String, PropertySetDescriptor>();
nodeUpdateDescriptor.removePropertySets = new String[] {};
nodeUpdateDescriptor.removeServers = new String[] {};
nodeUpdateDescriptor.removeVariables = new String[] {};
nodeUpdateDescriptor.serverInstances = new ArrayList<ServerInstanceDescriptor>();
nodeUpdateDescriptor.servers = new ArrayList<ServerDescriptor>();
nodeUpdateDescriptor.variables = new HashMap<String, String>();
ServerDescriptor serverDescriptor = new ServerDescriptor();
nodeUpdateDescriptor.servers.add(serverDescriptor);
// 激发方式
serverDescriptor.activation = "manual";
serverDescriptor.activationTimeout = "";
serverDescriptor.adapters = new ArrayList<AdapterDescriptor>();
AdapterDescriptor adapterDescriptor = new AdapterDescriptor();
adapterDescriptor.allocatables = new ArrayList<ObjectDescriptor>();
adapterDescriptor.description = "";
// 设置adapter的id,使用serverId最为前缀,保证其唯一,
adapterDescriptor.id = "${server}." + moduleName + "Adapter";
// adapter 的名字,要跟设置endpoint的名字相同,否则无法工作
adapterDescriptor.name = moduleName + "Adapter";
adapterDescriptor.objects = new ArrayList<ObjectDescriptor>();
adapterDescriptor.priority = "";
adapterDescriptor.registerProcess = false;
// 设置regroup的编号
adapterDescriptor.replicaGroupId = moduleName + "RepGroup";
adapterDescriptor.serverLifetime = true;
serverDescriptor.adapters.add(adapterDescriptor);
serverDescriptor.allocatable = false;
serverDescriptor.applicationDistrib = true;
serverDescriptor.dbEnvs = new ArrayList<DbEnvDescriptor>();
serverDescriptor.deactivationTimeout = "";
serverDescriptor.description = "";
serverDescriptor.distrib = new DistributionDescriptor();
serverDescriptor.distrib.directories = new ArrayList<String>();
serverDescriptor.distrib.icepatch = "";
serverDescriptor.envs = new ArrayList<String>();
serverDescriptor.exe = "ls";
serverDescriptor.iceVersion = "";
serverDescriptor.id = serverId;
serverDescriptor.logs = new String[] {};
serverDescriptor.options = new ArrayList<String>();
serverDescriptor.propertySet = new PropertySetDescriptor();
serverDescriptor.propertySet.properties = new ArrayList<PropertyDescriptor>();
// 设置Endpoint,名字要跟上面adapter的name相同,否则无法工作
serverDescriptor.propertySet.properties.add(new PropertyDescriptor(
moduleName + "Adapter" + ".Endpoints", "default"));
serverDescriptor.propertySet.references = new String[] {};
serverDescriptor.pwd = "";
serverDescriptor.user = "";
applicationUpdateDescriptor.nodes.add(nodeUpdateDescriptor);
this.admin.updateApplication(applicationUpdateDescriptor);
0
Comments
-
And when I trying to use IceGridGUI to perform these proces, and it also fail.
I upload the screen copy as file attachement.0 -
Hi,
The IceGrid node is unable to create the configuration file as indicated by the exception. Does the user running the icegridnode have rights to write in the /tmp directory? Is the /tmp/servers directory created after the IceGrid node starts?
Cheers,
Benoit.0