Running into an intermittent Ruby on rails routing issues with devise. The error occurs maybe one in ten times and we are not sure why. Any help would be appreciated.
The error:
ActionController::RoutingError: No route matches [GET] "/signup/account"
... 27 non-project frames
1
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/debug_exceptions.rb" line 21 in call
2
File "/app/vendor/bundle/ruby/2.0.0/gems/rollbar-0.10.14/lib/rollbar/middleware/rails/show_exceptions.rb" line 19 in call_with_rollbar
3
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/show_exceptions.rb" line 56 in call
4
File "/app/vendor/bundle/ruby/2.0.0/gems/lograge-0.2.2/lib/lograge/rails_ext/rack/logger.rb" line 15 in call_app
5
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb" line 16 in block in call
6
File "/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb" line 22 in tagged
7
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/logger.rb" line 16 in call
8
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/request_id.rb" line 22 in call
9
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb" line 21 in call
10
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb" line 17 in call
11
File "/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/cache/strategy/local_cache.rb" line 72 in call
12
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb" line 15 in call
13
File "/app/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.14/lib/action_dispatch/middleware/static.rb" line 63 in call
14
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-ssl-1.3.3/lib/rack/ssl.rb" line 27 in call
15
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 136 in forward
16
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 245 in fetch
17
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 185 in lookup
18
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 66 in call!
19
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb" line 51 in call
20
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/engine.rb" line 484 in call
21
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/application.rb" line 231 in call
22
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb" line 14 in call
23
File "/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/rack/log_tailer.rb" line 17 in call
24
File "/app/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb" line 59 in service
25
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb" line 138 in service
26
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb" line 94 in run
27
File "/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb" line 295 in block in start_thread
My routes look like this:
cancel_user_registration GET /signup/account/cancel(.:format) registrations#cancel
user_registration POST /signup/account(.:format) registrations#create
new_user_registration GET /signup/account/setup(.:format) registrations#new
edit_user_registration GET /signup/account/edit(.:format) registrations#edit
PUT /signup/account(.:format) registrations#update
DELETE /signup/account(.:format) registrations#destroy
The routes file:
devise_for :users, :controllers => {:registrations => "registrations"}, :path => "signup", :path_names => {:sign_in => "login", :sign_out => "logout", :password => "secret", :confirmation => "verification", :unlock => "unblock", :registration => "account", :sign_up => "setup"}
match "/users/account/setup" => "setup#index"
#Setup the routes for the setup process:
scope "/setup", controller: :setup, as: :setup do
match "" => "setup#signup"
match :signup
match :account
match :holidays
match :organization
match :add_employees
match :roster_product_options
match :account_holidays
match :import_employees
match :upgrade
match :roster_setup_complete
end
Related
01/23/23-10:07:16 :: adnodemgrctl.sh version 120.11.12020000.12
Calling txkChkEBSDependecies.pl to perform dependency checks for ALL MANAGED SERVERS
ERROR DESCRIPTION:
(FATAL ERROR
PROGRAM : /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl(/oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/bin/txkrun.pl)
TIME : Mon Jan 23 10:07:17 2023
FUNCTION: TXK::Process::run [ Level 3 ]
MESSAGES:
Command error: = 2304, = unzip -o /oracle/u02/VIS/fs2/inst/apps/VIS_vision/logs/appl/rgf/TXK/txkChkEBSDependecies_Mon_Jan_23_10_07_17_2023/formsapp.ear -d /oracle/u02/VIS/fs2/inst/apps/VIS_vision/logs/appl/rgf/TXK/txkChkEBSDependecies_Mon_Jan_23_10_07_17_2023
STACK TRACE
at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Error.pm line 168
TXK::Error::abort('TXK::Error', 'HASH(0xd432e8)') called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Common.pm line 299
TXK::Common::doError('TXK::Process=HASH(0x19224d0)', 'Command error: = 2304, = unzip -o /oracle/u02/...', undef) called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Common.pm line 314
TXK::Common::setError('TXK::Process=HASH(0x19224d0)', 'Command error: = 2304, = unzip -o /oracle/u02/...') called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Process.pm line 449
TXK::Process::run('TXK::Process=HASH(0x19224d0)', 'HASH(0x1a22af0)') called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl line 1163
TXK::RunScript::unzipFile('/oracle/u02/VIS/fs2/inst/apps/VIS_vision/logs/appl/rgf/TXK/tx...', '/oracle/u02/VIS/fs2/inst/apps/VIS_vision/logs/appl/rgf/TXK/tx...') called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl line 815
TXK::RunScript::extractLatestFrmSrvJar() called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl line 1248
TXK::RunScript::checkFormsApp() called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl line 276
eval {...} called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl line 182
require /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkChkEBSDependecies.pl called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/RunScript.pm line 105
TXK::RunScript::require('TXK::RunScript', '/oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txk...') called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Script.pm line 177
eval {...} called at /oracle/u02/VIS/fs2/EBSapps/appl/au/12.0.0/perl/TXK/Script.pm line 177
TXK::Script::run('TXK::Script=HASH(0x139e460)', '/oracle/u02/VIS/fs2/inst/apps/VIS_vision/logs/appl/rgf/TXK', '/oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/patch/115/bin/txk...') called at /oracle/u02/VIS/fs2/EBSapps/appl/fnd/12.0.0/bin/txkrun.pl line 174
)
W A R N I N G *
Error while executing the perl script txkChkEBSDependecies.pl
We have determined that one or more checks failed for MANAGED SERVERS.
Please check logs for more details.
Validated the passed arguments for the option ebs-get-nmstatus
Connecting to Node Manager ...
Successfully Connected to Node Manager.
The Node Manager is up.
NodeManager log is located at /oracle/u02/VIS/fs2/FMW_Home/wlserver_10.3/common/nodemanager/nmHome1
01/23/23-10:07:21 :: adnodemgrctl.sh: exiting with status 2
CAN ANY ONE HELP ME WITH THIS PROBLEM ?
I am having a strange issue where i cannot seem to finish logging out of Laravel. It seems to confuse a token with the database connection. What should be mysql in this case is UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA
EDIT: Just to note, my remember_token column is also never populating
EDIT 2: I had not thought to try logging in with "Remember me" selected. I am seeing the same error when I do that.
I went digging into some of these functions and cannot figure out where the confusion is coming from. There couldnt be any issues with my config/database.php file because I am logging in ok once "Remember me" is not checked.
The logout function:
public function webLogout( ) {
Auth::logout();
die('test');
return redirect('/');
}
The error..
InvalidArgumentException in DatabaseManager.php line 137: Database [UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA] not configured.
in DatabaseManager.php line 137
at DatabaseManager->configuration('UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA') in DatabaseManager.php line 100
at DatabaseManager->makeConnection('UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA') in DatabaseManager.php line 71
at DatabaseManager->connection('UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA') in Model.php line 1016
at Model::resolveConnection('UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA') in Model.php line 982
at Model->getConnection() in Model.php line 846
at Model->newBaseQueryBuilder() in Model.php line 807
at Model->newQueryWithoutScopes() in Model.php line 490
at Model->save() in EloquentUserProvider.php line 86
at EloquentUserProvider->updateRememberToken(object(User), 'UW6c1Jyh4bhuOw36a5DDKWrjjlaNqes4rPf4U7rst1QcOyhjC8KQaD2ZhCAA') in SessionGuard.php line 534
at SessionGuard->cycleRememberToken(object(User)) in SessionGuard.php line 494
at SessionGuard->logout() in AuthManager.php line 294
at AuthManager->__call('logout', array()) in Facade.php line 221
at AuthManager->logout() in Facade.php line 221
at Facade::__callStatic('logout', array()) in AuthenticateController.php line 60
at Auth::logout() in AuthenticateController.php line 60
at AuthenticateController->webLogout()
at call_user_func_array(array(object(AuthenticateController), 'webLogout'), array()) in Controller.php line 55
When I try to log into Ansible Tower or navigate around, I'm getting a 500 error. The /var/log/tower.log shows:
2016-12-20 14:34:59,659 ERROR django.request Internal Server Error: /api/v1/config/
Traceback (most recent call last):
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/var/lib/awx/venv/tower/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/lib/python2.7/site-packages/awx/api/views.py", line 234, in get
File "/lib/python2.7/site-packages/awx/main/models/projects.py", line 57, in get_local_path_choices
OSError: [Errno 13] Permission denied: '/var/lib/awx/projects'
But the /var/lib/awx/projects directory is fully owned by the awx user.
$ ls -la /var/lib/awx/projects/
total 4
drwxr-xr-x. 2 awx awx 6 Dec 19 16:01 .
drwxr-xr-x. 9 awx awx 4096 Dec 20 10:38 ..
Has anyone ever experienced this? What's the way to fix it? Thanks!
You've got SElinux enabled and blocking access to the file. Notice the dot at the end:
drwxr-xr-x.
Check the details with ls -Z /var/lib/awx/projects/.
Refer to SELinux - Contexts Labeling Files. Also this answer on Unix.SE might be of help.
I need a shell script to parse a log file and look for a certain pattern. if that paatern found, then take key values from that line and put it into a csv.
Example:
Here is the log file i have :
*webauthRedirect: Mar 24 08:57:50.903: #EMWEB-6-PARSE_ERROR: webauth_redirect.c:1034 parser exited. client mac= a0:88:b4:d3:55:8c bytes parsed = 0 and bytes read = 213
*webauthRedirect: Mar 24 08:57:50.903: #EMWEB-6-HTTP_REQ_BEGIN_ERR: http_parser.c:579 http request should begin with a character
***ewmwebWebauth1: Mar 04 11:33:46.870: #PEM-6-GUESTIN: pem_api.c:7851 Guest user logged in with user account (mrathi_dev) MAC address 00:1e:65:39:10:8e, IP address 192.168.133.146.**
*ewmwebWebauth1: Mar 04 11:33:46.870: #AAA-5-AAA_AUTH_NETWORK_USER: aaa.c:2178 Authentication succeeded for network user 'mrathi_dev'
*ewmwebWebauth1: Mar 04 11:33:46.858: #APF-6-USER_NAME_CREATED: apf_ms.c:6532 Username entry (mrathi_dev) with length (10) created for mobile 00:1e:65:39:10:8e
*mmListen: Mar 24 08:57:49.030: #APF-6-RADIUS_OVERRIDE_DISABLED: apf_ms_radius_override.c:1085 Radius overrides disabled, ignoring source 4
*webauthRedirect: Mar 24 08:57:47.008: #EMWEB-6-PARSE_ERROR: webauth_redirect.c:1034 parser exited. client mac= 5c:a:5b:60:f1:a7 bytes parsed = 0 and bytes read = 440
*webauthRedirect: Mar 24 08:57:47.008: #EMWEB-6-HTTP_REQ_BEGIN_ERR: http_parser.c:579 http request should begin with a character
*webauthRedirect: Mar 24 08:57:45.453: #EMWEB-6-PARSE_ERROR: webauth_redirect.c:1034 parser exited. client mac= 5c:a:5b:60:f1:a7 bytes parsed = 0 and bytes read = 440
*webauthRedirect: Mar 24 08:57:45.453: #EMWEB-6-HTTP_REQ_BEGIN_ERR: http_parser.c:579 http request should begin with a character
All I am interested in is the #PEM-6-GUESTIN line. I need to take the user id , mac and IP address from this line and put it in a csv. Only log lines with that status are required.
This is my first time working with shell scripts and all your help would be appreciated.
I think it is easier using grep to filter + sed to get groups using regex:
grep "#PEM-6-GUESTIN" log.txt | sed -r "s/.*user account \((.*)\).* MAC address (.*), IP address (.*)\.\*\*.*/\1,\2,\3/"
And the output is in CSV format:
mrathi_dev,00:1e:65:39:10:8e,192.168.133.146
I have a problem compiling a program I made in BASIC. It's a DOS simulator that I was making in attempts to see if it is posssible to write an operating system entirly in BASIC. Every time I try to compile, I get these messages:
!SYNTAX ERROR IN LINE 15, COLUMN 50
UNEXPECTED E
EXPECTING : OR END OF LINE
What do I change to sovle this?
10 PRINT
11 PRINT "Starting..."
12 PRINT
13 PRINT
14 INPUT "Type the location of the Command Interpretter:"; I$
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14 ELSE GOTO 13
16 INPUT "C:\>"; D$
17 IF D$ = "FORMAT" GOTO 25
18 IF D$ = "FDISK" GOTO 47
19 IF D$ = "HELP" GOTO 16
20 IF D$ = "DIR" GOTO 16
21 IF D$ = "MKDIR" GOTO 16
22 IF D$ = "WIN" GOTO 16
23 IF D$ = "CD" GOTO 16
24 IF D$ = "DEL" GOTO 16
25 PRINT "WARNING, ALL DATA ON REMOVABLE DISK"
27 PRINT "DRIVE A: WILL BE LOST!"
28 INPUT "Proceed with Format (Y/N)"; F$
29 IF F$ = "Y" THEN GOTO 28
30 IF F$ = "N" THEN GOTO 16
31 PRINT
32 PRINT
33 PRINT
34 PRINT "Fotmatting 1.44MB"
35 PRINT "Format complete."
36 PRINT "Writing out file allocation table"
37 PRINT "Complete."
38 PRINT "Calculating free space (this may take several minutes)...................."
39 PRINT "Complete."
40 PRINT
41 INPUT "Volume Label (11 charchters, ENTER for none)"
42 PRINT
43 PRINT " 1,440MB total disk space"
44 PRINT " 1,440MB available on disk"
45 PRINT
46 PRINT " 512 bytes in each allocation unit."
47 PRINT " 32,624 allocation units available on disk."
48 PRINT "Volume Serial Number is 326A-1312"
49 GOTO 16
50 PRINT "Incorrect DOS Version"
51 PRINT
52 GOTO 16
I used Vintage BASIC 1.0.1 as the compiler. Anyone know what's going on?
Windoze NT
I don't think there is an ELSE keyword in vintage basic, which is why you're getting the unexpected 'E' error.
I assume vintage BASIC is unstructured BASIC, you can refer to the wikipedia article for an example:
http://en.wikipedia.org/wiki/BASIC_programming_language
Also, you have some duplicate line numbers for 26 and 27, which explains the other errors.
The first two warnings are caused by your program having two lines 26, and two lines 27.
I would guess that the third message comes from your BASIC only supporting IF THEN and not IF THEN ELSE. In this case, you can encode it with IF GOTO.
Are you sure your version of BASIC has ELSE? Not all have...
I guess you are learning to program, right? May I ask a question? Why Basic? I think there are a lot of more useful and powerful (and mainly using modern practices of programing) languages to learn that you can use in a graphic OS and they are not more complicated to learn like Python for example (my son has your age and he is loving python). It's a simple language for simple things but very powerful if you need (and complicated too!).
Good luck!
I note that you've changed the code originally posted, deleting the duplicate line numbers That will make the first part of this answer look weird, but I'll leave it.
The compiler is telling you that you're re-using the same line numbers. Notice the following section of code?
26 PRINT "DRIVE A: WILL BE LOST!"
27 INPUT "Proceed with Format (Y/N)"; F$
26 IF F$ = "Y" THEN GOTO 28
27 IF F$ = "N" THEN GOTO 16
The fix is to renumber your lines. Now you know why you don't usually use increments of 1 between lines in languages that require line numbers! (You can likely find - or even write - a tool to do it for you, however.)
Regarding the error from:
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14 ELSE GOTO 13
I've not run across "Vintage BASIC" before, but assuming the other answers about it not supporting an else are correct, you'll want something like:
15 IF I$ = "C:\WINDOWS\COMMAND.COM" THEN GOTO 14
16 IF I$ <> "C:\WINDOWS\COMMAND.COM" THEN GOTO 13
You may need to replace "<>" with "!=" or whatever your BASIC uses as a not equal to operator. Also, you'll have to do more renumbering, since you already have a line 16.