Auto-provisioning and Presets 1.2.9 not working

I am really struggling to get what im missing when it comes to provisions and presets.
Everything is working just fine except this. I can summon and push config files manually to devices but i cant get autoprovisioning to work.
Ive set up provisions and presets but its like genie doesnt react to incoming 1 BOOT at all.

Here is my setup:
DEVICE:
|DeviceID.Manufacturer|MikroTik|
|DeviceID.OUI|E48D8C|
|DeviceID.ProductClass|mAP|
|DeviceID.SerialNumber|59AB04706DFF|

(and im sorry but for some reason new users can only embed ONE item in a post so:)
Here is my preset:
Name: ge379
Channel:
Weight: <0>
Schedule:
Events: M Reboot, 1 BOOT
Precondition: DeviceID.SerialNumber = “59AB04706DFF”
Provision: GE00379

Its really hard to find good examples and documentation out there but from ive been able to gather this should work. When device reboots and comes back online and i see
“E48D8C-mAP-59AB04706DFF: Inform; informEvent=“M Reboot,1 BOOT” informRetryCount=1” in the log file then that should be all thats needed for genieACS to start the provisioning? Yet its like genie doesnt react to it at all. What am i missing here?

Also there is a fundamental lack of log files for genie. This should be traceable through logs to see whats going on or at least some sort of status of whats happening in GUI.

Can you pls post a screenshot of your preset? Do you really have <0> for the weight param? Thats not a valid value for the weight, which should be an integer that is greater than 0.

When you have events present, then ALL the events of the preset must match the events the CPE sent. Example, if you have the event line set to 1 BOOT,4 VALUE CHANGE then only CPEs that send a 1 BOOT and 4 VALUE CHANGE will trigger the preset. Other events can be present, but those two must be present to trigger the preset.

Thank you so much for replying. Ive updated my preset to weight 50:

Here is my log after changing the preset and doing a reboot:
2022-10-22T08:19:21.300Z [INFO] ::ffff:10.10.10.2 E48D8C-mAP-59AB04706DFF: Inform; informEvent=“6 CONNECTION REQUEST” informRetryCount=0
2022-10-22T08:19:21.312Z [INFO] ::ffff:10.10.10.2 E48D8C-mAP-59AB04706DFF: ACS request; acsRequestId=“183fec6703e0000” acsRequestName=“Reboot”
2022-10-22T08:20:06.290Z [INFO] ::ffff:10.10.10.2 E48D8C-mAP-59AB04706DFF: Inform; informEvent=“M Reboot,1 BOOT” informRetryCount=1

No magic is happening tho:(

Am i missing a required steps like setting certain filters or similar? My filters are empty and im not sure what those are used for yet:)

So i have done the following:

  1. Added device and i can summon it and push files to it manually
  2. made a config file ending with .alter and uploaded it under files
  3. made a provision
  4. made a preset
    whats missing?

What is in the log of the device? What is in the log for genieacs-fs? Most file download issues end up being issue with the CPE being unable to contact the fs server, either because its not listening on the right interface, firewalled off, dns, etc.

So this is my log cwmp log:
2022-10-25T18:03:51.378Z [INFO] ::ffff:10.10.10.6 E48D8C-mAP-59AB04706DFF: Inform; informEvent=“6 CONNECTION REQUEST” informRetryCount=0
2022-10-25T18:03:51.391Z [INFO] ::ffff:10.10.10.6 E48D8C-mAP-59AB04706DFF: ACS request; acsRequestId=“1841050a4c40000” acsRequestName=“Reboot”

2022-10-25T18:04:38.663Z [INFO] ::ffff:10.10.10.6 E48D8C-mAP-59AB04706DFF: Inform; informEvent=“M Reboot,1 BOOT” informRetryCount=1

This is my FS log (the default_config files are files i pushed manually to similar devices-there is no entry for GE379):
2022-10-25T14:17:29.622Z [INFO] ::ffff:10.10.10.14: Fetch file; filename=“default_config_mAP.rsc”
2022-10-25T14:17:29.657Z [INFO] ::ffff:10.10.10.76: Fetch file; filename=“default_config_mAP.rsc”
2022-10-25T14:17:29.660Z [INFO] ::ffff:10.10.10.44: Fetch file; filename=“default_config_mAP.rsc”
2022-10-25T14:17:29.707Z [INFO] ::ffff:10.10.10.40: Fetch file; filename=“default_config_mAP.rsc”

This is log from router:

This is debug log from genieacs:

event: incoming HTTP request
timestamp: 2022-10-25T17:44:44.761Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
localPort: 7547
method: POST
url: /
headers:
content-length: “1952”
content-type: text/xml
host: genieacs.test.local
user-agent: MikroTik
body: >
<soapenv:Envelope xmlns:soap=‘http://schemas.xmlsoap.org/soap/encoding/
xmlns:xsd=‘XML Schema
xmlns:cwmp=‘urn:dslforum-org:cwmp-1-0’
xmlns:soapenv=‘http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=‘http://www.w3.org/2001/XMLSchema-instance’>

soapenv:Body

cwmp:Inform

MikroTik

E48D8C

mAP

59AB04706DFF

M Reboot

1 BOOT

1

2022-10-25T19:43:40+02:00

1

Device.RootDataModelVersion

2.11

Device.DeviceInfo.SoftwareVersion

6.49.7

Device.DeviceInfo.ProvisioningCode

base_config

Device.DeviceInfo.HardwareVersion

v1.0

Device.ManagementServer.ParameterKey

Device.ManagementServer.ConnectionRequestURL

http://10.10.10.6:7547/219b01278c610ae91c6647dccc4685e831d4

Device.ManagementServer.AliasBasedAddressing

0

</cwmp:Inform>

</soapenv:Body>

</soapenv:Envelope>

event: outgoing HTTP response
timestamp: 2022-10-25T17:44:44.761Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
statusCode: 401
headers:
content-length: 12
www-authenticate: Digest realm=“GenieACS”,qop=“auth,auth-int”,nonce=“b226da334a44398a6491afd678b6c824”
body: Unauthorized

event: incoming HTTP request
timestamp: 2022-10-25T17:44:44.764Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
localPort: 7547
method: POST
url: /
headers:
authorization: Digest username=“sUpros”, realm=“GenieACS”, uri=“/”, algorithm=MD5, nonce=“b226da334a44398a6dsaf2491afd678b6c824”, nc=00000001, cnonce=“5d3a741d7470dfsa0cd659bac3814f519e78”, qop=auth, response=“a927f87f45ca8a4cfsdfs9c8a02b4f3671f3”, opaque=“”
content-length: “1952”
content-type: text/xml
host: genieacs.test.local
user-agent: MikroTik
body: >
<soapenv:Envelope xmlns:soap=‘http://schemas.xmlsoap.org/soap/encoding/
xmlns:xsd=‘XML Schema
xmlns:cwmp=‘urn:dslforum-org:cwmp-1-0’
xmlns:soapenv=‘http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=‘http://www.w3.org/2001/XMLSchema-instance’>

soapenv:Body

cwmp:Inform

MikroTik

E48D8C

mAP

59AB04706DFF

M Reboot

1 BOOT

1

2022-10-25T19:43:40+02:00

1

Device.RootDataModelVersion

2.11

Device.DeviceInfo.SoftwareVersion

6.49.7

Device.DeviceInfo.ProvisioningCode

base_config

Device.DeviceInfo.HardwareVersion

v1.0

Device.ManagementServer.ParameterKey

Device.ManagementServer.ConnectionRequestURL

http://10.10.10.6:7547/219b01278c610ae91c6647dccc4685e831d4

Device.ManagementServer.AliasBasedAddressing

0

</cwmp:Inform>

</soapenv:Body>

</soapenv:Envelope>

event: outgoing HTTP response
timestamp: 2022-10-25T17:44:44.766Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
statusCode: 200
headers:
content-length: 524
server: GenieACS/1.2.9+20220822165235
soapserver: GenieACS/1.2.9+20220822165235
content-type: text/xml; charset=“utf-8”
set-cookie: session=8d07eff5b6d3ae93
body: >-

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-enc=“http://schemas.xmlsoap.org/soap/encoding/
xmlns:soap-env=“http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd=“XML Schema
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xmlns:cwmp=“urn:dslforum-org:cwmp-1-0”>soap-env:Header<cwmp:ID
soap-env:mustUnderstand=“1”>null</cwmp:ID></soap-env:Header>soap-env:Bodycwmp:InformResponse1</cwmp:InformResponse></soap-env:Body></soap-env:Envelope>

event: incoming HTTP request
timestamp: 2022-10-25T17:44:44.770Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
localPort: 7547
method: POST
url: /
headers:
authorization: Digest username=“sUpros”, realm=“GenieACS”, uri=“/”, algorithm=MD5, nonce=“b226da334a44398asdfs6491afd678b6c824”, nc=00000002, cnonce=“0b540f9469746ff640sdfsbaf38138929a17”, qop=auth, response=“0ddc5d51fb689de7sdfsbd144b6d7b34df4f”, opaque=“”
content-length: “0”
cookie: session=8d07eff5b6d3ae93
host: genieacs.test.local
user-agent: MikroTik
body: “”

event: outgoing HTTP response
timestamp: 2022-10-25T17:44:44.776Z
remoteAddress: “::ffff:10.10.10.6”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-10-25T17:44:44.761Z
statusCode: 204
headers:
content-length: 0
server: GenieACS/1.2.9+20220822165235
soapserver: GenieACS/1.2.9+20220822165235
connection: close
body: “”

CPE seems to be contacting server just fine. I can summon it, i can manually push config files from server to CPE. I can reset and reboot the CPE from genieacs.
I have opened ports: 7547/tcp 7567/tcp to the server from CPEs.
Everything is working just fine except the “auto” part of Acs which is kind of crucial:)

No other suggestions?

Your provision is incorrect. Doing Date.now passes a function reference as the value param. You need the value of the function. So either change Date.now to now to use the local variable that has the date defined, or change it to Date.now().

image

Ah thank you akcoder! Looks like you caught an ugly error there. Will try it out when i get back to the office:)

Didnt do a whole lot i think.
I verified that my preset works using log(). It matches on event and precondition and fires the provisioning script:

2022-11-21T19:50:35.923Z [INFO] ::ffff:10.10.10.1 E48D8C-mAP-59AB04706DFF: Inform; informEvent=“M Reboot,1 BOOT” informRetryCount=1
2022-11-21T19:50:35.930Z [INFO] ::ffff:10.10.10.1 E48D8C-mAP-59AB04706DFF: Script: 1669060235878
2022-11-21T19:50:35.931Z [INFO] ::ffff:10.10.10.1 E48D8C-mAP-59AB04706DFF: Script: done
2022-11-21T19:50:35.936Z [INFO] ::ffff:10.10.10.1 E48D8C-mAP-59AB04706DFF: Script: 1669060235878

My Mikrotik doesnt download anything tho. How can i debug why its not working? There is nothing in the cwmp log indicating why it fails or why it doesnt do anything.

My provisioning script:
let now = Date.now();
log(now)
declare(“Downloads.[FileType:3 Vendor Configuration File]”,{path: 1}, {path: 1});
declare(“Downloads.[FileType:3 Vendor Configuration File].FileName”,{Value: 1}, {Value: “config_GE00379.alter”});
declare(“Downloads.[FileType:3 Vendor Configuration File].Download”,{Value: 1}, {Value: Date.now()});
log(“done”)

you can add the cwmp.debug setting with a value of true, or use Device.ID = '<your cpe id>' if you have a lot of devices. This will write out the entire soap trace to genieacs-cwmp-debug.yaml file.

Mikrotik’s now that I think about it don’t use 3 Vendor Configuration File. You need to send the file with type of X MIKROTIK Factory Configuration File.

-dan

It does use 3 vendor configuration file (this is a manual config upload):

Downloads.7
Downloads.7.CompleteTime 11/21/2022, 8:54:42 PM
Downloads.7.Download 11/21/2022, 9:02:17 PM
Downloads.7.FileName config_GE00379.alter
Downloads.7.FileType 3 Vendor Configuration File
Downloads.7.LastDownload 11/21/2022, 9:02:17 PM
Downloads.7.LastFileName config_GE00379.alter
Downloads.7.LastFileType 3 Vendor Configuration File
Downloads.7.LastTargetFileName
Downloads.7.StartTime 11/21/2022, 8:54:40 PM

The X MIKROTIK Factory Configuration File is for setting new default configuration in Mikrotik - in case someone hits the reset button on it.

From my cpe.debug (after enabling cwmp.debug and id=

[root@genieacs genieacs]# cat cpe.debug

event: incoming HTTP request
timestamp: 2022-11-21T20:14:42.475Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
localPort: 7547
method: POST
url: /
headers:
content-length: “1953”
content-type: text/xml
host: genieacs.jalla.com
user-agent: MikroTik
body: >
<soapenv:Envelope xmlns:soap=‘http://schemas.xmlsoap.org/soap/encoding/
xmlns:xsd=‘XML Schema
xmlns:cwmp=‘urn:dslforum-org:cwmp-1-0’
xmlns:soapenv=‘http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=‘http://www.w3.org/2001/XMLSchema-instance’>

soapenv:Body

cwmp:Inform

MikroTik

E48D8C

mAP

59AB04706DFF

M Reboot

1 BOOT

1

2022-11-21T21:13:00+01:00

1

Device.RootDataModelVersion

2.11

Device.DeviceInfo.SoftwareVersion

6.49.7

Device.DeviceInfo.ProvisioningCode

base_config

Device.DeviceInfo.HardwareVersion

v1.0

Device.ManagementServer.ParameterKey

Device.ManagementServer.ConnectionRequestURL

http://10.10.10.1:7547/992b3fcdf9890ce75a3c1896fdda9c5baa0c

Device.ManagementServer.AliasBasedAddressing

0

</cwmp:Inform>

</soapenv:Body>

</soapenv:Envelope>

event: outgoing HTTP response
timestamp: 2022-11-21T20:14:42.475Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
statusCode: 401
headers:
content-length: 12
www-authenticate: Digest realm=“GenieACS”,qop=“auth,auth-int”,nonce=“6ff6437c218bf52a284a34865853e59f34”
body: Unauthorized

event: incoming HTTP request
timestamp: 2022-11-21T20:14:42.479Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
localPort: 7547
method: POST
url: /
headers:
authorization: Digest username=“fckinhell”, realm=“GenieACS”, uri=“/”, algorithm=MD5, nonce=“6ff6437c218bf52a284a34865853e59f34”, nc=00000001, cnonce=“406af0c204e4eeeb1d60c43215b4296ef3d6”, qop=auth, response=“c556d989e8ee587dac1f3a2311705df5d15e”, opaque=“”
content-length: “1953”
content-type: text/xml
host: genieacs.jalla.com
user-agent: MikroTik
body: >
<soapenv:Envelope xmlns:soap=‘http://schemas.xmlsoap.org/soap/encoding/
xmlns:xsd=‘XML Schema
xmlns:cwmp=‘urn:dslforum-org:cwmp-1-0’
xmlns:soapenv=‘http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi=‘http://www.w3.org/2001/XMLSchema-instance’>

soapenv:Body

cwmp:Inform

MikroTik

E48D8C

mAP

59AB04706DFF

M Reboot

1 BOOT

1

2022-11-21T21:13:00+01:00

1

Device.RootDataModelVersion

2.11

Device.DeviceInfo.SoftwareVersion

6.49.7

Device.DeviceInfo.ProvisioningCode

base_config

Device.DeviceInfo.HardwareVersion

v1.0

Device.ManagementServer.ParameterKey

Device.ManagementServer.ConnectionRequestURL

http://10.10.10.1:7547/992b3fcdf9890ce75a3c1896fdda9c5baa0c

Device.ManagementServer.AliasBasedAddressing

0

</cwmp:Inform>

</soapenv:Body>

</soapenv:Envelope>

event: outgoing HTTP response
timestamp: 2022-11-21T20:14:42.480Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
statusCode: 200
headers:
content-length: 524
server: GenieACS/1.2.9+20220822165235
soapserver: GenieACS/1.2.9+20220822165235
content-type: text/xml; charset=“utf-8”
set-cookie: session=b0a939fe0c412e35
body: >-

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-enc=“http://schemas.xmlsoap.org/soap/encoding/
xmlns:soap-env=“http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd=“XML Schema
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xmlns:cwmp=“urn:dslforum-org:cwmp-1-0”>soap-env:Header<cwmp:ID
soap-env:mustUnderstand=“1”>null</cwmp:ID></soap-env:Header>soap-env:Bodycwmp:InformResponse1</cwmp:InformResponse></soap-env:Body></soap-env:Envelope>

event: incoming HTTP request
timestamp: 2022-11-21T20:14:42.484Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
localPort: 7547
method: POST
url: /
headers:
authorization: Digest username=“fckinhell”, realm=“GenieACS”, uri=“/”, algorithm=MD5, nonce=“6ff6437c218bf52a284a34865853e59f34”, nc=00000002, cnonce=“406af0c204e4eeeb1d60c43215b4296ef3d6”, qop=auth, response=“5d074c56b4a7711c08cfb8e400bc8aed”, opaque=“”
content-length: “0”
cookie: session=b0a939fe0c412e35
host: genieacs.jalla.com
user-agent: MikroTik
body: “”

event: outgoing HTTP response
timestamp: 2022-11-21T20:14:42.489Z
remoteAddress: “::ffff:10.10.10.1”
deviceId: E48D8C-mAP-59AB04706DFF
connection: 2022-11-21T20:14:42.475Z
statusCode: 204
headers:
content-length: 0
server: GenieACS/1.2.9+20220822165235
soapserver: GenieACS/1.2.9+20220822165235
connection: close
body: “”
[root@genieacs genieacs]#

What does ,{path: 1}, {path: 1}); refer to?