flowvisor
flowvisor copied to clipboard
fvconfig load dying with multiple slices
using fvconfig generate a config works, but after adding a slice, dumping that slice and attempting to reload via fvconfig load I get JSON Parsing errors config
"switches": [],
"Slice": [
{
"max_flow_rules": -1,
"admin_status": true,
"drop_policy": "exact",
"controller_port": 0,
"config_name": "default",
"name": "fvadmin",
"flowmap_type": "federated",
"creator": "fvadmin",
"passwd_crypt": "4f137e31ada2c7be1750735588b82f82",
"controller_hostname": "none",
"passwd_salt": "1742143779",
"lldp_spam": true,
"contact_email": "fvadmin@localhost"
},
{
"max_flow_rules": -1,
"drop_policy": "rule",
"admin_status": true,
"controller_port": 6633,
"config_name": "default",
"flowmap_type": "federated",
"name": "gkm-test",
"creator": "fvadmin",
"passwd_crypt": "<REMOVED>"
"controller_hostname": "<REMOVED>",
"passwd_salt": "<REMOVED>",
"lldp_spam": true,
"contact_email": "[email protected]"
},
],
"FlowSpaceRule": [],
"flowvisor": [
{
"host": "localhost",
"config_name": "default",
"api_webserver_port": 8080,
"default_flood_perm": "fvadmin",
"stats_desc_hack": false,
"api_jetty_webserver_port": -1,
"track_flows": false,
"log_ident": "flowvisor",
"db_version": 2,
"version": "flowvisor-0.10.0",
"listen_port": 6633,
"checkpointing": false,
"log_facility": "LOG_LOCAL7",
"logging": "NOTE",
"run_topology_server": false
}
]
}
Error:
Exception in thread "main" com.google.gson.JsonSyntaxException: java.io.EOFException: End of input
at com.google.gson.Gson.fromJson(Gson.java:729)
at com.google.gson.Gson.fromJson(Gson.java:686)
at com.google.gson.Gson.fromJson(Gson.java:636)
at org.flowvisor.config.FVConfig.readFromFile(FVConfig.java:99)
at org.flowvisor.config.LoadConfig.main(LoadConfig.java:142)
Caused by: java.io.EOFException: End of input
at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:934)
at com.google.gson.stream.JsonReader.nextInObject(JsonReader.java:736)
at com.google.gson.stream.JsonReader.quickPeek(JsonReader.java:387)
at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:340)
at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:65)
at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:57)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:38)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:141)
at com.google.gson.Gson.fromJson(Gson.java:720)
... 4 more
Which version are you using?
Ali Al-Shabibi (sent from handheld)
On 21 mars 2013, at 08:54, Grant McNaught [email protected] wrote:
using fvconfig generate a config works, but after adding a slice, dumping that slice and attempting to reload via fvconfig load I get JSON Parsing errors config
"switches": [], "Slice": [ { "max_flow_rules": -1, "admin_status": true, "drop_policy": "exact", "controller_port": 0, "config_name": "default", "name": "fvadmin", "flowmap_type": "federated", "creator": "fvadmin", "passwd_crypt": "4f137e31ada2c7be1750735588b82f82", "controller_hostname": "none", "passwd_salt": "1742143779", "lldp_spam": true, "contact_email": "fvadmin@localhost" }, { "max_flow_rules": -1, "drop_policy": "rule", "admin_status": true, "controller_port": 6633, "config_name": "default", "flowmap_type": "federated", "name": "gkm-test", "creator": "fvadmin", "passwd_crypt": "<REMOVED>" "controller_hostname": "<REMOVED>", "passwd_salt": "<REMOVED>", "lldp_spam": true, "contact_email": "[email protected]" }, ], "FlowSpaceRule": [], "flowvisor": [ { "host": "localhost", "config_name": "default", "api_webserver_port": 8080, "default_flood_perm": "fvadmin", "stats_desc_hack": false, "api_jetty_webserver_port": -1, "track_flows": false, "log_ident": "flowvisor", "db_version": 2, "version": "flowvisor-0.10.0", "listen_port": 6633, "checkpointing": false, "log_facility": "LOG_LOCAL7", "logging": "NOTE", "run_topology_server": false } ] }
Error:
Exception in thread "main" com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at com.google.gson.Gson.fromJson(Gson.java:729) at com.google.gson.Gson.fromJson(Gson.java:686) at com.google.gson.Gson.fromJson(Gson.java:636) at org.flowvisor.config.FVConfig.readFromFile(FVConfig.java:99) at org.flowvisor.config.LoadConfig.main(LoadConfig.java:142) Caused by: java.io.EOFException: End of input at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:934) at com.google.gson.stream.JsonReader.nextInObject(JsonReader.java:736) at com.google.gson.stream.JsonReader.quickPeek(JsonReader.java:387) at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:340) at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:65) at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:57) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:38) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:141) at com.google.gson.Gson.fromJson(Gson.java:720) ... 4 more
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186 .
I don't know if you just mis copy-pasted your config file but you are missing the opening '{' at the beginning of the file.
I just tried to reproduce this on version 0.10 (which seems to be what you are using) and did not run into your problem. Could you give me more details?
Yes...I likely suffered a copy paste failure with the opening '{'.
I'm currently upgrading this test instance up to 1.0 to verify that this was not a problem in when we copied off of trunk (this is the 0.10.0 version with the non-stop-forwarding patch that AJ Ragusa added.)
-- Grant McNaught
On Thu, Mar 21, 2013 at 11:35 AM, Ali Al-Shabibi [email protected]:
I don't know if you just mis copy-pasted your config file but you are missing the opening '{' at the beginning of the file.
I just tried to reproduce this on version 0.10 (which seems to be what you are using) and did not run into your problem. Could you give me more details?
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15245739 .
Hello Again,
I've updated to flowvisor-1.0.0-1 from the /stable branch (small bug of note: the stable repo reports 1.1.0 is the newest available package, however it is not in the repo).
I've got a very sparse config from 0.10.0 that built via fvconfig generate that works fvconfig load will load without an issue. I then added a slice and a few flowspace rules and then use fvctl dump to output it to a file. fvconfig load will not load that file now.
--Grant.
On Thu, Mar 21, 2013 at 12:50 PM, Grant McNaught [email protected] wrote:
Yes...I likely suffered a copy paste failure with the opening '{'.
I'm currently upgrading this test instance up to 1.0 to verify that this was not a problem in when we copied off of trunk (this is the 0.10.0 version with the non-stop-forwarding patch that AJ Ragusa added.)
-- Grant McNaught
On Thu, Mar 21, 2013 at 11:35 AM, Ali Al-Shabibi <[email protected]
wrote:
I don't know if you just mis copy-pasted your config file but you are missing the opening '{' at the beginning of the file.
I just tried to reproduce this on version 0.10 (which seems to be what you are using) and did not run into your problem. Could you give me more details?
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15245739 .
Sorry about the repo. A mistake was made that caused 1.1.0 to slip into the stable branch. This will be fixed very soon.
I tried to reproduce your error on my system:
- Started FV
- Added a slice and flowspace
- Dumped the config
- Stopped FV
- Reloaded the dumped config.
This worked as advertised. Could you tell me whether you are using the newer JSON interface? Also does this bug appear on the stock 1.0 version or after the patch is applied?
Interesting that we're seeing such different behaviors!
Is there an external dependency that could be causing this?
I also have:
- installed flowvisor-1.0.0 via RPM ONLab Repo to an RHEL6 box.
- fvconfig generate /etc/flowvisor/base_config.json
- /etc/init.d/flowvisor start
- fvctl add-slice nddi tcp:[IP]:6633 [email protected] 5)fvctl save-config ./gkm-config2.json 6)/etc/init.d/flowvisor stop 7)fvconfig load /etc/flowvisor/gkm-config2.json
which produces the same error as before:
Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 39 column 10 at com.google.gson.Gson.fromJson(Gson.java:734) at com.google.gson.Gson.fromJson(Gson.java:686) at com.google.gson.Gson.fromJson(Gson.java:636) at org.flowvisor.config.FVConfig.readFromFile(FVConfig.java:99) at org.flowvisor.config.LoadConfig.main(LoadConfig.java:139) Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 39 column 10 at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1158) at com.google.gson.stream.JsonReader.nextString(JsonReader.java:1014) at com.google.gson.stream.JsonReader.nextInObject(JsonReader.java:755) at com.google.gson.stream.JsonReader.quickPeek(JsonReader.java:387) at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:340) at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:65) at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:57) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:38) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:141) at com.google.gson.Gson.fromJson(Gson.java:720) ... 4 more
On Thu, Mar 21, 2013 at 1:57 PM, Ali Al-Shabibi [email protected]:
Sorry about the repo. A mistake was made that caused 1.1.0 to slip into the stable branch. This will be fixed very soon.
I tried to reproduce your error on my system:
- Started FV
- Added a slice and flowspace
- Dumped the config
- Stopped FV
- Reloaded the dumped config.
This worked as advertised. Could you tell me whether you are using the newer JSON interface? Also does this bug appear on the stock 1.0 version or after the patch is applied?
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15255036 .
The error isn't the same as before. In your initial post you had an unexpected end of input and in this one you have an unterminated string. I don't know how relevant this is.
I don't have access to a red hat system now, so I can't test the rpm. I'll try that ASAP. I did my test using a source installation.
Ali Al-Shabibi (sent from handheld)
On 21 mars 2013, at 12:14, Grant McNaught [email protected] wrote:
Interesting that we're seeing such different behaviors!
Is there an external dependency that could be causing this?
I also have:
- installed flowvisor-1.0.0 via RPM ONLab Repo to an RHEL6 box.
- fvconfig generate /etc/flowvisor/base_config.json
- /etc/init.d/flowvisor start
- fvctl add-slice nddi tcp:[IP]:6633 [email protected] 5)fvctl save-config ./gkm-config2.json 6)/etc/init.d/flowvisor stop 7)fvconfig load /etc/flowvisor/gkm-config2.json
which produces the same error as before:
Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 39 column 10 at com.google.gson.Gson.fromJson(Gson.java:734) at com.google.gson.Gson.fromJson(Gson.java:686) at com.google.gson.Gson.fromJson(Gson.java:636) at org.flowvisor.config.FVConfig.readFromFile(FVConfig.java:99) at org.flowvisor.config.LoadConfig.main(LoadConfig.java:139) Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 39 column 10 at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1158) at com.google.gson.stream.JsonReader.nextString(JsonReader.java:1014) at com.google.gson.stream.JsonReader.nextInObject(JsonReader.java:755) at com.google.gson.stream.JsonReader.quickPeek(JsonReader.java:387) at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:340) at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:65)
at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:57)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:38)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:141)
at com.google.gson.Gson.fromJson(Gson.java:720) ... 4 more
On Thu, Mar 21, 2013 at 1:57 PM, Ali Al-Shabibi [email protected]:
Sorry about the repo. A mistake was made that caused 1.1.0 to slip into the stable branch. This will be fixed very soon.
I tried to reproduce your error on my system:
- Started FV
- Added a slice and flowspace
- Dumped the config
- Stopped FV
- Reloaded the dumped config.
This worked as advertised. Could you tell me whether you are using the newer JSON interface? Also does this bug appear on the stock 1.0 version or after the patch is applied?
— Reply to this email directly or view it on GitHub< https://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15255036>
.
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15256115 .
I just tested on a RedHat system installing from the RPM and I was unable to reproduce your error.
Are you running into permission issues? Make sure you run everything as the flowvisor user.
Yes, everything is run as flowvisor, and the config file is owned by flowvisor in a flowvisor owned directory.
Is there any way I can assist in getting to the root of this issue?
--Grant
On Fri, Mar 22, 2013 at 2:46 PM, Ali Al-Shabibi [email protected]:
I just tested on a RedHat system installing from the RPM and I was unable to reproduce your error.
Are you running into permission issues? Make sure you run everything as the flowvisor user.
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15314662 .
Could you try to install flowvisor from scratch or on a fresh system? Just want to make sure that any previous installs didn't leave any conflicting pieces of config.
Ali Al-Shabibi (sent from handheld)
On 25 mars 2013, at 07:45, Grant McNaught [email protected] wrote:
Yes, everything is run as flowvisor, and the config file is owned by flowvisor in a flowvisor owned directory.
Is there any way I can assist in getting to the root of this issue?
--Grant
On Fri, Mar 22, 2013 at 2:46 PM, Ali Al-Shabibi [email protected]:
I just tested on a RedHat system installing from the RPM and I was unable to reproduce your error.
Are you running into permission issues? Make sure you run everything as the flowvisor user.
— Reply to this email directly or view it on GitHub< https://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15314662>
.
— Reply to this email directly or view it on GitHubhttps://github.com/OPENNETWORKINGLAB/flowvisor/issues/186#issuecomment-15397113 .