@@ -1,212 +0,0 @@
1−+++
2−title = "Ship Troubleshooting"
3−weight = 8
4−template = "doc.html"
5−aliases = ["docs/using/ship-troubleshooting/"]
6−+++
7−
8−Urbit is still in the development stage, so there's a chance that your ship won't start properly, or will stop working properly when you're running it. That's ok! This document is intended to help you in such an event.
9−
10−This page contains resolutions to many of the most commonly encountered issues.
11−If your issue is not covered here, please check out our [Troubleshooting Knowledgebase](https://github.com/urbit/support/wiki).
12−
13−## Table of Contents
14−
15−- [Best practices](#best-practices)
16−- [Operation issues](#operation-issues)
17−- [Connectivity issues](#connectivity-issues)
18−- [Booting issues](#booting-issues)
19−- [Crashing issues](#crashing-issues)
20−
21−## Best Practices {#best-practices}
22−
23−An ounce of prevention is worth a pound of cure, so let's first go over some best practices to keep your ship in working order.
24−
25−### Only boot with your keyfile once
26−
27−Once your ship is booted with your keyfile, you should never use that same keyfile again. If you do boot with the same keyfile twice, any other ship on the network that your ship has communicated with will not be able to talk to your ship.
28−
29−If you accidentally booted with the same keyfile twice, the only remedy is performing a [personal breach](#personal-breach), which is explained in the next section.
30−
31−### Do not delete your pier
32−
33−Urbit is stateful, meaning that it needs to hold onto all your data. If you delete your pier and start your ship again, you won't be able to talk to any ship you've talked to before. The only solution to this is performing a [personal breach](#personal-breach)
34−
35−### Keep track of the directory that you put your ship in
36−
37−When you first start your ship, you should make sure you put it a place where you can find it again and where it won't get accidentally deleted. Remember that you must perform `|mount %` in your ship's Dojo to make your ship visible as a directory in the Unix file system.
38−
39−### Keep up-to-date builds
40−
41−Check for latest Urbit version at https://github.com/urbit/urbit/releases. If you're behind, update using [this guide](@/using/install.md#updating).
42−
43−### `|hi` your star to see if you're connected
44−
45−Find out who your star is by running `(sein:title our now our)` in the Dojo. Then, run `|hi ~star`, where `~star` is the star's name, and if things are working properly, you should get the message `hi ~star successful`. It could also be helpful to use `|hi` to check connectivity with `~zod` or another planet that you're in a Chat channel with.
46−
47−### Turn your ship off and on again
48−
49−Use `ctrl-d` to gracefully exit your ship, and then start it again. This can solve many issues.
50−
51−### Use the `|knob` command to customize your error messages
52−
53−Error messages can be by overwhelming, so the `|knob` command is intended to remedy this. It's used to silence errors that aren't important.
54−
55−The command takes two arguments, and comes in the form of `|knob %error-tag %level`.
56−
57−`%error-tag` is the name of the error in question. It's usually printed at the top of the stack trace, such as in `crud: %hole event failed` -- `%hole` here is an example of an error tag.
58−
59−`%level` determines how much you will see of errors with your chosen `%error-tag`. There are three levels:
60−
61−- `%hush`: no output.
62−- `%soft`: one line of output, just containing the error tag.
63−- `%loud`: full output.
64−
65−So for example, to silence all Ames packet-related errors, try `|knob %hole %hush`.
66−
67−### Perform a personal breach. {#personal-breach}
68−
69−A personal breach is when a ship tells all the other ships that have communicated with it to treat it as though the ship was just started for the first time again, since everyone on the network has forgotten about it.
70−
71−Personal breaches often fix connectivity issues, but should only be used as a
72−last resort. To find out how to perform a personal breach, check out our [Guide
73−to Breaches](../guide-to-breaches). Before taking such a drastic measure, try
74−other methods in this guide. You can also ask for help on
75−in the Help channel in the Urbit Community group at `~bitbet-bolbel/urbit-community` or, failing that, in the `#ship-starting-support`
76−channel in our [Discord server](https://discord.gg/n9xhMdz).
77−
78−### Reset `+code`
79−
80−You login to Landscape using the camel-case phrase obtained from dojo by
81−entering `+code`. For security reasons you may wish to change this code
82−regularly. You may do so by entering `|code %reset` into dojo. Doing this
83−will prevent [Bridge](@/docs/glossary/bridge.md) from being to derive your code,
84−meaning you will only be able to check it from dojo in the future.
85−
86−## Operation Issues {#operation-issues}
87−
88−### My urbit is very slow
89−
90−Run `|wash-gall`. This clears caches in Gall, and may result in steep performance improvements.
91−
92−### My urbit is frozen
93−
94−Sometimes this happens if you're processing a very large event, or if you're in an infinite loop, or for a variety of other reasons.
95−
96−Before doing anything, try waiting for a minute: an event might finish processing. If it doesn't clear up, then use the Unix kill-command, `ctrl-z`, to end your ship's process. Then restart your ship.
97−
98−### When I try to type into the Dojo, it prints `dy-noprompt`
99−
100−This happens when your Dojo is waiting on a request, such as an HTTP request. You can fix it simply by typing `backspace` or (`delete` on Mac).
101−
102−### My ship doesn't recognize file changes that I make in my pier
103−
104−Since version `0.8.0`, changes no longer automatically sync between the Unix side (your pier) and your ship. To sync your file changes, you must run `|commit %desk` in your Dojo, where `%desk` is the desk you'd like to sync.
105−
106−## Connectivity Issues {#connectivity-issues}
107−
108−### I can't communicate with anyone
109−
110−You may have booted a ship with your keyfile twice in the same era. To fix this, you must perform a [personal breach](#personal-breach).
111−
112−### I don't have the latest OTA
113−
114−You can check what build your ship is on by entering `+trouble` into dojo and
115−reading the `%base` hash. If this does not match the latest hash published in
116−the `urbit-dev` mailing list, you are behind.
117−
118−Your sponsor may just be lagging behind, so sometimes this will resolve on its
119−own with patience. Otherwise, try the procedure outlined [here](https://github.com/urbit/support/wiki/Missing-OTA).
120−
121−### I keep getting an `ames` error stack-trace
122−
123−You may see a message like this one: `/~zod/home/~2019.7.22..18.55.46..83a3/sys/vane/ames:<[line column].[line column]>`. This is a clay path to a Hoon file, pointing to the line and column where an expression crashed. This kind of error might be accompanied by a `crud` message.
124−
125−This means that another ship is sending invalid packets to you. This could be because one of the ships has not updated the other ship's "life number", which is the number that starts at one and increments every time that ship performs a personal breach.
126−
127−This can happen if they have the wrong keys of yours, or if you have the wrong keys of theirs. You can figure out who has the wrong keys by running this scry command in your dojo: `.^(* %j /=life=/shipname)`, where shipname is the other ship's name. Save that information. Then, go to the [Azimuth contract on Etherscan](https://etherscan.io/address/0x223c067f8cf28ae173ee5cafea60ca44c335fecb#readContract), scroll down to `32. points`, and put in the hexadecimal representation of the other ship's `@p`. You can find the hexadecimal representation by running ...
128−
129−```
130−`@ux`~sampel-palnet
131−```
132−
133−... in the Dojo, where `~sampel-palnet` is the other ship's name. Then, compare it to the scry information that you saved. If that information matches up, it means that the other ship is the problem. If it **doesn't** match up, your ship has wrong information about the other ship. If you have such wrong information, you can fix this by running:
134−
135−```
136−:azimuth-tracker|listen ~ %app %azimuth-tracker
137−```
138−
139−The last line above syncs from an Ethereum node for _all_ ships on the network. If you only wanted to sync with certain ships, run:
140−
141−```
142−:azimuth-tracker|listen ~[~sampel-palnet ~zod ~marzod] %app %azimuth-tracker
143−```
144−
145−`~sampel-palnet ~zod ~marzod` are example ship-names; replace these with any number of desired ships-names.
146−
147−The above commands work if you have the wrong keys of other ships. If other ships have wrong keys of _yours_, you need to somehow ask them to to run such a command.
148−
149−### I can talk to some ships, but I can't talk to my sponsor and some other ships
150−
151−This is the result of deleting your pier and starting your ship again. To fix this, you must perform a [personal breach](#personal-breach).
152−
153−## Booting Issues {#booting-issues}
154−
155−### My ship booted for the first time, but it turned into a comet instead of my planet or star
156−
157−You may have used the wrong arguments when booting your ship for the first time. Delete this comet and try again.
158−
159−### My development ship ("fakezod") gets a `boot: malformed` failure
160−
161−This means that you gave your development ship an invalid `@p`. So, you will get this error if you write, for example, `urbit -F zodzod` instead of `urbit -F zod`.
162−
163−## Crashing Issues {#crashing-issues}
164−
165−### I got a `bail` error and my ship crashed
166−
167−Try bringing it back up; it will often start working just fine again.
168−
169−However, if you get a `bail` error again, you should perform a [personal breach](#personal-breach).
170−
171−#### Making a GitHub issue out of your `bail`
172−
173−You can get help with you problem by creating an issue at [github.com/urbit/urbit](https://github.com/urbit/urbit/issues). But to make a good issue, you need to include some information.
174−
175−When your urbit crashes with a `bail`, you'll probably get a core dump, which is a file that contains the program state of your urbit when it crashed. On Mac, core dumps can be found in `/cores`. On Linux, cores can often be found in `/var/crash`, or the home directory.
176−
177−Navigate to the folder containing your core dumps. Find the most recent core dump by looking at the dates after you run `ls -l`. Then `lldb -c <corename>`. Once that loads, you'll be at an `(lldb)` prompt; type `bt` at this prompt. This will create a stack trace that looks like this:
178−
179−```
180−(lldb) bt
181−* thread #1, stop reason = signal SIGSTOP
182− * frame #0: 0x000000010583d871 urbit`_box_free + 17
183− frame #1: 0x0000000105845ee6 urbit`u3j_boot + 182
184− frame #2: 0x000000010584d1f9 urbit`u3m_boot + 89
185− frame #3: 0x000000010583d15d urbit`main + 2765
186− frame #4: 0x00007fff75cb83d5 libdyld.dylib`start + 1
187−(lldb)
188−```
189−
190−Copy this stack trace and include it in your GitHub issue.
191−
192−### My ship crashed with a `bail: meme` error.
193−
194−This means that your ship ran out of memory.
195−
196−1. Make sure you are running the latest binary if you are not already on it.
197−
198−2. Restart your ship. If you don't crash again, everything may be fine.
199−
200−3. Try the procedure outlined [here](https://github.com/urbit/support/wiki/ship-exits-with-a-bail:-meme-error).
201−
202−4. If you **do** crash again, then you should perform a [personal breach](#personal-breach).
203−
204−### My ship crashed with a `bail: oops` error
205−
206−Restart your ship. These issues often just go away on their own. If this error repeats after restart two or more times, post the messages in an issue at [github.com/urbit/urbit](https://github.com/urbit/urbit/issues).
207−
208−This same error might also appear with a message like `Assertion '0'`.
209−
210−### My ship crashed with an `pier: work error` error
211−
212−This means that the Urbit worker process has shut down for one reason or another. Just restart your ship; this is not a notable or reportable error.