User Count Exceeded
On your host server installation:
- Download appropriate net.dat file on the PC*MILER host machine, save the file (net.dat) to the App Folder (Default Location: c:ALK TechnologiesPCMILERXXApp)
- Open the file pcm_server.log in the App folder and edit all number values for each machine to 0 then save the file.
-You can use this pcm_server.log to track your license usage. - Verify that the root PC*MILER folder permissions on the server have «Domain Users», «Domain Admins», «Authenticated Users», «Users», and «Administrators» set to «Full Control».
Downloads — Net.dat
PC*MILER
- PC*MILER 29-36
- PC*MILER 23-28
PC*MILER Rail
- PC*MILER Rail 22-28
- PC*MILER Rail 17-21
Prevention
This issue generally occurs because the users do not have proper rights to grab/release licenses. To avoid this in the future, make sure all users/user groups have Full Control to the PC*MILER share permissions and security on the server.
If you are experiencing frequent License Count issues, it can be a result of one of three things:
- Insufficient number of users — PC*MILER Interactive (UI), Connect, and Mapping each count as a separate license per usage. If you have 1 user that has PC*MILER Interactive opened and they are also getting mileage and a map in a Truck Management System or 3rd party application, it is possible that 1 user is using 3 licenses at one time.
- Citrix/Terminal Server Usage — If you are using a Citrix or Terminal Server environment, your licenses may not release properly. The PC*MILER Network license was not designed to work in a Citrix/Terminal server environment so there can be issues such as this. We do offer Citrix/Terminal Server licenses that do not experience license count issues.
NOTE: If you would like to discuss changing your license type to Citrix/Terminal Server, please contact: 800-377-6453 x1; Sales@alk.com - Permissions — To properly grab and release licenses from PC*MILER all users and user groups require Full Control to the PC*MILER Share and Security permissions on your server.
Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
I’m sure there is something wrong in my code, but I cannot be sure. I’ve poured over it several times and I’m just missing something. Getting this error:
Failures: 1) Signing up allows a user to sign up for the site and creates the object in the database Failure/Error: expect(User.count).to eq(1) expected: 1 got: 0 (compared using ==) # ./spec/features/users/registration_spec.rb:18:in `block (2 levels) in <top (required)>'
registration_spec.rb
require "spec_helper" describe "Signing up" do it "allows a user to sign up for the site and creates the object in the database" do expect(User.count).to eq(0) visit "/" expect(page).to have_content("Sign Up") click_link "Sign Up" fill_in "First Name", with: "Jason" fill_in "Last Name", with: "Seifer" fill_in "Email", with: "jason@teamtreehouse.com" fill_in "Password", with:" treehouse1234" fill_in "Password (again)", with: "treehouse1234" click_button "Sign Up" expect(User.count).to eq(1) end end
_form.html.erb
<%= form_for(@user) do |f| %> <% if @user.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> <ul> <% @user.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :first_name, "First Name" %><br> <%= f.text_field :first_name %> </div> <div class="field"> <%= f.label :last_name, "Last Name" %><br> <%= f.text_field :last_name %> </div> <div class="field"> <%= f.label :email %><br> <%= f.text_field :email %> </div> <div class="field"> <%= f.label :password %><br> <%= f.password_field :password %> </div> <div class="field"> <%= f.label :password_confirmation, "Password (again)" %><br> <%= f.password_field :password_confirmation %> </div> <div class="actions"> <%= f.submit "Sign Up" %> </div> <% end %>
in the above section the first two and last two lines are being removed by the code block and I do not know why. I assure you they’re there.
users_controller.rb
class UsersController < ApplicationController before_action :set_user, only: [:show, :edit, :update, :destroy] # GET /users/new def new @user = User.new end # GET /users/1/edit def edit end # POST /users # POST /users.json def create @user = User.new(user_params) respond_to do |format| if @user.save format.html { redirect_to @user, notice: 'User was successfully created.' } format.json { render :show, status: :created, location: @user } else format.html { render :new } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # PATCH/PUT /users/1 # PATCH/PUT /users/1.json def update respond_to do |format| if @user.update(user_params) format.html { redirect_to @user, notice: 'User was successfully updated.' } format.json { render :show, status: :ok, location: @user } else format.html { render :edit } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # DELETE /users/1 # DELETE /users/1.json def destroy @user.destroy respond_to do |format| format.html { redirect_to users_url, notice: 'User was successfully destroyed.' } format.json { head :no_content } end end private # Use callbacks to share common setup or constraints between actions. def set_user @user = User.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def user_params params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation) end end
If you require any additional information I will provide it.
1 Answer
Does the user get created properly when you sign up manually through the browser, mirroring the steps in capybara spec?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
New answer!
OK. You need rows of error, columns of pages, and each cell to say «X/Y», for example «9/2131» where it says that 9 users experienced that error on that particular page, and 2131 total users visited that page.
Here you go:
| stats values(ipAddress) as addresses dc(ipAddress) as impact by error Page
| streamstats dc(addresses) as totalUsersImpacted by Page
| fields - addresses
| eval impact=impact + "/" + totalUsersImpacted
| xyseries error Page impact
You need to do dc once in the regular stats command and then a second time with streamstats … by error. This streamstats clause will do the same dc math but only per Error. To give the streamstats the raw materials we need, we need to pass along the values(ipAddress) although after streamstats we can safely discard them.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have fields userId, page and error, it would look like this:
<your search terms> | chart dc(userId) over error by page limit=100
The limit=100 is because by default the chart command will display 9 split by values and then roll all the rest up into a big one called «OTHER». limit=100 raises that threshold from 10 to 100.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In other words I have a query that currently looks like this and works
search here
| stats dc(ipAddress) AS impact by Page error
| xyseries error,Page ,impact
| fillnull value=0
The psuedo code of what I want is
search here
| stats dc(ipAddressErrors).»/».dc(totalIpAddresses) AS impact by Page error
| xyseries error,Page ,impact
| fillnull value=0
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Understood. You need rows of error, columns of pages, and each cell to say «9/2131» meaning that 9 users experienced that error on that particular page, and 2131 total users experienced that error across all pages.
Then what you need will look like this.
| stats values(ipAddress) as addresses dc(ipAddress) as impact by error Page
| streamstats dc(addresses) as totalUsersImpacted by error
| fields - addresses
| eval impact=impact + "/" + totalUsersImpacted
| xyseries error Page impact
You need to do dc once in the regular stats command and then a second time with streamstats … by error. This streamstats clause will do the same dc math but only per error. To give the streamstats the raw materials we need, we need to pass along the values(ipAddress) although after streamstats we can safely discard them.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
close, but this part
«Understood. You need rows of error, columns of pages, and each cell to say «9/2131″ meaning that 9 users experienced that error on that particular page, and 2131 total users experienced that error across all pages.»
should read
«Understood. You need rows of error, columns of pages, and each cell to say «9/2131» meaning that 9 users experienced that error on that particular page, and 2131 total users visited that page.»
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, easy enough.
| stats values(ipAddress) as addresses dc(ipAddress) as impact by error Page
| streamstats dc(addresses) as totalUsersImpacted by Page
| fields - addresses
| eval impact=impact + "/" + totalUsersImpacted
| xyseries error Page impact
I’ll post it as a separate answer since this one began pretty far away from what you needed.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm, this still is not doing what I would like, When searching back 60 minutes, it will report data like this
Logon Search
404 1/35 2/23
The problem is, the value for the 1 and 2 seems correct, but the second number is way off, if I do a
….page=logon
|top 0 ipAddress
I get say 157, so I would expect it to show 1/157 for that value.
Where there were 157 unique ipAddress values for logon that did or did not receive the error, and 1 that did during the search time frame.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sounds like either Page or error is undefined for a lot of your requests. I assumed you didn’t want to count such events.
My first stats command there will implicitly discard rows that don’t have a value for either error or Page. If you want to include counts for things that don’t have error or Page values, then add before the first stats, | fillnull error Page value="NULL"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see what my issue here is based on your good explanation. My issue is, the field that I am regex the error out of the event doesn’t exist at all in the non-error events, so filling null, effectively doesn’t do anything. I need to figure out a way to include the total count. I have another field that is common between both events, error and non-error. LogLevel=INFO or LogLevel=ERROR. So I need to figure out a way to get the total unique non-error+error users now.
Skip to content
If you
upgraded your MySQL server (from 5.6 to 5.7 or above)
or
imported a MySQL dump SQL file from older version
than your current server you may encounter when granting permissions to a user:
Error 'Column count of mysql.user is wrong. Expected 45, found 43. The table is probably corrupted' on query. Default database: ''. Query: 'GRANT REPLICATION SLAVE ON *.* TO 'replusr'@'144.76.156.182''
Do not panic probably it is not corrupted just continue reading.
There is the simple fix, just
execute mysql_upgrade
It will automatically detect what to upgrade and it will upgrade it:
[myuser@mysql1 ~]# screen -R upgrade [myuser@mysql1 ~]# mysql_upgrade Checking if update is needed. Checking server version. Running queries to upgrade MySQL server. Checking system database. mysql.columns_priv OK mysql.db OK mysql.engine_cost OK mysql.event OK mysql.func OK mysql.general_log OK mysql.gtid_executed OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.server_cost OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.slow_log OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK The sys schema is already up to date (version 1.5.1). Found 0 sys functions, but expected 22. Re-installing the sys schema. Upgrading the sys schema. Checking databases. phpmyadmin.pma__bookmark OK phpmyadmin.pma__central_columns OK phpmyadmin.pma__column_info OK phpmyadmin.pma__designer_settings OK phpmyadmin.pma__export_templates OK phpmyadmin.pma__favorite OK phpmyadmin.pma__history OK phpmyadmin.pma__navigationhiding OK phpmyadmin.pma__pdf_pages OK phpmyadmin.pma__recent OK phpmyadmin.pma__relation OK phpmyadmin.pma__savedsearches OK phpmyadmin.pma__table_coords OK phpmyadmin.pma__table_info OK phpmyadmin.pma__table_uiprefs OK phpmyadmin.pma__tracking OK phpmyadmin.pma__userconfig OK phpmyadmin.pma__usergroups OK phpmyadmin.pma__users OK sys.sys_config OK db1.access OK db1.users OK db1.objects OK db1.isp OK db1.desc OK Upgrade process completed successfully. Checking if update is needed.
It works when the server is up and running and it is a good idea to execute the command in a screen.
It does not need to be logged as root, but mysql_upgrade does need to have the root MySQL password. In the example above it did not asked for password, because we have it in ~/.my.cnf file.
Just to note you might upgraded a long before this error to appear!
If you do not use a certain functionality you could live up happily with the old mysql.user scheme (and all old mysql.* tables). In our case we upgraded one of our slaves and several days after when a grant command on the master was issued the replication just stopped with this error! Of course, if someone were used the command in our slave the error would have appeared there sooner.
We also had case where old MySQL SQL dump file (5.6) was imported in a newer MySQL server 5.7 and there had been no issues for weeks till the GRANT command.
perror
Th error code is 1805.
[myuser@mysql1 ~]# perror 1805 MySQL error code 1805 (ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2): Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted