Passenger with apache2 server for ruby is not starting - ruby

Problem: I am not able start the ruby application with passenger + apache2
Ruby Version: ruby 2.1.2p95 (2014-05-08 revision 45877)
Phusion Passenger 5.0.29
OS: Debian 8 jessie
Apache/2.4.10
When starting apache with following command then getting error in the logs.
sudo /etc/init.d/apache2 start
tail -f /var/log/fk-portkey/production.log
Initializing Phusion Passenger...
[ 2019-03-22 10:31:03.1041 14486/7fc3bde5e740 agents/Base.cpp:1591 ]: Random seed: 1553230863
[ 2019-03-22 10:31:03.1042 14486/7fc3bde5e740 agents/Watchdog/Main.cpp:698 ]: Starting Watchdog...
[ 2019-03-22 10:31:03.1043 14486/7fc3bde5e740 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/lib/ruby-flo/bin/ruby', 'default_user' => 'nobody', 'log_level' => '3', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby-flo/lib/ruby/gems/2.1.0/gems/passenger-4.0.58', 'passenger_version' => '4.0.58', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.58', 'web_server_pid' => '14485', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2019-03-22 10:31:03.1109 14489/7fd1250f7740 agents/Base.cpp:1591 ]: Random seed: 1553230863
[ 2019-03-22 10:31:03.1111 14489/7fd1250f7740 agents/HelperAgent/Main.cpp:643 ]: Starting PassengerHelperAgent...
[ 2019-03-22 10:31:03.1137 14489/7fd1250f7740 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.14485/generation-0/request
[ 2019-03-22 10:31:03.1265 14495/7ff2ad310780 agents/Base.cpp:1591 ]: Random seed: 1553230863
[ 2019-03-22 10:31:03.1306 14495/7ff2ad310780 agents/LoggingAgent/Main.cpp:333 ]: Starting PassengerLoggingAgent...
[ 2019-03-22 10:31:03.1319 14495/7ff2ad310780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.14485/generation-0/logging
[ 2019-03-22 10:31:03.1325 14486/7fc3bde5e740 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[ 2019-03-22 10:31:03.1350 14485/7f8602b75780 apache2/Hooks.cpp:1583 ]: Shutting down Phusion Passenger...
[ 2019-03-22 10:31:03.1362 14489/7fd1250f7740 agents/HelperAgent/Main.cpp:599 ]: Received command to exit gracefully. Waiting until 5 seconds after all clients have disconnected...
[ 2019-03-22 10:31:03.1368 14486/7fc3bde5e740 agents/Watchdog/Main.cpp:741 ]: Web server exited gracefully; gracefully shutting down all agents...
When I start the application with the following command then getting error in the logs.
sudo /etc/init.d/fk-portkey start
tail -f /var/log/fk-portkey/production.log
Error: https://pastebin.com/gDJ9W8jt
Content of /tmp/passenger-error-Xjl3B1.html
When reloading apache getting following logs
/etc/init.d/apache2 reload
tail -f /var/log/fk-portkey/production.log
[ 2019-03-25 14:57:07.4026 11018/7fa77d79a700 age/Cor/CoreMain.cpp:532 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2019-03-25 14:57:07.4027 11027/7f22a3ff5700 Ser/Server.h:464 ]: [UstRouter] Shutdown finished
[ 2019-03-25 14:57:07.4027 11018/7fa782ca1780 age/Cor/CoreMain.cpp:901 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2019-03-25 14:57:07.4027 11027/7f22a37f4700 Ser/Server.h:817 ]: [UstRouterApiServer] Freed 0 spare client objects
[ 2019-03-25 14:57:07.4028 11027/7f22a37f4700 Ser/Server.h:464 ]: [UstRouterApiServer] Shutdown finished
[ 2019-03-25 14:57:07.4031 11018/7fa75dffb700 Ser/Server.h:817 ]: [ApiServer] Freed 0 spare client objects
[ 2019-03-25 14:57:07.4032 11018/7fa75dffb700 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
[ 2019-03-25 14:57:07.4034 11018/7fa75effd700 Ser/Server.h:817 ]: [ServerThr.5] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4035 11018/7fa75effd700 Ser/Server.h:464 ]: [ServerThr.5] Shutdown finished
[ 2019-03-25 14:57:07.4035 11018/7fa75f7fe700 Ser/Server.h:817 ]: [ServerThr.4] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4036 11018/7fa75f7fe700 Ser/Server.h:464 ]: [ServerThr.4] Shutdown finished
[ 2019-03-25 14:57:07.4037 11027/7f22a9286780 age/Ust/UstRouterMain.cpp:523 ]: Passenger UstRouter shutdown finished
[ 2019-03-25 14:57:07.4041 11018/7fa77d79a700 Ser/Server.h:817 ]: [ServerThr.1] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4042 11018/7fa75e7fc700 Ser/Server.h:817 ]: [ServerThr.6] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4043 11018/7fa75e7fc700 Ser/Server.h:464 ]: [ServerThr.6] Shutdown finished
[ 2019-03-25 14:57:07.4043 11018/7fa75ffff700 Ser/Server.h:817 ]: [ServerThr.3] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4043 11018/7fa75ffff700 Ser/Server.h:464 ]: [ServerThr.3] Shutdown finished
[ 2019-03-25 14:57:07.4042 11018/7fa77d79a700 Ser/Server.h:464 ]: [ServerThr.1] Shutdown finished
[ 2019-03-25 14:57:07.4053 11018/7fa77cf18700 Ser/Server.h:817 ]: [ServerThr.2] Freed 128 spare client objects
[ 2019-03-25 14:57:07.4054 11018/7fa77cf18700 Ser/Server.h:464 ]: [ServerThr.2] Shutdown finished
[ 2019-03-25 14:57:07.4402 11054/7f9245b52780 age/Wat/WatchdogMain.cpp:1291 ]: Starting Passenger watchdog...
[ 2019-03-25 14:57:07.4574 11058/7f82fd844780 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
[ 2019-03-25 14:57:07.4578 11058/7f82fd844780 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
[ 2019-03-25 14:57:07.4632 11058/7f82fd844780 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 11058
[ 2019-03-25 14:57:07.4768 11067/7f04580e0780 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2019-03-25 14:57:07.4781 11067/7f04580e0780 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 11067
[ 2019-03-25 14:57:07.4904 11018/7fa782ca1780 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
App 11170 stdout:

Related

passenger not starting up but don't really see an error

I tried to follow this:
https://www.vultr.com/docs/how-to-install-redmine-on-centos-7
I think I had it working on my own little centos7 box here. Though it seems it never comes up and always exits in the /var/log/httpd/error_log but don't see why. I do see two warnings but to me those shouldn't effect it starting up? Does any extra set of eyes see anything in this log?
[Wed May 08 15:12:53.300528 2019] [suexec:notice] [pid 26924] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[ N 2019-05-08 15:12:53.3486 26926/T1 age/Wat/WatchdogMain.cpp:1366 ]: Starting Passenger watchdog...
[ N 2019-05-08 15:12:53.3860 26929/T1 age/Cor/CoreMain.cpp:1339 ]: Starting Passenger core...
[ N 2019-05-08 15:12:53.3863 26929/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ W 2019-05-08 15:12:53.4070 26929/T1 age/Cor/CoreMain.cpp:1006 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.2) can be changed by non-root user(s):
- /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.2 is not secure: it can be modified by group rvm
- /usr/local/rvm/gems/ruby-2.6.3/gems is not secure: it can be modified by group rvm
- /usr/local/rvm/gems/ruby-2.6.3 is not secure: it can be modified by group rvm
- /usr/local/rvm/gems is not secure: it can be modified by group rvm
- /usr/local/rvm is not secure: it can be modified by group rvm
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2019-05-08 15:12:53.4071 26929/T1 age/Cor/CoreMain.cpp:1014 ]: Passenger core online, PID 26929
[ N 2019-05-08 15:12:53.6931 26929/T8 age/Cor/CoreMain.cpp:671 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2019-05-08 15:12:53.6931 26929/T1 age/Cor/CoreMain.cpp:1245 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2019-05-08 15:12:53.6932 26929/Ta Ser/Server.h:902 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2019-05-08 15:12:53.6932 26929/Ta Ser/Server.h:558 ]: [ServerThr.2] Shutdown finished
[ N 2019-05-08 15:12:53.6933 26929/T8 Ser/Server.h:902 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2019-05-08 15:12:53.6933 26929/T8 Ser/Server.h:558 ]: [ServerThr.1] Shutdown finished
[ N 2019-05-08 15:12:53.6933 26929/Tc Ser/Server.h:902 ]: [ServerThr.3] Freed 0 spare client objects
[ N 2019-05-08 15:12:53.6933 26929/Te Ser/Server.h:902 ]: [ServerThr.4] Freed 0 spare client objects
[ N 2019-05-08 15:12:53.6933 26929/Tc Ser/Server.h:558 ]: [ServerThr.3] Shutdown finished
[ N 2019-05-08 15:12:53.6933 26929/Te Ser/Server.h:558 ]: [ServerThr.4] Shutdown finished
[ N 2019-05-08 15:12:53.6938 26929/Tg Ser/Server.h:902 ]: [ApiServer] Freed 0 spare client objects
[ N 2019-05-08 15:12:53.6938 26929/Tg Ser/Server.h:558 ]: [ApiServer] Shutdown finished
WARNING: PassengerRoot cannot occur within <VirtualHost> section
[Wed May 08 15:12:53.732238 2019] [auth_digest:notice] [pid 26924] AH01757: generating secret for digest authentication ...
[ N 2019-05-08 15:12:53.7823 26956/T1 age/Wat/WatchdogMain.cpp:1366 ]: Starting Passenger watchdog...
[ N 2019-05-08 15:12:53.8208 26959/T1 age/Cor/CoreMain.cpp:1339 ]: Starting Passenger core...
[ N 2019-05-08 15:12:53.8211 26959/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ W 2019-05-08 15:12:53.8418 26959/T1 age/Cor/CoreMain.cpp:1006 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.2) can be changed by non-root user(s):
- /usr/local/rvm/gems/ruby-2.6.3/gems/passenger-6.0.2 is not secure: it can be modified by group rvm
- /usr/local/rvm/gems/ruby-2.6.3/gems is not secure: it can be modified by group rvm
- /usr/local/rvm/gems/ruby-2.6.3 is not secure: it can be modified by group rvm
- /usr/local/rvm/gems is not secure: it can be modified by group rvm
- /usr/local/rvm is not secure: it can be modified by group rvm
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2019-05-08 15:12:53.8418 26959/T1 age/Cor/CoreMain.cpp:1014 ]: Passenger core online, PID 26959
[Wed May 08 15:12:53.842702 2019] [lbmethod_heartbeat:notice] [pid 26924] AH02282: No slotmem from mod_heartmonitor
[Wed May 08 15:12:53.924503 2019] [mpm_prefork:notice] [pid 26924] AH00163: Apache/2.4.6 (CentOS) Phusion_Passenger/6.0.2 mod_auth_gssapi/1.5.1 mod_nss/1.0.14 NSS/3.28.4 mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
[Wed May 08 15:12:53.924564 2019] [core:notice] [pid 26924] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[ N 2019-05-08 15:12:54.4980 26929/T1 age/Cor/TelemetryCollector.h:531 ]: Message from Phusion: End time can not be before or equal to begin time
[ N 2019-05-08 15:12:54.5497 26929/T1 age/Cor/CoreMain.cpp:1324 ]: Passenger core shutdown finished
[ N 2019-05-08 15:12:57.5521 26959/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
I edited the 00-base.conf as indicated in the link, and the redmine.conf same, with the right paths that were displayed by the
passenger-install-apache2-module
command as described on the site too.
not sure what else to check or do, I did disable SELinux too.

No supervisors are running in Laravel Homestead

I recently installed Horizon on a Laravel project which is running on a Homestead Vagrant box.
My issue is that no jobs are being picked up by the queue workers. I have no supervisors:
vagrant#homestead:~/Code/project$ artisan horizon:list
+----------------+------+-------------+---------+
| Name | PID | Supervisors | Status |
+----------------+------+-------------+---------+
| homestead-D2dV | 7094 | None | running |
+----------------+------+-------------+---------+
vagrant#homestead:~/Code/project$ artisan horizon:supervisors
No supervisors are running.
Here is my supervisor (horizon.conf) configuration:
[program:horizon]
process_name=%(program_name)s
command=/usr/bin/php /home/vagrant/Code/project/artisan horizon
autostart=true
autorestart=true
user=vagrant
redirect_stderr=true
stdout_logfile=/home/vagrant/Code/project/storage/logs/horizon.log
When I bring this machine up, my logs and the web interface indicate that "Horizon started successfully.".
And my horizon (horizon.php) configuration:
'environments' => [
'production' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default', 'queue-1', 'queue-2', 'queue-3'],
'balance' => 'auto',
'processes' => env('HORIZON_PROCESSES', 10),
'tries' => 3,
],
],
'local' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default', 'queue-1', 'queue-2', 'queue-3'],
'balance' => 'auto',
'processes' => env('HORIZON_PROCESSES', 3),
'tries' => 3,
],
],
],
My supervisor appears to be active as well:
vagrant#homestead:~/Code/project$ sudo service supervisor status
● supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-03-28 13:03:08 UTC; 6h ago
Docs: http://supervisord.org
Process: 1591 ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown (code=exited, status=0/SUCCESS)
Main PID: 2547 (supervisord)
Tasks: 2
Memory: 34.4M
CPU: 21.038s
CGroup: /system.slice/supervisor.service
├─2547 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
└─7094 /usr/bin/php /home/vagrant/Code/project/artisan horizon
Mar 28 18:32:13 homestead supervisord[2547]: 2018-03-28 18:32:13,225 INFO spawned: 'horizon' with pid 7057
Mar 28 18:32:15 homestead supervisord[2547]: 2018-03-28 18:32:15,055 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Mar 28 18:32:16 homestead php[7057]: DIGEST-MD5 common mech free
Mar 28 18:32:16 homestead supervisord[2547]: 2018-03-28 18:32:16,693 INFO exited: horizon (exit status 0; expected)
Mar 28 18:32:17 homestead supervisord[2547]: 2018-03-28 18:32:17,706 INFO spawned: 'horizon' with pid 7072
Mar 28 18:32:19 homestead supervisord[2547]: 2018-03-28 18:32:19,584 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Mar 28 18:32:26 homestead php[7072]: DIGEST-MD5 common mech free
Mar 28 18:32:26 homestead supervisord[2547]: 2018-03-28 18:32:26,206 INFO exited: horizon (exit status 0; expected)
Mar 28 18:32:27 homestead supervisord[2547]: 2018-03-28 18:32:27,210 INFO spawned: 'horizon' with pid 7094
Mar 28 18:32:29 homestead supervisord[2547]: 2018-03-28 18:32:29,052 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Any thoughts or ideas as to why my supervisor(s) are not working?
Turns out my horizon.php configuration was wrong.
I changed this line:
'local' => [ ...
To match my APP_ENV environment variable; which I had set as development.

Apache CAMEL + HTTPS REST API (post)

Im a newbie to apache camle and
Lately Ive been trying to make a post request to a HTTPS Rest API.
I have gone through many posts and documentation but still I couldnt get a gist of this.
Please find my code below
**
from("timer:aTimer?period=20s")
.process(ex->ex.getIn().setBody(
"{\n" +
" \"userId\": 777,\n" +
" \"title\": \"sample\",\n" +
" \"body\": \"my body\"\n" +
" }"
))
.setHeader(Exchange.HTTP_METHOD,constant("POST"))
.setHeader(Exchange.CONTENT_TYPE,constant("application/json"))
.to("restlet:https://jsonplaceholder.typicode.com/posts")
.log("${body}");**
Whenever I run my application im getting the below error.
Started
INFO DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) is starting
INFO ManagedManagementStrategy - JMX is enabled
INFO DefaultTypeConverter - Type converters loaded (core: 192, classpath: 14)
INFO DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
Mar 05, 2018 3:20:45 PM org.restlet.ext.httpclient.HttpClientHelper start
INFO: Starting the Apache HTTP client
INFO DefaultCamelContext - Route: route1 started and consuming from: timer://aTimer?period=20s
INFO DefaultCamelContext - Total 1 routes, of which 1 are started
INFO DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) started in 0.879 seconds
INFO DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) is shutting down
INFO DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 300 seconds)
INFO DefaultShutdownStrategy - Waiting as there are still 1 inflight and pending exchanges to complete, timeout in 300 seconds. Inflights per route: [route1 = 1]
INFO DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ID-ubuntu-Latitude-6430U-1520243444162-0-1, fromRouteId=route1, routeId=route1, nodeId=to1, elapsed=0, duration=3018]
INFO DefaultShutdownStrategy - Waiting as there are still 1 inflight and pending exchanges to complete, timeout in 299 seconds. Inflights per route: [route1 = 1]
INFO DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ID-ubuntu-Latitude-6430U-1520243444162-0-1, fromRouteId=route1, routeId=route1, nodeId=to1, elapsed=0, duration=4020]
INFO DefaultShutdownStrategy - Waiting as there are still 1 inflight and pending exchanges to complete, timeout in 298 seconds. Inflights per route: [route1 = 1]
INFO DefaultShutdownStrategy - There are 1 inflight exchanges:
InflightExchange: [exchangeId=ID-ubuntu-Latitude-6430U-1520243444162-0-1, fromRouteId=route1, routeId=route1, nodeId=to1, elapsed=0, duration=5023]
Mar 05, 2018 3:20:51 PM org.restlet.ext.httpclient.internal.HttpMethodCall sendRequest
WARNING: An error occurred during the communication with the remote HTTP server.
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
at sun.security.ssl.InputRecord.read(InputRecord.java:527)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:573)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:557)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:339)
at org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:363)
at org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:81)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:119)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.Restlet.handle(Restlet.java:342)
at org.restlet.Restlet.handle(Restlet.java:355)
at org.apache.camel.component.restlet.RestletProducer.process(RestletProducer.java:179)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
WARN TimerConsumer - Error processing exchange. Exchange[ID-ubuntu-Latitude-6430U-1520243444162-0-1]. Caused by: [org.apache.camel.component.restlet.RestletOperationException - Restlet operation failed invoking https://jsonplaceholder.typicode.com:80/443:posts with statusCode: 1001 /n responseBody:HTTPS/1.1 - Communication Error (1001) - The connector failed to complete the communication with the server]
org.apache.camel.component.restlet.RestletOperationException: Restlet operation failed invoking https://jsonplaceholder.typicode.com:80/443:posts with statusCode: 1001 /n responseBody:HTTPS/1.1 - Communication Error (1001) - The connector failed to complete the communication with the server
at org.apache.camel.component.restlet.RestletProducer.populateRestletProducerException(RestletProducer.java:304)
at org.apache.camel.component.restlet.RestletProducer$1.handle(RestletProducer.java:190)
at org.restlet.engine.adapter.ClientAdapter$1.handle(ClientAdapter.java:90)
at org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:371)
at org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:81)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:119)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.Restlet.handle(Restlet.java:342)
at org.restlet.Restlet.handle(Restlet.java:355)
at org.apache.camel.component.restlet.RestletProducer.process(RestletProducer.java:179)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
ERROR DefaultErrorHandler - Failed delivery for (MessageId: ID-ubuntu-Latitude-6430U-1520243444162-0-2 on ExchangeId: ID-ubuntu-Latitude-6430U-1520243444162-0-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.restlet.RestletOperationException: Restlet operation failed invoking https://jsonplaceholder.typicode.com:80/443:posts with statusCode: 1001 /n responseBody:HTTPS/1.1 - Communication Error (1001) - The connector failed to complete the communication with the server
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[route1 ] [route1 ] [timer://aTimer?period=20s ] [ 5321]
[route1 ] [process1 ] [Processor#0x33ae3bf8 ] [ 4]
[route1 ] [setHeader1 ] [setHeader[CamelHttpMethod] ] [ 0]
[route1 ] [setHeader2 ] [setHeader[Content-Type] ] [ 0]
[route1 ] [to1 ] [restlet:https://jsonplaceholder.typicode.com/443:posts ] [ 5308]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.restlet.RestletOperationException: Restlet operation failed invoking https://jsonplaceholder.typicode.com:80/443:posts with statusCode: 1001 /n responseBody:HTTPS/1.1 - Communication Error (1001) - The connector failed to complete the communication with the server
at org.apache.camel.component.restlet.RestletProducer.populateRestletProducerException(RestletProducer.java:304)
at org.apache.camel.component.restlet.RestletProducer$1.handle(RestletProducer.java:190)
at org.restlet.engine.adapter.ClientAdapter$1.handle(ClientAdapter.java:90)
at org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:371)
at org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:81)
at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:119)
at org.restlet.Client.handle(Client.java:153)
at org.restlet.Restlet.handle(Restlet.java:342)
at org.restlet.Restlet.handle(Restlet.java:355)
at org.apache.camel.component.restlet.RestletProducer.process(RestletProducer.java:179)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Mar 05, 2018 3:20:52 PM org.restlet.ext.httpclient.HttpClientHelper stop
INFO: Stopping the HTTP client
INFO DefaultShutdownStrategy - Route: route1 shutdown complete, was consuming from: timer://aTimer?period=20s
INFO DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 3 seconds
INFO DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) uptime 7.927 seconds
INFO DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) is shutdown in 3.048 seconds
Please help me.. I've also tried to use Apache HTTP4 component but still no luck.

ins-20802 - oracle net configuration assistant failed during installation - centos 7

Hello I am trying to folow the manual for installing the Oracle 12c. Actually it was already installed on the machine, and then deinstalled.
During installiation I get the "[ins-20802] oracle net configuration assistant failed during installation" error window. And proposed detail log file, where I can see:
INFO: ... GenericInternalPlugIn: starting read loop.
INFO: Read:
WARNING: Skipping line:
INFO: End of argument passing to stdin
INFO: Read: Parsing command line arguments:
WARNING: Skipping line: Parsing command line arguments:
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "orahome" = /u01/app/oracle/product/12.1.0/db_1
WARNING: Skipping line: Parameter "orahome" = /u01/app/oracle/product/12.1.0/db_1
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "orahnam" = OraDB12Home1
WARNING: Skipping line: Parameter "orahnam" = OraDB12Home1
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "instype" = typical
WARNING: Skipping line: Parameter "instype" = typical
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "inscomp" = client,oraclenet,javavm,server,ano
WARNING: Skipping line: Parameter "inscomp" = client,oraclenet,javavm,server,ano
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "insprtcl" = tcp
WARNING: Skipping line: Parameter "insprtcl" = tcp
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "cfg" = local
WARNING: Skipping line: Parameter "cfg" = local
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "authadp" = NO_VALUE
WARNING: Skipping line: Parameter "authadp" = NO_VALUE
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "responsefile" = /u01/app/oracle/product/12.1.0/db_1/network/install/netca_typ.rsp
WARNING: Skipping line: Parameter "responsefile" = /u01/app/oracle/product/12.1.0/db_1/network/install/netca_typ.rsp
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "silent" = true
WARNING: Skipping line: Parameter "silent" = true
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Parameter "ouiinternal" = true
WARNING: Skipping line: Parameter "ouiinternal" = true
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Done parsing command line arguments.
WARNING: Skipping line: Done parsing command line arguments.
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Oracle Net Services Configuration:
WARNING: Skipping line: Oracle Net Services Configuration:
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Profile configuration complete.
WARNING: Skipping line: Profile configuration complete.
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Oracle Net Listener Startup:
WARNING: Skipping line: Oracle Net Listener Startup:
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Running Listener Control:
WARNING: Skipping line: Running Listener Control:
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: /u01/app/oracle/product/12.1.0/db_1/bin/lsnrctl start LISTENER
WARNING: Skipping line: /u01/app/oracle/product/12.1.0/db_1/bin/lsnrctl start LISTENER
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Listener Control complete.
WARNING: Skipping line: Listener Control complete.
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Listener start failed.
WARNING: Skipping line: Listener start failed.
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Check the trace file for details: /u01/app/oracle/cfgtoollogs/netca/trace_OraDB12Home1-1504033PM3901.log
WARNING: Skipping line: Check the trace file for details: /u01/app/oracle/cfgtoollogs/netca/trace_OraDB12Home1-1504033PM3901.log
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Read: Oracle Net Services configuration failed. The exit code is 1
WARNING: Skipping line: Oracle Net Services configuration failed. The exit code is 1
INFO: Exceeded the number of arguments passed to stdin. CurrentCount:1 Total args:0
INFO: Completed Plugin named: Oracle Net Configuration Assistant
Ans the corresponding trace_OraDB12Home1-1504033PM3901.log:
[main] [ 2015-04-03 15:39:06.329 MSK ] [OracleHome.getVersion:1059] Current Version From Inventory: 12.1.0.2.0
[main] [ 2015-04-03 15:39:06.329 MSK ] [InitialSetup.<init>:4151] Admin location is: /u01/app/oracle/product/12.1.0/db_1/network/admin
[main] [ 2015-04-03 15:39:06.718 MSK ] [ConfigureProfile.setProfileParam:140] Setting NAMES.DIRECTORY_PATH: (TNSNAMES, EZCONNECT)
[main] [ 2015-04-03 15:39:06.735 MSK ] [HAUtils.getCurrentOracleHome:593] Oracle home from system property: /u01/app/oracle/product/12.1.0/db_1
[main] [ 2015-04-03 15:39:06.735 MSK ] [HAUtils.getConfiguredGridHome:1343] ----- Getting CRS HOME ----
[main] [ 2015-04-03 15:39:06.737 MSK ] [UnixSystem.getCRSHome:2878] olrFileName = /etc/oracle/olr.loc
[main] [ 2015-04-03 15:39:06.795 MSK ] [HAUtils.getHASHome:1500] Failed to get HAS home.
PRCI-1144 : Failed to retrieve Oracle Grid Infrastructure home path
PRKC-1144 : File "/etc/oracle/olr.loc" not found.
[main] [ 2015-04-03 15:39:06.795 MSK ] [InitialSetup.checkHAConfiguration:4808] HA Server is NOT configured.
[main] [ 2015-04-03 15:39:06.797 MSK ] [NetCAResponseFile.<init>:75] Response file initialized: /u01/app/oracle/product/12.1.0/db_1/network/install/netca_typ.rsp
[main] [ 2015-04-03 15:39:06.798 MSK ] [NetCAResponseFile.getInstalledComponents:114] Installed components from response file: server, net8, javavm
[main] [ 2015-04-03 15:39:06.798 MSK ] [NetCAResponseFile.getVirtualHost:171] Virtual Host from response file: null
[main] [ 2015-04-03 15:39:06.799 MSK ] [SilentConfigure.performSilentConfigure:198] Typical profile configuration.
[main] [ 2015-04-03 15:39:06.801 MSK ] [ConfigureProfile.setProfileParam:140] Setting NAMES.DIRECTORY_PATH: (TNSNAMES, EZCONNECT)
[main] [ 2015-04-03 15:39:06.802 MSK ] [SilentConfigure.performSilentConfigure:206] Typical listener configuration.
[main] [ 2015-04-03 15:39:06.839 MSK ] [ConfigureListener.isHASConfigured:1596] Calling SRVM api to check if Oracle Restart is configured ...
[main] [ 2015-04-03 15:39:06.840 MSK ] [HAUtils.getCurrentOracleHome:593] Oracle home from system property: /u01/app/oracle/product/12.1.0/db_1
[main] [ 2015-04-03 15:39:06.840 MSK ] [HAUtils.getConfiguredGridHome:1343] ----- Getting CRS HOME ----
[main] [ 2015-04-03 15:39:06.840 MSK ] [UnixSystem.getCRSHome:2878] olrFileName = /etc/oracle/olr.loc
[main] [ 2015-04-03 15:39:06.841 MSK ] [HAUtils.getHASHome:1500] Failed to get HAS home.
PRCI-1144 : Failed to retrieve Oracle Grid Infrastructure home path
PRKC-1144 : File "/etc/oracle/olr.loc" not found.
[main] [ 2015-04-03 15:39:06.841 MSK ] [ConfigureListener.isHASConfigured:1607] Is Oracle Restart configured: false
[main] [ 2015-04-03 15:39:06.841 MSK ] [ConfigureListener.isHASRunning:1636] Is Oracle Restart running: false
[main] [ 2015-04-03 15:39:06.842 MSK ] [ConfigureListener.listenerExists:396] Is listener "LISTENER" already exists: false
[main] [ 2015-04-03 15:39:06.842 MSK ] [ConfigureListener.typicalConfigure:257] Checking for free port in range: 1521-1540
[main] [ 2015-04-03 15:39:06.842 MSK ] [ConfigureListener.validateEndPoint:1059] Validating end-point: TCP:1521
[main] [ 2015-04-03 15:39:06.944 MSK ] [ConfigureListener.isPortFree:1131] Checking if port 1521 is free on local machine...
[main] [ 2015-04-03 15:39:06.945 MSK ] [ConfigureListener.isPortFree:1146] InetAddress.getByName(127.0.0.1): /127.0.0.1
[main] [ 2015-04-03 15:39:06.945 MSK ] [ConfigureListener.isPortFree:1148] Local host IP address: localhost.localdomain/127.0.0.1
[main] [ 2015-04-03 15:39:06.945 MSK ] [ConfigureListener.isPortFree:1150] Local host name: localhost.localdomain
[main] [ 2015-04-03 15:39:06.945 MSK ] [ConfigureListener.isPortFree:1166] IP Address: localhost.localdomain/127.0.0.1, Is IPv6 Address: false
[main] [ 2015-04-03 15:39:06.946 MSK ] [ConfigureListener.isPortFree:1169] IP Address: localhost.localdomain/127.0.0.1, Is Link-Local Address: false
[main] [ 2015-04-03 15:39:06.946 MSK ] [ConfigureListener.isPortFree:1194] Creating ServerSocket on Port:1521, IP Address: localhost.localdomain/127.0.0.1
[main] [ 2015-04-03 15:39:06.968 MSK ] [ConfigureListener.isPortFree:1197] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:06.968 MSK ] [ConfigureListener.isPortFree:1166] IP Address: localhost.localdomain/0:0:0:0:0:0:0:1, Is IPv6 Address: true
[main] [ 2015-04-03 15:39:06.968 MSK ] [ConfigureListener.isPortFree:1169] IP Address: localhost.localdomain/0:0:0:0:0:0:0:1, Is Link-Local Address: false
[main] [ 2015-04-03 15:39:06.968 MSK ] [ConfigureListener.isPortFree:1194] Creating ServerSocket on Port:1521, IP Address: localhost.localdomain/0:0:0:0:0:0:0:1
[main] [ 2015-04-03 15:39:06.969 MSK ] [ConfigureListener.isPortFree:1197] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:06.969 MSK ] [ConfigureListener.isPortFree:1209] Creating ServerSocket on Port:1521, Local IP Address: /127.0.0.1
[main] [ 2015-04-03 15:39:06.969 MSK ] [ConfigureListener.isPortFree:1213] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:06.969 MSK ] [ConfigureListener.isPortFree:1219] Creating ServerSocket on Port:1521
[main] [ 2015-04-03 15:39:06.970 MSK ] [ConfigureListener.isPortFree:1222] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:06.970 MSK ] [ConfigureListener.isPortFree:1242] Returning is Port 1521 free: true
[main] [ 2015-04-03 15:39:06.970 MSK ] [ConfigureListener.validateEndPoint:1114] Validation...Complete for TCP/TCPS.
[main] [ 2015-04-03 15:39:06.970 MSK ] [ConfigureListener.typicalConfigure:274] Using port: 1521
[main] [ 2015-04-03 15:39:08.684 MSK ] [ConfigureListener.isPortFree:1131] Checking if port 1521 is free on local machine...
[main] [ 2015-04-03 15:39:08.685 MSK ] [ConfigureListener.isPortFree:1146] InetAddress.getByName(127.0.0.1): /127.0.0.1
[main] [ 2015-04-03 15:39:08.686 MSK ] [ConfigureListener.isPortFree:1148] Local host IP address: localhost.localdomain/127.0.0.1
[main] [ 2015-04-03 15:39:08.686 MSK ] [ConfigureListener.isPortFree:1150] Local host name: localhost.localdomain
[main] [ 2015-04-03 15:39:08.687 MSK ] [ConfigureListener.isPortFree:1166] IP Address: localhost.localdomain/127.0.0.1, Is IPv6 Address: false
[main] [ 2015-04-03 15:39:08.687 MSK ] [ConfigureListener.isPortFree:1169] IP Address: localhost.localdomain/127.0.0.1, Is Link-Local Address: false
[main] [ 2015-04-03 15:39:08.687 MSK ] [ConfigureListener.isPortFree:1194] Creating ServerSocket on Port:1521, IP Address: localhost.localdomain/127.0.0.1
[main] [ 2015-04-03 15:39:08.688 MSK ] [ConfigureListener.isPortFree:1197] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:08.688 MSK ] [ConfigureListener.isPortFree:1166] IP Address: localhost.localdomain/0:0:0:0:0:0:0:1, Is IPv6 Address: true
[main] [ 2015-04-03 15:39:08.689 MSK ] [ConfigureListener.isPortFree:1169] IP Address: localhost.localdomain/0:0:0:0:0:0:0:1, Is Link-Local Address: false
[main] [ 2015-04-03 15:39:08.689 MSK ] [ConfigureListener.isPortFree:1194] Creating ServerSocket on Port:1521, IP Address: localhost.localdomain/0:0:0:0:0:0:0:1
[main] [ 2015-04-03 15:39:08.689 MSK ] [ConfigureListener.isPortFree:1197] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:08.690 MSK ] [ConfigureListener.isPortFree:1209] Creating ServerSocket on Port:1521, Local IP Address: /127.0.0.1
[main] [ 2015-04-03 15:39:08.690 MSK ] [ConfigureListener.isPortFree:1213] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:08.691 MSK ] [ConfigureListener.isPortFree:1219] Creating ServerSocket on Port:1521
[main] [ 2015-04-03 15:39:08.691 MSK ] [ConfigureListener.isPortFree:1222] Created ServerSocket successfully.
[main] [ 2015-04-03 15:39:08.692 MSK ] [ConfigureListener.isPortFree:1242] Returning is Port 1521 free: true
Maybe problem is because:
PRCI-1144 : Failed to retrieve Oracle Grid Infrastructure home path
PRKC-1144 : File "/etc/oracle/olr.loc" not found.
Any ideas what I am dooing wrong and how finally install the Oracle?
I found the reason for this exception. If somebody will face the same problem just create /etc/oracle folder and give to it 777 permissions. For me it helped
I also got error "[INS-20802] Oracle Net Configuration Assistant failed" while installing Oracle 12c (12.2.0.1.4) on Centos7.
In my case the error went away after adding an entry in the /etc/hosts file with the hostname and its local network IP.
After that change the installation was able to finish successfully.
Resulting /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.100 centos100
777 is not the solution, it is making your system vulnerable. As suggested in oracle docs, the dir privileges should be 775.
For me in Windows 10 the solution was to install Microsoft Visual C++ 2010 Redistributable Package (x86)

How to interpret this warning? INFO: possible circular locking dependency detected

I found this info/warning message after resuming from suspend.
INFO: possible circular locking dependency detected
Could somebody show me how to read and interpret the info message? And, any suggestion how to Thanks for any help. A beginner here... :)
[ 131.399069] Restarting tasks ... done.
[ 131.409640] PM: suspend exit 1970-01-13 21:48:39.838845730 UTC
[ 131.449011] ------------[ cut here ]------------
[ 131.449759]
[ 131.449768] ======================================================
[ 131.449777] [ INFO: possible circular locking dependency detected ]
[ 131.449789] 3.10.37+ #1 Not tainted
[ 131.449797] -------------------------------------------------------
[ 131.449807] swapper/2/0 is trying to acquire lock:
[ 131.449859] (&port_lock_key){-.-...}, at: [<c036a6dc>] serial8250_console_write+0x108/0x134
[ 131.449866]
[ 131.449866] but task is already holding lock:
[ 131.449905] (&(&pool->lock)->rlock){-.-...}, at: [<c004b1bc>] __queue_work+0x16c/0x500
[ 131.449913]
[ 131.449913] which lock already depends on the new lock.
[ 131.449920] the existing dependency chain (in reverse order) is:
[ 131.449951]
[ 131.449951] -> #2 (&(&pool->lock)->rlock){-.-...}:
[ 131.449975] [<c0099c08>] validate_chain.isra.33+0xe60/0x12b4
[ 131.449993] [<c009c944>] __lock_acquire+0x3f4/0xc28
[ 131.450012] [<c009d8a0>] lock_acquire+0xbc/0x254
[ 131.450031] [<c08973d4>] _raw_spin_lock+0x4c/0x5c
[ 131.450049] [<c004b1bc>] __queue_work+0x16c/0x500
[ 131.450067] [<c004b5d0>] queue_work_on+0x80/0x84
[ 131.450087] [<c03c062c>] rpm_idle+0xe4/0x41c
[ 131.450105] [<c03c09e4>] __pm_runtime_idle+0x80/0xb4
[ 131.450124] [<c03b49f4>] driver_probe_device+0x114/0x388
[ 131.450142] [<c03b4d60>] __driver_attach+0xa4/0xa8
[ 131.450160] [<c03b28e4>] bus_for_each_dev+0x70/0xa4
[ 131.450177] [<c03b43a4>] driver_attach+0x2c/0x30
[ 131.450194] [<c03b3f38>] bus_add_driver+0x1f0/0x294
[ 131.450212] [<c03b5440>] driver_register+0x88/0x150
[ 131.450230] [<c03b68d8>] platform_driver_register+0x60/0x68
[ 131.450252] [<c0c5ce3c>] b_phy_init+0x24/0x28
[ 131.450271] [<c00087d4>] do_one_initcall+0xe8/0x19c
[ 131.450291] [<c0c2ac84>] kernel_init_freeable+0x148/0x1e8
[ 131.450312] [<c08812b8>] kernel_init+0x20/0x170
[ 131.450331] [<c000eda8>] ret_from_fork+0x14/0x20
[ 131.450362]
[ 131.450362] -> #1 (&(&dev->power.lock)->rlock){-.-...}:
[ 131.450382] [<c0099c08>] validate_chain.isra.33+0xe60/0x12b4
[ 131.450400] [<c009c944>] __lock_acquire+0x3f4/0xc28
[ 131.450418] [<c009d8a0>] lock_acquire+0xbc/0x254
[ 131.450436] [<c0897558>] _raw_spin_lock_irqsave+0x58/0x6c
[ 131.450454] [<c03c128c>] __pm_runtime_resume+0x60/0x9c
[ 131.450474] [<c036d060>] b16550_serial_out+0x30/0x6c
[ 131.450492] [<c0369b50>] serial8250_set_mctrl+0x6c/0x70
[ 131.450510] [<c0367400>] uart_add_one_port+0x300/0x418
[ 131.450528] [<c036af38>] serial8250_register_8250_port+0x244/0x300
[ 131.450546] [<c036d538>] dw8250_probe+0x240/0x5ac
[ 131.450565] [<c03b61ac>] platform_drv_probe+0x24/0x28
[ 131.450582] [<c03b4a28>] driver_probe_device+0x148/0x388
[ 131.450600] [<c03b4d60>] __driver_attach+0xa4/0xa8
[ 131.450617] [<c03b28e4>] bus_for_each_dev+0x70/0xa4
[ 131.450635] [<c03b43a4>] driver_attach+0x2c/0x30
[ 131.450652] [<c03b3f38>] bus_add_driver+0x1f0/0x294
[ 131.450669] [<c03b5440>] driver_register+0x88/0x150
[ 131.450688] [<c03b68d8>] platform_driver_register+0x60/0x68
[ 131.450708] [<c0c57f98>] dw8250_platform_driver_init+0x18/0x1c
[ 131.450726] [<c00087d4>] do_one_initcall+0xe8/0x19c
[ 131.450744] [<c0c2ac84>] kernel_init_freeable+0x148/0x1e8
[ 131.450763] [<c08812b8>] kernel_init+0x20/0x170
[ 131.450781] [<c000eda8>] ret_from_fork+0x14/0x20
[ 131.450812]
[ 131.450812] -> #0 (&port_lock_key){-.-...}:
[ 131.450831] [<c0887d90>] print_circular_bug+0x7c/0x310
[ 131.450850] [<c0099eb0>] validate_chain.isra.33+0x1108/0x12b4
[ 131.450869] [<c009c944>] __lock_acquire+0x3f4/0xc28
[ 131.450887] [<c009d8a0>] lock_acquire+0xbc/0x254
[ 131.450904] [<c08973d4>] _raw_spin_lock+0x4c/0x5c
[ 131.450923] [<c036a6dc>] serial8250_console_write+0x108/0x134
[ 131.450943] [<c002a0c8>] call_console_drivers.constprop.16+0x100/0x23c
[ 131.450960] [<c002a8e8>] console_unlock+0x41c/0x490
[ 131.450977] [<c002ab70>] vprintk_emit+0x214/0x604
[ 131.450995] [<c0886fc0>] printk+0x44/0x4c
[ 131.451016] [<c002845c>] warn_slowpath_common+0x34/0x7c
[ 131.451034] [<c0028560>] warn_slowpath_null+0x2c/0x34
[ 131.451052] [<c004b03c>] insert_work+0xa8/0xbc
[ 131.451070] [<c004b1a4>] __queue_work+0x154/0x500
[ 131.451089] [<c004b5fc>] delayed_work_timer_fn+0x28/0x2c
[ 131.451107] [<c003a414>] call_timer_fn+0x90/0x3a0
[ 131.451124] [<c003abf4>] run_timer_softirq+0x154/0x380
[ 131.451144] [<c0031fa4>] __do_softirq+0x170/0x4ec
[ 131.451161] [<c0032410>] do_softirq+0x7c/0x80
[ 131.451178] [<c0032774>] irq_exit+0xbc/0xf0
[ 131.451196] [<c00152e4>] handle_IPI+0xb4/0x488
[ 131.451213] [<c0008670>] gic_handle_irq+0x68/0x6c
[ 131.451231] [<c0898304>] __irq_svc+0x44/0x78
[ 131.451253] [<c05961b0>] bl_enter_powerdown+0x90/0xf0
[ 131.451271] [<c05941ec>] cpuidle_enter_state+0x4c/0x104
[ 131.451289] [<c0594394>] cpuidle_idle_call+0xf0/0x478
[ 131.451307] [<c000fc6c>] arch_cpu_idle+0x18/0x4c
[ 131.451327] [<c008a38c>] cpu_startup_entry+0x158/0x454
[ 131.451348] [<c0882e08>] secondary_start_kernel+0x13c/0x148
[ 131.451366] [<500081ec>] 0x500081ec
[ 131.451374]
[ 131.451374] other info that might help us debug this:
[ 131.451374]
[ 131.451419] Chain exists of:
[ 131.451419] &port_lock_key --> &(&dev->power.lock)->rlock --> &(&pool->lock)->rlock
[ 131.451419]
[ 131.451426] Possible unsafe locking scenario:
[ 131.451426]
[ 131.451433] CPU0 CPU1
[ 131.451440] ---- ----
[ 131.451458] lock(&(&pool->lock)->rlock);
[ 131.451478] lock(&(&dev->power.lock)->rlock);
[ 131.451497] lock(&(&pool->lock)->rlock);
[ 131.451515] lock(&port_lock_key);
[ 131.451522]
[ 131.451522] *** DEADLOCK ***
[ 131.451522]
[ 131.451532] 3 locks held by swapper/2/0:
[ 131.451575] #0: ((&(work)->timer)){..-...}, at: [<c003a384>] call_timer_fn+0x0/0x3a0
[ 131.451618] #1: (&(&pool->lock)->rlock){-.-...}, at: [<c004b1bc>] __queue_work+0x16c/0x500
[ 131.451660] #2: (console_lock){+.+.+.}, at: [<c002ab34>] vprintk_emit+0x1d8/0x604
[ 131.451667]
Whenever you acquire a new lock, Lockdep checks the list of locks the current process is previously holding, to warn about any deadlock scenarios.
I suspect that this is a case of acquiring locks in A->B and B->A order resulting in deadlock.
In this case Lock A is (&pool->lock)->rlock,
and B is lock (&dev->power.lock)->rlock.
You can tell Lockdep to treat two different locks as the same, by setting the same class in lockdep_set_class(). In the call trace for (&(&dev->power.lock)->rlock), in function uart_add_one_port,
lockdep_set_class(&uport->lock, &port_lock_key);
We can also see that port->rlock acquired in serial8250_console_write, is also set to the same class.
lockdep_set_class(&port->lock, &port_lock_key);
Thus Lockdep treats port->lock and uport->lock as the same lock(B), and complains that the locks A and B are taken in reverse order.
The solution would be to modify your code to take these 2 locks in the same order always.

Resources