Created 07-12-2024 02:22 PM
I recently downloaded the latest version of NiFi (nifi-2.0.0-M4) and installed it by placing the folder in /opt/nifi-2.0.0-M4. The only modifications I made were in the nifi-env.sh and nifi.properties files as follows:
nifi-env.sh
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
nifi.properties
# Site to Site properties
nifi.remote.input.host=10.37.10.199
nifi.remote.input.secure=false
nifi.remote.input.socket.port=10000
nifi.remote.input.http.enabled=true
nifi.remote.input.http.transaction.ttl=60 sec
nifi.remote.contents.cache.expiration=60 secs
# web properties #
#############################################
# For security, NiFi will present the UI on 127.0.0.1 and only be accessible through this loopback interface.
# Be aware that changing these properties may affect how your instance can be accessed without any restriction.
# We recommend configuring HTTPS instead. The administrators guide provides instructions on how to do this.
nifi.web.http.host= 0.0.0.0 # Here goes the IP of my virtual machine in Ubuntu
nifi.web.http.port=8443
nifi.web.http.network.interface.default=
#############################################
nifi.web.https.host=
nifi.web.https.port=
When I run ./nifi.sh start, the server starts correctly and there are no errors in the console. However, when I open the URL in the browser, the page remains blank and the following error appears in the browser console:
TypeError: crypto.randomUUID is not a function
Additional Information:
Has anyone else encountered this issue or can provide guidance on how to resolve it? Any help would be greatly appreciated!
Created 09-25-2024 08:35 AM
@Twelve @aLiang
The crypto.randomUUID() issue when running NiFi over HTTP or on localhost has been resolved via https://issues.apache.org/jira/browse/NIFI-13680.
The fix will be part of next release after NiFi-2.0.0-M4.
Thanks,
Matt
Created 07-18-2024 05:25 PM
Hi,
I am also facing the same problem with no solution at the moment. Sharing some information which may shed some light as to why the issue is observed.
https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid/2117523#2117523
Created 07-19-2024 01:44 PM
Created on 09-20-2024 03:39 PM - edited 09-20-2024 04:09 PM
Hello ,this TypeError: crypto.randomUUID is not a function occurs because the environment in which you are running your application does not support the crypto.randomUUID() function. It is a versioning problem, either you solve the Polyfill from the code, or you can add this extension:
Once installed, create a new script and add this code.
(function() { 'use strict'; if (typeof crypto.randomUUID !== 'function') { crypto.randomUUID = function () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }); }; } })();
Or you can generate a static UUID from here:: https://www.uuidgenerator.net/version4
Enable developer mode in your browser, restart the extension, and then you will be able to see your started Nifi normally.
Use this for test scenarios.
Created 09-25-2024 01:07 AM
crypto.randomUUID is only allowed to run on HTTPS, and localhost should also be able to run on it.
Crypto.randomUUID() - Web API | MDN (mozilla.org)
Created 09-25-2024 08:35 AM
@Twelve @aLiang
The crypto.randomUUID() issue when running NiFi over HTTP or on localhost has been resolved via https://issues.apache.org/jira/browse/NIFI-13680.
The fix will be part of next release after NiFi-2.0.0-M4.
Thanks,
Matt