In my current project, I have been using apache-nifi on Windows operating system.
I have extracted nifi-0.7.0-bin.zip file in C:\. Now, when I run \bin\run-nifi.bat as an administrator I see the following message on the command line and I am not able to run nifi. Could you please suggest what should I do in order to run the nifi.
the content of app.log file as follows
2016-08-08 11:41:57,716 INFO [main] org.apache.nifi.NiFi Launching NiFi...
2016-08-08 11:41:57,851 INFO [main] org.apache.nifi.BootstrapListener Started Bootstrap Listener, Listening for incoming requests on port 50050
2016-08-08 11:41:57,877 INFO [main] org.apache.nifi.BootstrapListener Successfully initiated communication with Bootstrap
2016-08-08 11:42:59,485 WARN [Timer-0] org.apache.nifi.NiFi NiFi has detected that this box is not responding within the expected timing interval, which may cause Processors to be scheduled erratically. Please see the NiFi documentation for more information.
The content of nifi-bootstrap.log file is as follows:
2016-08-08 11:41:57,279 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2016-08-08 11:41:57,286 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2016-08-08 11:41:57,298 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-0~1.0
2016-08-08 11:41:57,299 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jdk1.8.0_102\bin\java.exe -classpath C:\NIFI-0~1.0\.\conf;C:\NIFI-0~1.0\.\lib\jcl-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\jul-to-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\log4j-over-slf4j-1.7.12.jar;C:\NIFI-0~1.0\.\lib\logback-classic-1.1.3.jar;C:\NIFI-0~1.0\.\lib\logback-core-1.1.3.jar;C:\NIFI-0~1.0\.\lib\nifi-api-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-documentation-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-nar-utils-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-properties-0.7.0.jar;C:\NIFI-0~1.0\.\lib\nifi-runtime-0.7.0.jar;C:\NIFI-0~1.0\.\lib\slf4j-api-1.7.12.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\NIFI-0~1.0\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=50049 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-0~1.0\bin\..\\logs org.apache.nifi.NiFi
2016-08-08 11:41:57,866 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\NIFI-0~1.0\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2016-08-08 11:41:57,876 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 50050
I recommend running NiFi with the current directory context in the bin directory:
Open a new command prompt window
Change to the NiFi bin directory, cd c:\nifi-0.7\bin
From c:\nifi-0.7\bin, execute run-nifi.bat
I believe run-nifi.bat depends on finding nifi-env.bat in the current directory, rather than finding it relative to its own path. If you ran C:\...\nifi-0.7.0\bin\run-nifi.bat, I think you would see that error.
Related
I am trying to install and start apache Nifi in order to access the browser UI on my Windows system.
When I download and extract the latest version of NiFi, after running the run-nifi bat file I get the following error:
2023-01-12 11:20:51,597 INFO [main] org.apache.nifi.bootstrap.Command Generating Self-Signed Certificate: Expires on 2023-03-13
2023-01-12 11:20:53,772 INFO [main] org.apache.nifi.bootstrap.Command Generated Self-Signed Certificate SHA-256: 5E63D14A2D5640344E58C1EB5C005F9753734DF7657D08D200A66B6CE8F0AF33
2023-01-12 11:20:53,787 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2023-01-12 11:20:53,787 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\NIFI-1~1.0
2023-01-12 11:20:53,787 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\zulu8.46.0.19-ca-jdk8.0.252-win_x64\bin\java.exe -classpath C:\NIFI-1~1.0.\conf;C:\NIFI-1~1.0.\lib\javax.servlet-api-3.1.0.jar;C:\NIFI-1~1.0.\lib\jcl-over-slf4j-1.7.36.jar;C:\NIFI-1~1.0.\lib\jetty-schemas-5.2.jar;C:\NIFI-1~1.0.\lib\jul-to-slf4j-1.7.36.jar;C:\NIFI-1~1.0.\lib\log4j-over-slf4j-1.7.36.jar;C:\NIFI-1~1.0.\lib\logback-classic-1.2.11.jar;C:\NIFI-1~1.0.\lib\logback-core-1.2.11.jar;C:\NIFI-1~1.0.\lib\nifi-api-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-framework-api-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-nar-utils-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-properties-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-property-utils-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-runtime-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-server-api-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-stateless-api-1.18.0.jar;C:\NIFI-1~1.0.\lib\nifi-stateless-bootstrap-1.18.0.jar;C:\NIFI-1~1.0.\lib\slf4j-api-1.7.36.jar -Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Dcurator-log-only-first-connection-issue-as-error-level=true -Djavax.security.auth.useSubjectCredsOnly=true -Djava.security.egd=file:/dev/urandom -Dzookeeper.admin.enableServer=false -Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=C:\NIFI-1~1.0.\conf\nifi.properties -Dnifi.bootstrap.listen.port=49551 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\NIFI-1~1.0\bin..\logs org.apache.nifi.NiFi
2023-01-12 11:20:53,787 INFO [main] org.apache.nifi.bootstrap.Command Failed to determine Process ID from [java.lang.ProcessImpl]: java.lang.Process.pid()
2023-01-12 11:20:53,787 WARN [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi but could not determined the Process ID
I am currently running java zulu8.46.0.19-ca-jdk8.0.252-win_x64
Here is the download I used:
https://www.apache.org/dyn/closer.lua?path=/nifi/1.19.1/nifi-1.19.1-bin.zip
Any help would be appreciated
I have a dataflow running in NiFi 1.12.0, the relevant properties from this installation is here:
nifi.sensitive.props.key=
nifi.sensitive.props.key.protected=
nifi.sensitive.props.algorithm=PBEWITHMD5AND256BITAES-CBC-OPENSSL
nifi.sensitive.props.provider=BC
nifi.sensitive.props.additional.keys=
I am facing migration issue in nifi when I upgrade base version to 1.16.3 from 1.12.0. which having following properties.
nifi.sensitive.props.key=testPassword
nifi.sensitive.props.key.protected=
nifi.sensitive.props.algorithm=NIFI_ARGON2_AES_GCM_256
nifi.sensitive.props.provider=BC
nifi.sensitive.props.additional.keys=
I am getting following exception while I execute command for migrating flow file.
nifi#nifi-service-0:/opt/nifi/nifi-toolkit-current/bin$ ./encrypt-config.sh -n $NIFI_HOME/conf/nifi.properties -f /opt/nifi/data/old_flow.xml.gz -s testPassword -x
[main] WARN org.apache.nifi.properties.ConfigEncryptionTool - The source nifi.properties and destination nifi.properties are identical [/opt/nifi/nifi-current/conf/nifi.properties] so the original will be overwritten
[main] WARN org.apache.nifi.properties.ConfigEncryptionTool - The source flow.xml.gz and destination flow.xml.gz are identical [/opt/nifi/data/old_flow.xml.gz] so the original will be overwritten
[main] WARN org.apache.nifi.properties.AbstractBootstrapPropertiesLoader - System Property [nifi.properties.file.path] not found: Using Relative Path [conf/nifi.properties]
[main] INFO org.apache.nifi.properties.NiFiPropertiesLoader - Loading Application Properties [/opt/nifi/nifi-current/conf/nifi.properties]
[main] INFO org.apache.nifi.properties.NiFiPropertiesLoader - Loading Application Properties [/opt/nifi/nifi-current/conf/nifi.properties]
[main] INFO org.apache.nifi.properties.ConfigEncryptionTool - Loaded NiFiProperties instance with 138 properties
[main] INFO org.apache.nifi.properties.NiFiPropertiesLoader - Loading Application Properties [/opt/nifi/nifi-current/conf/nifi.properties]
[main] INFO org.apache.nifi.properties.ConfigEncryptionTool - Migrating flow.xml file at /opt/nifi/data/old_flow.xml.gz. This could take a while if the flow XML is very large.
[main] ERROR org.apache.nifi.properties.ConfigEncryptionTool - Encountered an error: Decryption Failed with Algorithm [AES/GCM/NoPadding]
Encountered an error migrating flow content
usage: org.apache.nifi.properties.ConfigEncryptionTool [-h] [-v] [-n <file>] [-o <file>] [-l <file>] [-i <file>] [-a <file>] [-u <file>] [-f <file>] [-g <file>]
[-b <file>] [-S <protectionScheme>] [-k <keyhex>] [-e <keyhex>] [-H <protectionScheme>] [-p <password>] [-w <password>] [-r] [-m] [-x] [-s
<password|keyhex>] [-A <algorithm>] [-P <algorithm>] [-c]
This tool reads from a nifi.properties and/or login-identity-providers.xml file with plain sensitive configuration values, prompts the user for a root key, and
encrypts each value. It will replace the plain value with the protected value in the same file (or write to a new file if specified). It can also be used to
migrate already-encrypted values in those files or in flow.xml.gz to be encrypted with a new key.
Please help to solve this issue
Solved by myself.
Issue can be resolved by following steps
Before migration if you don't have nifi.sensitive.props.key set, set it using following command ${NIFI_TOOLKIT_PAT}/bin/encrypt-config.sh -f /opt/nifi/nifi-current/data/flow.xml.gz -p ${NIFI_HOME}/conf/nifi.properties -s <NEW_KEY_TO_SET> -x
Once key is set upgrade nifi. Since in newer version algorithm is changed set it using command ${NIFI_HOME}/bin/nifi.sh set-sensitive-properties-algorithm <NEW_ALGORITHM>
Once algorithm set, encrypt again using command ${NIFI_TOOLKIT_PAT}/bin/encrypt-config.sh -f /opt/nifi/nifi-current/data/flow.xml.gz -p ${NIFI_HOME}/conf/nifi.properties -s <NEW_KEY_TO_SET> -x
Now you will get all compatible files with respect your latest version
We have a spring boot (version 1.3.3) application running as an init.d service. It's configurated as it's stated in the spring boot documentation for deployment here.
We use a ".conf" file to define the RUN_ARGS, the JVM arguments and the environment variables in the scope of the app.
We have no problem with the app functionality, but when we start the service (service myapp start) it creates a folder called "LOGS_PATH_IS_UNDEFINED" and it starts to log inside it. After a few lines, the app continues to log in the folder defined in the environment variable defined in the ".conf" file.
This is the myapp.conf content:
LOGS_PATH="/usr/logs"
JAVA_HOME="/usr/java/jdk1.8.0_77"
JAVA_OPTS="-Xms256m -Xmx512m"
RUN_ARGS="--spring.profiles.active=staging --server.port=8090"
This is the log content in the "LOGS_PATH_IS_UNDEFINED" (without sensible info):
2018-10-08 09:43:42,549 INFO [main] Application:? : Starting Application v1.0 on server with PID xxxx (/opt/myapp/myapp.jar started by server in /opt/myapp)
2018-10-08 09:43:42,552 INFO [main] Application:? : The following profiles are active: staging
2018-10-08 09:43:51,106 INFO [localhost-startStop-1] WebConfigurer:? : Web application configuration, using profiles: [staging]
2018-10-08 09:43:51,133 INFO [localhost-startStop-1] WebConfigurer:? : Web application fully configured
2018-10-08 09:43:59,435 INFO [localhost-startStop-1] Application:? : Running with Spring profile(s) : [staging]
2018-10-08 09:44:01,215 INFO [main] ThymeleafConfiguration:? : loading non-reloadable mail messages resources
2018-10-08 09:44:14,223 INFO [main] Application:? : Started Application in 33.926 seconds (JVM running for 35.172)
2018-10-08 09:44:14,223 INFO [main] Application:? : Access URLs:
----------------------------------------------------------
Local: http://127.0.0.1:8090
External: http://127.0.1.1:8090
----------------------------------------------------------
2018-10-08 09:44:27,844 INFO [http-nio-8090-exec-1] CustomPersistentRememberMeServices:? : presentedToken=xxxxx / tokenValue=xxxxx
The DevOps have no idea why and they are demanding us to fix it.
We do not have this problem running the app in the command line as an executable jar.
We use Logback for logging.
Thanks in advance for the help!
We fixed it!
The environment variable was not set in the server. A simple "export" before the LOGS_PATH="/usr/logs" line in the ".conf" fixed the problem.
I have a scala app that is running in docker container. I use image 'develar/java' which is based on alpine linux. My app is working, but i don't see cyrillic logs. Here what i have:
docker logs -f myApp
22:22:08.152 [main] INFO application - Creating Pool for datasource 'default'
22:22:09.213 [main] INFO play.api.db.DefaultDBApi - Database [default] connected at jdbc:postgresql://localhost/db
22:22:09.627 [main] INFO p.a.l.concurrent.ActorSystemProvider - Starting application default Akka system: application
22:22:09.698 [main] INFO application - ????????????? ??????? ???????
22:22:09.722 [main] INFO application - ????????????? ??????? 'direct
22:22:09.734 [main] INFO application - ????????????? ??????? 'adwords
22:22:09.761 [main] INFO play.api.Play$ - Application started (Prod)
22:22:09.866 [main] INFO play.core.server.NettyServer$ - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
But logs that are delivered to elasticsearch server are ok. How can i force alpine linux to work with utf-8?
develar/java has an old bug of an old glibc 2.21 package. Andy Shinn (the creator and maintainer of glibc package for Alpine) and I have resolved this a long time ago in glibc 2.23 packaging, which I have integrated into frolvlad/alpine-glibc, which is the base image for frolvlad/alpine-oraclejre8. Just replace devalar/java with frolvlad/alpine-oraclejre8:slim and you should be fine.
I've tried to run my test suite by Selenium RC through a BAT file.
Actually it worked OK until yesterday morning and it stopped to run my test suite.
Probably because I've added user-extensions.js and since that I can't run my test suite by the selenium RC.
How can I add this script to my test suite?
I'm using Selenium IDE for to write my test cases, so I guess that make this more complex problem..
This is the console log of the BAT file during the execution:
>
C:\automation>cd C:\automation\screenshots\
C:\automation\screenshots>del *.png
Could Not Find C:\automation\screenshots\*.png
10:46:38.926 INFO - Launching a standalone server
10:46:39.098 INFO - Java: Oracle Corporation 25.25-b02
10:46:39.098 INFO - OS: Windows 8.1 6.3 amd64
10:46:39.113 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
10:46:39.238 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
10:46:39.238 INFO - Version Jetty/5.1.x
10:46:39.238 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:46:39.379 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#6e3c1e
69
10:46:39.379 INFO - Started HttpContext[/wd,/wd]
10:46:39.379 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
10:46:39.379 INFO - Started HttpContext[/,/]
10:46:39.379 INFO - Started SocketListener on 0.0.0.0:4444
10:46:39.379 INFO - Started org.openqa.jetty.jetty.Server#b1bc7ed
jar:file:/C:/automation/selenium-server-standalone-2.44.0.jar!/customProfileDirC
USTFFCHROME
10:46:39.535 INFO - Preparing Firefox profile...
10:46:42.666 INFO - Launching Firefox...
10:46:44.245 INFO - Checking Resource aliases
This is the code line from the BAT file:
java -jar C:\automation\selenium-server-standalone-2.44.0.jar -htmlSuite "*firefox C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "https://www.mywebsite.com" "C:\automation\emailSanity.html" "C:\automation\testing_results.html" -port 4444
This is the screenshot of the actual result of the Selenium RC in action:
http://i57.tinypic.com/28u71jl.png
Please your help!
Thanks a lot.
Considering your app is at the splash screen, I can only assume that you forgot to put in your URL to initially open.
Since you are using RC, then your first statement of your test script should be:
selenium.open("http://example.com"); // where example.com is the app is your SUT.