Reply
New Member
Posts: 7
Registered: ‎10-11-2018
Kudos: 1

There was an error saving the LAN network. Invalid API request.

Hey guys - updated to 5.10.12 this morning at a client site, and then decided to finally get around to updating the LAN IP range from the default 192.168.1.0/24 to their desired 172.16.15.0/24 range. 

 

Did the norm: settings, Network, LAN: Edit, typed in new IP/24, updated DHCP range, clicked save .... and got the error: 

There was an error saving the LAN network. Invalid API request. 

 

We can reproduce this at every site we have updated to 5.10.12, UC-CK or Cloud Key Gen 2 Plus, exact same error, but works perfectly at all sites on 5.9.29 ... any thoughts? 

 

FYI - most sites are pretty simple: Cable/DSL - USG P3 - 60W 8port PoE - UAP AC Pro

Some have 16 or 24 port switches, many have multiple APs, Switches, etc... 

 

Thanks so much for any thoughts!

New Member
Posts: 1
Registered: ‎11-23-2018

Re: There was an error saving the LAN network. Invalid API request.

[ Edited ]

Same issue here - Trying to add number into the IPv6 prefix delegation box and I get the error "There was an error saving the LAN network. Invalid API request."

 

EDIT: The issue was I was putting '64' into 'IPv6 prefix ID' when it needed to be blank. 

 

New Member
Posts: 7
Registered: ‎10-11-2018
Kudos: 1

Re: There was an error saving the LAN network. Invalid API request.

I've been on chat with Ubnt for a while now, and he is having me upload the tech support file from my USG, and the Maintenance area. 

 

Interesting - I can create a NEW network, just fine... 

 

I'll post more as I learn from the Chat guys.

New Member
Posts: 1
Registered: ‎12-31-2018

Re: There was an error saving the LAN network. Invalid API request.

Same issue here. Trying to change DHCP to /26. Can't save because of the same API error.

Highlighted
New Member
Posts: 3
Registered: ‎07-17-2015
Kudos: 1

Re: There was an error saving the LAN network. Invalid API request.

Same problem here, I can't set a static ip (ip reservation to a known client) since this latest update on the cloudkey controller.

topology: USG+8p switch+nanohd.

 

New Member
Posts: 10
Registered: ‎06-08-2017
Kudos: 4

Re: There was an error saving the LAN network. Invalid API request.

Can confirm the one site that I upgraded to 5.10.12 and my lab setup has this same error.

 

I manually reset my lab and installed 5.9.29 and it works again. Upgraded and Invalid API error.

 

@UBNT-MikeD & @UBNT-charlie can you guys look into fixing this for 5.10.xx I don't see it addressed in any Stable Release candidates thus far (checked 5.10.16)

 

Thanks!

 

 

Ubiquiti Employee
Posts: 671
Registered: ‎02-13-2018
Kudos: 240
Solutions: 101

Re: There was an error saving the LAN network. Invalid API request.

To any of you that are having this issue would you mind following these steps:

 

  1. Duplicate your controller tab.
  2. Open insights > controller logs and let it run through
  3. Try to make the change where you got the API error. 
  4. Copy and paste the error from the controller logs window here. 

-Thanks,

Adam

Adam Dipple | UniFi Support Team
New Member
Posts: 7
Registered: ‎10-11-2018
Kudos: 1

Re: There was an error saving the LAN network. Invalid API request.

Sure thing, Adam! 

 

Though ...and apologies for any newb issues here... my Insights, Controller Logs section simply shows 'No new log messages yet'.

And if I click the button [Download logs] it just spins. 

 

What am I missing?

Ubiquiti Employee
Posts: 671
Registered: ‎02-13-2018
Kudos: 240
Solutions: 101

Re: There was an error saving the LAN network. Invalid API request.

Sounds like a potential database corruption issue. Are you able to find the server.log file on your controller host? Which OS are you using? I can help you find it if you aren't sure where to look.
Adam Dipple | UniFi Support Team
New Member
Posts: 7
Registered: ‎10-11-2018
Kudos: 1

Re: There was an error saving the LAN network. Invalid API request.

Thanks!

 

This site has a Cloud Key Gen 2 Plus

The other site has a UC-CK

Ubiquiti Employee
Posts: 671
Registered: ‎02-13-2018
Kudos: 240
Solutions: 101

Re: There was an error saving the LAN network. Invalid API request.

Check out this location: /usr/lib/unifi/logs

cd /usr/lib/unifi/logs/

You will find a log called "server.log".

 

Either you can output it right in your SSH window with this:

cat server.log

Or you can choose to SCP the file off of the CK and read it in a text editor, etc. 

 

You should clearly see the timestamp along with an API error message. It's a long file, so just know at what time you were trying to perform those actions. 

Adam Dipple | UniFi Support Team
New Member
Posts: 11
Registered: 2 weeks ago
Kudos: 2

Re: There was an error saving the LAN network. Invalid API request.

[ Edited ]

Hi there,

 

Having the same problem. Just updated the Controller to 5.10.17 and the Cloud Key Gen2 Plus to 0.9.4

Then tried again to move the default Gateway/LAN from 192.168.10.1/24 back to 192.168.1.1/24 on my USG 3P and still get the API-error (first had it earlier today with version 5.10.12).

 

Here is the according part from the logfile:

 

[00:03:55,852] <webapi-27> ERROR api - NetworkConf() not found
com.ubnt.ace.api.int: api.err.InvalidFixedIP
at com.ubnt.ace.api.K.o00000(Unknown Source) ~[ace.jar:?]
at com.ubnt.ace.api.K.o00000(Unknown Source) ~[ace.jar:?]
at com.ubnt.ace.api.K.o00000(Unknown Source) [ace.jar:?]
at com.ubnt.ace.api.K.Ô00000(Unknown Source) [ace.jar:?]
at com.ubnt.ace.api.ApiServlet.service(Unknown Source) [ace.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.34.jar:8.5.34]
at com.ubnt.ace.view.AuthFilter.doFilter(Unknown Source) [ace.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:364) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:170) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) [tomcat-embed-core-8.5.34.jar:8.5.34]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.34.jar:8.5.34]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.34.jar:8.5.34]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
[00:03:55,857] <webapi-27> INFO api - [api] api.err.Invalid: /api/s/default/rest/networkconf/5c5af19cf6a58b057a79755f

 

 

New Member
Posts: 11
Registered: 2 weeks ago
Kudos: 2

Re: There was an error saving the LAN network. Invalid API request.

The issue could be resolved by removing all fixed IP-reservations in the old network.

Once they had been removed the network could be changed without the API-error!

New Member
Posts: 7
Registered: ‎10-11-2018
Kudos: 1

Re: There was an error saving the LAN network. Invalid API request.

Thanks for the reply, AF360! 

 

BUT... when we first attempted this, we did receive fixed IP specific error messages, and then removed every fixed IP, and tried again. 

 

Only then did we get the non-specific API error we reported here. 

 

FYI - 

Updated to .17 last night, rebooted both USG and UC-CK (and at the other site, the Gen 2 Plus) and still getting same error. 

 

New Member
Posts: 11
Registered: 2 weeks ago
Kudos: 2

Re: There was an error saving the LAN network. Invalid API request.

Hm, that's strange. I did not get any fixed IP specific error message (that would have helped) but the generic API-error only.

 

New Member
Posts: 1
Registered: ‎01-01-2019

Re: There was an error saving the LAN network. Invalid API request.


@iuri wrote:

Same problem here, I can't set a static ip (ip reservation to a known client) since this latest update on the cloudkey controller.

topology: USG+8p switch+nanohd.

 


I have the same issue, but only as I am attempting to assign the cloudkey controller IP, other devices I can set without issue. Did you find any resolution? I haven't tried SSH, but may need to.

Regular Member
Posts: 639
Registered: ‎11-11-2017
Kudos: 147
Solutions: 37

Re: There was an error saving the LAN network. Invalid API request.

Using 5.10.17 without issue and 9 static IP's for devices, AP's, and controller on a RPi. Make sure your network DHCP ranges are set properly before using static IP's.

Reply